From 3739860c11a9cfcdaa4d5d204ea3536784de7bb3 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 12 Aug 2015 04:40:42 -0700 Subject: [PATCH] Remove trailing spaces in gas --- gas/ChangeLog-2005 | 6 +- gas/ChangeLog-2006 | 4 +- gas/ChangeLog-2010 | 2 +- gas/ChangeLog-9295 | 24 +++--- gas/README | 4 +- gas/config/atof-ieee.c | 2 +- gas/config/atof-vax.c | 2 +- gas/config/m68k-parse.y | 18 ++-- gas/config/obj-coff.h | 8 +- gas/config/obj-elf.c | 2 +- gas/config/obj-evax.c | 6 +- gas/config/obj-macho.c | 122 +++++++++++++------------- gas/config/obj-macho.h | 2 +- gas/config/rl78-defs.h | 2 +- gas/config/rl78-parse.y | 2 +- gas/config/rx-parse.y | 2 +- gas/config/tc-alpha.c | 30 +++---- gas/config/tc-arm.c | 8 +- gas/config/tc-cr16.c | 12 +-- gas/config/tc-cr16.h | 4 +- gas/config/tc-cris.c | 4 +- gas/config/tc-crx.c | 112 ++++++++++++------------ gas/config/tc-crx.h | 4 +- gas/config/tc-dlx.c | 2 +- gas/config/tc-frv.c | 68 +++++++-------- gas/config/tc-h8300.c | 50 +++++------ gas/config/tc-i370.c | 2 +- gas/config/tc-i386.c | 2 +- gas/config/tc-i860.c | 10 +-- gas/config/tc-i960.c | 10 +-- gas/config/tc-ia64.c | 28 +++--- gas/config/tc-ip2k.c | 12 +-- gas/config/tc-m32c.c | 26 +++--- gas/config/tc-m32r.c | 12 +-- gas/config/tc-m32r.h | 2 +- gas/config/tc-m68hc11.c | 34 ++++---- gas/config/tc-m68k.c | 80 ++++++++--------- gas/config/tc-mcore.c | 2 +- gas/config/tc-mep.c | 38 ++++----- gas/config/tc-mep.h | 2 +- gas/config/tc-microblaze.h | 4 +- gas/config/tc-mips.c | 22 ++--- gas/config/tc-mmix.c | 4 +- gas/config/tc-mn10300.c | 14 +-- gas/config/tc-moxie.c | 10 +-- gas/config/tc-msp430.c | 116 ++++++++++++------------- gas/config/tc-mt.c | 34 ++++---- gas/config/tc-mt.h | 2 +- gas/config/tc-nios2.c | 170 ++++++++++++++++++------------------- gas/config/tc-ns32k.c | 2 +- gas/config/tc-ppc.c | 4 +- gas/config/tc-rl78.c | 4 +- gas/config/tc-rx.c | 2 +- gas/config/tc-s390.c | 2 +- gas/config/tc-score.h | 4 +- gas/config/tc-sh.c | 8 +- gas/config/tc-sparc.c | 2 +- gas/config/tc-spu.c | 22 ++--- gas/config/tc-tic30.c | 2 +- gas/config/tc-tic4x.c | 104 +++++++++++------------ gas/config/tc-tic4x.h | 2 +- gas/config/tc-tic6x.c | 10 +-- gas/config/tc-v850.c | 2 +- gas/config/tc-vax.c | 110 ++++++++++++------------ gas/config/tc-xc16x.c | 4 +- gas/config/tc-xc16x.h | 2 +- gas/config/tc-xstormy16.c | 6 +- gas/config/tc-xtensa.c | 50 +++++------ gas/config/tc-xtensa.h | 4 +- gas/config/tc-z80.c | 20 ++--- gas/config/tc-z80.h | 2 +- gas/config/te-generic.h | 2 +- gas/config/te-vms.c | 2 +- gas/config/xtensa-relax.c | 10 +-- gas/configure.ac | 4 +- gas/configure.com | 8 +- gas/configure.tgt | 8 +- gas/dwarf2dbg.c | 2 +- gas/itbl-lex.l | 22 ++--- gas/itbl-parse.y | 56 ++++++------ gas/makefile.vms | 4 +- 81 files changed, 812 insertions(+), 812 deletions(-) diff --git a/gas/ChangeLog-2005 b/gas/ChangeLog-2005 index 9cac534b56..49ad1176b4 100644 --- a/gas/ChangeLog-2005 +++ b/gas/ChangeLog-2005 @@ -177,9 +177,9 @@ * config/tc-z80.c (z80_start_line_hook): issue an error when redefining a symbol with equ - * doc/as.texinfo(equ): mention difference with .equiv - * doc/as.texinfo(err): fix typo - * doc/c-z80.texi(equ): redefining a symbol with equ is no longer + * doc/as.texinfo(equ): mention difference with .equiv + * doc/as.texinfo(err): fix typo + * doc/c-z80.texi(equ): redefining a symbol with equ is no longer allowed 2005-11-24 John David Anglin diff --git a/gas/ChangeLog-2006 b/gas/ChangeLog-2006 index b29de41ede..049f46556f 100644 --- a/gas/ChangeLog-2006 +++ b/gas/ChangeLog-2006 @@ -56,9 +56,9 @@ Delete the code handling large constant for PIC. Modify some comments. (score_relax_frag): Decrease insn_addr in certain situation. - (s_score_cprestore): Change .cprestore syntax from ".cprestore offset" + (s_score_cprestore): Change .cprestore syntax from ".cprestore offset" to ".cprestore reg, offset". - + 2006-12-23 Kazu Hirata * configure.tgt: Recognize fido. diff --git a/gas/ChangeLog-2010 b/gas/ChangeLog-2010 index fd2fc4f4c0..4ca98335a1 100644 --- a/gas/ChangeLog-2010 +++ b/gas/ChangeLog-2010 @@ -115,7 +115,7 @@ * config/tc-mips.c (mips_ip) <'('>: Don't let '4', '5' or '-' as a base register specifier. - + 2010-12-09 Maciej W. Rozycki * config/tc-mips.c (macro) : Fix the placement of code. diff --git a/gas/ChangeLog-9295 b/gas/ChangeLog-9295 index b8a25fe945..c84475b7eb 100644 --- a/gas/ChangeLog-9295 +++ b/gas/ChangeLog-9295 @@ -491,7 +491,7 @@ Tue Oct 24 14:50:38 1995 Michael Meissner (fixup_segment): Use MD_PCREL_FROM_SECTION instead of md_pcrel_from, and TC_FORCE_RELOCATION_SECTION instead of TC_FORCE_RELOCATION. - + Mon Oct 23 16:20:04 1995 Ken Raeburn * input-scrub.c (as_where): Set name to null pointer if we don't @@ -509,7 +509,7 @@ Mon Oct 23 11:15:44 1995 James G. Smith accepting the 4100 as a MIPS architecture variant (md_begin, macro_build, mips_ip, md_parse_option). Adding suitable command-line OPTIONs, and updating the help text (md_show_usage). - + Wed Oct 18 13:20:32 1995 Ken Raeburn * subsegs.c (subseg_begin): Only set absolute_frchain.fix_* when @@ -774,7 +774,7 @@ Thu Sep 28 19:25:04 1995 Stan Shebs Thu Sep 28 15:43:15 1995 Kim Knuttila - * config/tc-ppc.c (md_apply_fix3): Removed some TE_PE specific + * config/tc-ppc.c (md_apply_fix3): Removed some TE_PE specific manipulations, since I can't prove they're needed. (md_begin): Removed init_regtable, insert_reg, and the call points. (register_name): New function. Parses a register name, if appropriate. @@ -843,7 +843,7 @@ Wed Sep 27 10:29:13 1995 Kim Knuttila Added support for more predefined sections (ppc_frob_section): Removed some xcoff specific processing from TE_PE (ppc_fix_adjustable): Removed from TE_PE mainline - (md_apply_fix3): For TE_PE toc entries, we don't need to mess + (md_apply_fix3): For TE_PE toc entries, we don't need to mess with fx_addnumber. Removed for the time being. (lots): Put back missing assignments to ppc_current_csect. @@ -871,7 +871,7 @@ Mon Sep 25 16:08:43 1995 Michael Meissner (md_assemble): Be more robust in terms of relocations. (md_apply_fix3): Allow 14 bit relocs to be emitted for external symbols in addition to 26 bit relocs. Properly insert 26/14 bit - reloc value fields into the instruction stream. + reloc value fields into the instruction stream. Mon Sep 25 00:23:16 1995 Ian Lance Taylor @@ -1618,7 +1618,7 @@ Thu Aug 10 00:38:11 1995 Ian Lance Taylor (build_Mytes, md_atof): Likewise. (md_convert_frag, md_apply_fix): Likewise. (md_number_to_chars): Likewise. - + Wed Aug 9 10:51:48 1995 Ian Lance Taylor * config/tc-m68k.c (m68k_abspcadd): New static variable. @@ -1946,7 +1946,7 @@ Mon Jul 31 18:19:26 1995 steve chamberlain * gasp.c (main): Parse -I option. (do_include): Look through include list. - * gasp.c (change_base): Don't modify numbers in strings. + * gasp.c (change_base): Don't modify numbers in strings. Mon Jul 31 12:16:21 1995 Ian Lance Taylor @@ -2253,7 +2253,7 @@ Fri Jul 7 11:17:27 1995 Ian Lance Taylor Add SPARC ELF PIC support. * write.c (fixup_segment): Pass fixP to TC_RELOC_RTSYM_LOC_FIXUP, not fixP->fx_r_type. - * config/tc-sparc.c (sparc_pic_code): New global variable. + * config/tc-sparc.c (sparc_pic_code): New global variable. (md_apply_fix): If generating PIC, adjust fx_addnumber for any non PC relative reloc. (tc_gen_reloc): If generating PIC, adjust various reloc types. @@ -2392,7 +2392,7 @@ Wed Jul 5 12:01:49 1995 Ian Lance Taylor (s_stringer, s_mips_space): Remove unneeded declarations. (md_parse_option): In case 'g', set mips_debug to debugging level. (mips_local_label): New function. - * config/tc-mips.h (LOCAL_LABEL): Call mips_local_label. + * config/tc-mips.h (LOCAL_LABEL): Call mips_local_label. (mips_local_label): Declare. Wed Jul 5 00:59:22 1995 Fred Fish (fnf@cygnus.com) @@ -12364,7 +12364,7 @@ Tue Nov 10 09:49:24 1992 Ian Lance Taylor (ian@cygnus.com) * config/atof-ieee.c, config/atof-ns32k.c, config/tc-*.c: made EXP_CHARS, FLT_CHARS, comment_chars, line_comment_chars and line_seperator_chars consistently const, and always - initialized them. Included read.h. + initialized them. Included read.h. Thu Nov 5 17:55:41 1992 Jim Wilson (wilson@sphagnum.cygnus.com) @@ -12452,7 +12452,7 @@ Tue Sep 29 10:51:55 1992 Ian Lance Taylor (ian@cygnus.com) * config/tc-i960.h, config/tc-i960.c: avoid the ANSI preprocessor addition #elif, since it is not supported by old - compilers. + compilers. config/ho-rs6000.h, config/tc-m68k.c: the native RS/6000 compiler miscompiles a couple of expressions in tc-m68k.c. @@ -12561,7 +12561,7 @@ Wed Sep 9 11:06:25 1992 Ian Lance Taylor (ian@cygnus.com) file. * config/tc-m68kmote.c, config/tc-m68kmote.h: removed now superfluous files. - + From Steve Chamberlain: * config/m68kcoff.mt: for m68k COFF. * config/obj-coffbfd.c: (fixup_mdeps) added diff --git a/gas/README b/gas/README index 248db73d46..cc48ce7fa2 100644 --- a/gas/README +++ b/gas/README @@ -52,7 +52,7 @@ three pieces of information in the following pattern: `sparc-sun-sunos4'. The `configure' script accompanying GAS does not provide any query -facility to list all supported host and target names or aliases. +facility to list all supported host and target names or aliases. `configure' calls the Bourne shell script `config.sub' to map abbreviations to full names; you can read the script, if you wish, or you can use it to test your guesses on abbreviations--for example: @@ -108,7 +108,7 @@ prefer; but you may abbreviate option names if you use `--'. targets. `--enable-OPTION' - These flags tell the program or library being configured to + These flags tell the program or library being configured to configure itself differently from the default for the specified host/target combination. See below for a list of `--enable' options recognized in the gas distribution. diff --git a/gas/config/atof-ieee.c b/gas/config/atof-ieee.c index 33aae16b38..04d6e6bd11 100644 --- a/gas/config/atof-ieee.c +++ b/gas/config/atof-ieee.c @@ -701,7 +701,7 @@ extern const char FLT_CHARS[]; /* This is a utility function called from various tc-*.c files. It is here in order to reduce code duplication. - + Turn a string at input_line_pointer into a floating point constant of type TYPE (a character found in the FLT_CHARS macro), and store it as LITTLENUMS in the bytes buffer LITP. The number of chars diff --git a/gas/config/atof-vax.c b/gas/config/atof-vax.c index 37f5fcc346..287c487bdf 100644 --- a/gas/config/atof-vax.c +++ b/gas/config/atof-vax.c @@ -379,7 +379,7 @@ flonum_gen2vax (int format_letter, /* One of 'd' 'f' 'g' 'h'. */ Address of where to build floating point literal. Assumed to be 'big enough'. Address of where to return size of literal (in chars). - + Out: Input_line_pointer->of next char after floating number. Error message, or 0. Floating point literal. diff --git a/gas/config/m68k-parse.y b/gas/config/m68k-parse.y index bdf57a2857..43c7ee33b2 100644 --- a/gas/config/m68k-parse.y +++ b/gas/config/m68k-parse.y @@ -44,13 +44,13 @@ #define yylval m68k_lval #define yychar m68k_char #define yydebug m68k_debug -#define yypact m68k_pact -#define yyr1 m68k_r1 -#define yyr2 m68k_r2 -#define yydef m68k_def -#define yychk m68k_chk -#define yypgo m68k_pgo -#define yyact m68k_act +#define yypact m68k_pact +#define yyr1 m68k_r1 +#define yyr2 m68k_r2 +#define yydef m68k_def +#define yychk m68k_chk +#define yypgo m68k_pgo +#define yyact m68k_act #define yyexca m68k_exca #define yyerrflag m68k_errflag #define yynerrs m68k_nerrs @@ -1042,12 +1042,12 @@ yylex (void) { yylval.exp.pic_reloc = pic_tls_ie; tail += 6; - } + } else if (strncmp (cp - 6, "@TLSLE", 6) == 0) { yylval.exp.pic_reloc = pic_tls_le; tail += 6; - } + } } else if (cp - 4 > str && cp[-4] == '@') { diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index 82b618d890..d99842d61e 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -235,16 +235,16 @@ #define SF_IS_SYSPROC 0x00000040 /* bit 6 marks symbols that are sysprocs. */ #define SF_BALNAME 0x00000080 /* bit 7 marks BALNAME symbols. */ #define SF_CALLNAME 0x00000100 /* bit 8 marks CALLNAME symbols. */ - + #define SF_NORMAL_MASK 0x0000ffff /* bits 12-15 are general purpose. */ - + #define SF_STATICS 0x00001000 /* Mark the .text & all symbols. */ #define SF_DEFINED 0x00002000 /* Symbol is defined in this file. */ #define SF_STRING 0x00004000 /* Symbol name length > 8. */ #define SF_LOCAL 0x00008000 /* Symbol must not be emitted. */ - + #define SF_DEBUG_MASK 0xffff0000 /* bits 16-31 are debug info. */ - + #define SF_FUNCTION 0x00010000 /* The symbol is a function. */ #define SF_PROCESS 0x00020000 /* Process symbol before write. */ #define SF_TAGGED 0x00040000 /* Is associated with a tag. */ diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 78dc6d9df1..08ae85384e 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -2321,7 +2321,7 @@ elf_adjust_symtab (void) list.elt_count = NULL; list.indexes = hash_new (); bfd_map_over_sections (stdoutput, build_group_lists, &list); - + /* Make the SHT_GROUP sections that describe each section group. We can't set up the section contents here yet, because elf section indices have yet to be calculated. elf.c:set_group_contents does diff --git a/gas/config/obj-evax.c b/gas/config/obj-evax.c index 07eea3f98d..b3702efb97 100644 --- a/gas/config/obj-evax.c +++ b/gas/config/obj-evax.c @@ -332,7 +332,7 @@ evax_shorten_name (char *id) which further designates that the name was truncated): "original_identifier"_haaaaabbbccc - + aaaaa = 32-bit CRC bbb = length of original identifier ccc = sum of 32-bit CRC characters @@ -361,7 +361,7 @@ static char decodings[256]; /* Table used by the crc32 function to calcuate the checksum. */ static unsigned int crc32_table[256] = {0, 0}; -/* Given a string in BUF, calculate a 32-bit CRC for it. +/* Given a string in BUF, calculate a 32-bit CRC for it. This is used as a reasonably unique hash for the given string. */ @@ -499,7 +499,7 @@ is_truncated_identifier (char *id) a truncated identifier. */ if (len != MAX_LABEL_LENGTH) return 0; - + /* Start scanning backwards for a _h. */ len = len - 3 - 3 - 5 - 2; ptr = id + len; diff --git a/gas/config/obj-macho.c b/gas/config/obj-macho.c index 63c0b7e4e0..10e8dbf27f 100644 --- a/gas/config/obj-macho.c +++ b/gas/config/obj-macho.c @@ -24,14 +24,14 @@ decorations. */ /* Mach-O supports multiple, named segments each of which may contain - multiple named sections. Thus the concept of subsectioning is + multiple named sections. Thus the concept of subsectioning is handled by (say) having a __TEXT segment with appropriate flags from - which subsections are generated like __text, __const etc. - + which subsections are generated like __text, __const etc. + The well-known as short-hand section switch directives like .text, .data etc. are mapped onto predefined segment/section pairs using facilites supplied by the mach-o port of bfd. - + A number of additional mach-o short-hand section switch directives are also defined. */ @@ -76,7 +76,7 @@ mach_o_begin (void) subseg_set (text_section, 0); if (obj_mach_o_is_static) { - bfd_mach_o_section *mo_sec + bfd_mach_o_section *mo_sec = bfd_mach_o_get_mach_o_section (text_section); mo_sec->flags &= ~BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS; } @@ -91,9 +91,9 @@ static int obj_mach_o_subsections_by_symbols; /* This will put at most 16 characters (terminated by a ',' or newline) from the input stream into dest. If there are more than 16 chars before the delimiter, a warning is given and the string is truncated. On completion of - this function, input_line_pointer will point to the char after the ',' or - to the newline. - + this function, input_line_pointer will point to the char after the ',' or + to the newline. + It trims leading and trailing space. */ static int @@ -104,14 +104,14 @@ collect_16char_name (char *dest, const char *msg, int require_comma) SKIP_WHITESPACE (); namstart = input_line_pointer; - while ( (c = *input_line_pointer) != ',' + while ( (c = *input_line_pointer) != ',' && !is_end_of_line[(unsigned char) c]) input_line_pointer++; { int len = input_line_pointer - namstart; /* could be zero. */ - /* lose any trailing space. */ - while (len > 0 && namstart[len-1] == ' ') + /* lose any trailing space. */ + while (len > 0 && namstart[len-1] == ' ') len--; if (len > 16) { @@ -156,7 +156,7 @@ obj_mach_o_get_section_names (char *seg, char *sec, /* Build (or get) a section from the mach-o description - which includes optional definitions for type, attributes, alignment and stub size. - + BFD supplies default values for sections which have a canonical name. */ #define SECT_TYPE_SPECIFIED 0x0001 @@ -166,7 +166,7 @@ obj_mach_o_get_section_names (char *seg, char *sec, static segT obj_mach_o_make_or_get_sect (char * segname, char * sectname, - unsigned int specified_mask, + unsigned int specified_mask, unsigned int usectype, unsigned int usecattr, unsigned int ualign, offsetT stub_size) { @@ -247,7 +247,7 @@ obj_mach_o_make_or_get_sect (char * segname, char * sectname, && (specified_mask & SECT_ATTR_SPECIFIED) && (secattr & BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS)) flags |= SEC_CODE; - + if (flags == SEC_NO_FLAGS && (specified_mask & SECT_ATTR_SPECIFIED) && (secattr & BFD_MACH_O_S_ATTR_DEBUG)) @@ -258,13 +258,13 @@ obj_mach_o_make_or_get_sect (char * segname, char * sectname, as_warn (_("failed to set flags for \"%s\": %s"), bfd_section_name (stdoutput, sec), bfd_errmsg (bfd_get_error ())); - + strncpy (msect->segname, segname, sizeof (msect->segname)); strncpy (msect->sectname, sectname, sizeof (msect->sectname)); msect->align = secalign; msect->flags = sectype | secattr; - + if (sectype == BFD_MACH_O_S_ZEROFILL || sectype == BFD_MACH_O_S_GB_ZEROFILL) seg_info (sec)->bss = 1; @@ -291,7 +291,7 @@ obj_mach_o_make_or_get_sect (char * segname, char * sectname, White space is allowed everywhere between elements. and
may be from 0 to 16 chars in length - they may - contain spaces but leading and trailing space will be trimmed. It is + contain spaces but leading and trailing space will be trimmed. It is mandatory that they be present (or that zero-length names are indicated by ",,"). @@ -401,7 +401,7 @@ obj_mach_o_section (int ignore ATTRIBUTE_UNUSED) while (*input_line_pointer == '+'); /* Parse sizeof_stub. */ - if ((specified_mask & SECT_ATTR_SPECIFIED) + if ((specified_mask & SECT_ATTR_SPECIFIED) && *input_line_pointer == ',') { if (sectype != BFD_MACH_O_S_SYMBOL_STUBS) @@ -415,7 +415,7 @@ obj_mach_o_section (int ignore ATTRIBUTE_UNUSED) sizeof_stub = get_absolute_expression (); specified_mask |= SECT_STUB_SPECIFIED; } - else if ((specified_mask & SECT_ATTR_SPECIFIED) + else if ((specified_mask & SECT_ATTR_SPECIFIED) && sectype == BFD_MACH_O_S_SYMBOL_STUBS) { as_bad (_("missing sizeof_stub expression")); @@ -425,7 +425,7 @@ obj_mach_o_section (int ignore ATTRIBUTE_UNUSED) } } - new_seg = obj_mach_o_make_or_get_sect (segname, sectname, specified_mask, + new_seg = obj_mach_o_make_or_get_sect (segname, sectname, specified_mask, sectype, secattr, 0 /*align */, sizeof_stub); if (new_seg != NULL) @@ -465,14 +465,14 @@ obj_mach_o_zerofill (int ignore ATTRIBUTE_UNUSED) /* Parse variable definition, if present. */ if (*input_line_pointer == ',') { - /* Parse symbol, size [.align] + /* Parse symbol, size [.align] We follow the method of s_common_internal, with the difference that the symbol cannot be a duplicate-common. */ char *name; char c; char *p; expressionS exp; - + input_line_pointer++; /* Skip ',' */ SKIP_WHITESPACE (); name = input_line_pointer; @@ -488,7 +488,7 @@ obj_mach_o_zerofill (int ignore ATTRIBUTE_UNUSED) goto done; } - SKIP_WHITESPACE (); + SKIP_WHITESPACE (); if (*input_line_pointer == ',') input_line_pointer++; @@ -535,8 +535,8 @@ obj_mach_o_zerofill (int ignore ATTRIBUTE_UNUSED) name, (long) size, (long) exp.X_add_number); *p = c; /* Restore the termination char. */ - - SKIP_WHITESPACE (); + + SKIP_WHITESPACE (); if (*input_line_pointer == ',') { align = (unsigned int) parse_align (0); @@ -557,7 +557,7 @@ obj_mach_o_zerofill (int ignore ATTRIBUTE_UNUSED) /* else just a section definition. */ specified_mask |= SECT_TYPE_SPECIFIED; - new_seg = obj_mach_o_make_or_get_sect (segname, sectname, specified_mask, + new_seg = obj_mach_o_make_or_get_sect (segname, sectname, specified_mask, BFD_MACH_O_S_ZEROFILL, BFD_MACH_O_S_ATTR_NONE, align, (offsetT) 0 /*stub size*/); @@ -600,7 +600,7 @@ done: subseg_set (old_seg, 0); } -static segT +static segT obj_mach_o_segT_from_bfd_name (const char *nam, int must_succeed) { const mach_o_section_name_xlat *xlat; @@ -630,7 +630,7 @@ obj_mach_o_segT_from_bfd_name (const char *nam, int must_succeed) msect->flags = xlat->macho_sectype | xlat->macho_secattr; msect->align = xlat->sectalign; - if ((msect->flags & BFD_MACH_O_SECTION_TYPE_MASK) + if ((msect->flags & BFD_MACH_O_SECTION_TYPE_MASK) == BFD_MACH_O_S_ZEROFILL) seg_info (sec)->bss = 1; } @@ -714,7 +714,7 @@ static void obj_mach_o_objc_section (int sect_index) { segT section; - + #ifdef md_flush_pending_output md_flush_pending_output (); #endif @@ -774,7 +774,7 @@ obj_mach_o_debug_section (int sect_index) /* This could be moved to the tc-xx files, but there is so little dependency there, that the code might as well be shared. */ -struct opt_tgt_sect +struct opt_tgt_sect { const char *name; unsigned x86_val; @@ -898,7 +898,7 @@ obj_mach_o_common_parse (int is_local, symbolS *symbolP, addressT align = 0; bfd_mach_o_asymbol *s; - SKIP_WHITESPACE (); + SKIP_WHITESPACE (); /* Both comm and lcomm take an optional alignment, as a power of two between 1 and 15. */ @@ -923,7 +923,7 @@ obj_mach_o_common_parse (int is_local, symbolS *symbolP, if (bss_section == NULL) { bss_section = obj_mach_o_segT_from_bfd_name (BSS_SECTION_NAME, 1); - seg_info (bss_section)->bss = 1; + seg_info (bss_section)->bss = 1; } bss_alloc (symbolP, size, align); s->n_type = BFD_MACH_O_N_SECT; @@ -962,17 +962,17 @@ typedef enum obj_mach_o_file_properties { OBJ_MACH_O_FILE_PROP_MAX } obj_mach_o_file_properties; -static void +static void obj_mach_o_fileprop (int prop) { if (prop < 0 || prop >= OBJ_MACH_O_FILE_PROP_MAX) as_fatal (_("internal error: bad file property ID %d"), prop); - + switch ((obj_mach_o_file_properties) prop) { case OBJ_MACH_O_FILE_PROP_SUBSECTS_VIA_SYMS: obj_mach_o_subsections_by_symbols = 1; - if (!bfd_set_private_flags (stdoutput, + if (!bfd_set_private_flags (stdoutput, BFD_MACH_O_MH_SUBSECTIONS_VIA_SYMBOLS)) as_bad (_("failed to set subsections by symbols")); demand_empty_rest_of_line (); @@ -982,7 +982,7 @@ obj_mach_o_fileprop (int prop) } } -/* Temporary markers for symbol reference data. +/* Temporary markers for symbol reference data. Lazy will remain in place. */ #define LAZY 0x01 #define REFE 0x02 @@ -1015,9 +1015,9 @@ obj_mach_o_set_symbol_qualifier (symbolS *sym, int type) int sectype = -1; /* If the symbol is defined, then we can do more rigorous checking on - the validity of the qualifiers. Otherwise, we are stuck with waiting + the validity of the qualifiers. Otherwise, we are stuck with waiting until it's defined - or until write the file. - + In certain cases (e.g. when a symbol qualifier is intended to introduce an undefined symbol in a stubs section) we should check that the current section is appropriate to the qualifier. */ @@ -1201,8 +1201,8 @@ obj_mach_o_indirect_symbol (int arg ATTRIBUTE_UNUSED) } *input_line_pointer = c; - /* The indirect symbols are validated after the symbol table is - frozen, we must make sure that if a local symbol is used as an + /* The indirect symbols are validated after the symbol table is + frozen, we must make sure that if a local symbol is used as an indirect, it is promoted to a 'real' one. Fetching the bfd sym achieves this. */ symbol_get_bfdsym (sym); @@ -1295,7 +1295,7 @@ const pseudo_typeS mach_o_pseudo_table[] = { "debug_str", obj_mach_o_debug_section, 10}, /* extension. */ { "debug_ranges", obj_mach_o_debug_section, 11}, /* extension. */ { "debug_macro", obj_mach_o_debug_section, 12}, /* extension. */ - + { "lazy_symbol_pointer", obj_mach_o_opt_tgt_section, 1}, { "lazy_symbol_pointer2", obj_mach_o_opt_tgt_section, 2}, /* extension. */ { "lazy_symbol_pointer3", obj_mach_o_opt_tgt_section, 3}, /* extension. */ @@ -1325,7 +1325,7 @@ const pseudo_typeS mach_o_pseudo_table[] = { "indirect_symbol", obj_mach_o_indirect_symbol, 0}, /* File flags. */ - { "subsections_via_symbols", obj_mach_o_fileprop, + { "subsections_via_symbols", obj_mach_o_fileprop, OBJ_MACH_O_FILE_PROP_SUBSECTS_VIA_SYMS}, {NULL, NULL, 0} @@ -1359,9 +1359,9 @@ obj_mach_o_frob_colon (const char *name) /* We need to check the correspondence between some kinds of symbols and their sections. Common and BSS vars will seen via the obj_macho_comm() function. - + The earlier we can pick up a problem, the better the diagnostics will be. - + However, when symbol type information is attached, the symbol section will quite possibly be unknown. So we are stuck with checking (most of the) validity at the time the file is written (unfortunately, then one doesn't @@ -1399,7 +1399,7 @@ void obj_mach_o_frob_label (struct symbol *sp) /* This is the base symbol type, that we mask in. */ base_type = obj_mach_o_type_for_symbol (s); - sec = bfd_mach_o_get_mach_o_section (s->symbol.section); + sec = bfd_mach_o_get_mach_o_section (s->symbol.section); if (sec != NULL) sectype = sec->flags & BFD_MACH_O_SECTION_TYPE_MASK; @@ -1447,7 +1447,7 @@ obj_mach_o_frob_symbol (struct symbol *sp) return 0; base_type = obj_mach_o_type_for_symbol (s); - sec = bfd_mach_o_get_mach_o_section (s->symbol.section); + sec = bfd_mach_o_get_mach_o_section (s->symbol.section); if (sec != NULL) sectype = sec->flags & BFD_MACH_O_SECTION_TYPE_MASK; @@ -1485,7 +1485,7 @@ obj_mach_o_frob_symbol (struct symbol *sp) { /* Anything here that should be added that is non-standard. */ s->n_desc &= ~BFD_MACH_O_REFERENCE_MASK; - } + } else if (s->symbol.udata.i == SYM_MACHO_FIELDS_NOT_VALIDATED) { /* Try to validate any combinations. */ @@ -1558,7 +1558,7 @@ obj_mach_o_process_stab (int what, const char *string, /* It's a debug symbol. */ s->symbol.flags |= BSF_DEBUGGING; - + /* We've set it - so check it, if you can, but don't try to create the flags. */ s->symbol.udata.i = SYM_MACHO_FIELDS_NOT_VALIDATED; @@ -1666,7 +1666,7 @@ obj_mach_o_set_subsections (bfd *abfd ATTRIBUTE_UNUSED, } } -/* Handle mach-o subsections-via-symbols counting up frags belonging to each +/* Handle mach-o subsections-via-symbols counting up frags belonging to each sub-section. */ void @@ -1680,7 +1680,7 @@ obj_mach_o_pre_relax_hook (void) The native 'as' leaves the sections physically in the order they appear in the source, and adjusts the section VMAs to meet the constraint. - + We follow this for now - if nothing else, it makes comparison easier. An alternative implementation would be to sort the sections as ld requires. @@ -1699,7 +1699,7 @@ typedef struct obj_mach_o_set_vma_data zerofill sections get VMAs after all others in their segment GB zerofill get VMAs last. - + As we go, we notice if we see any Zerofill or GB Zerofill sections, so that we can skip the additional passes if there's nothing to do. */ @@ -1730,11 +1730,11 @@ obj_mach_o_set_section_vma (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *v_p /* We know the section size now - so make a vma for the section just based on order. */ ms->size = bfd_get_section_size (sec); - + /* Make sure that the align agrees, and set to the largest value chosen. */ ms->align = ms->align > bfd_align ? ms->align : bfd_align; bfd_set_section_alignment (abfd, sec, ms->align); - + p->vma += (1 << ms->align) - 1; p->vma &= ~((1 << ms->align) - 1); ms->addr = p->vma; @@ -1742,7 +1742,7 @@ obj_mach_o_set_section_vma (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *v_p p->vma += ms->size; } -/* (potentially) three passes over the sections, setting VMA. We skip the +/* (potentially) three passes over the sections, setting VMA. We skip the {gb}zerofill passes if we didn't see any of the relevant sections. */ void obj_mach_o_post_relax_hook (void) @@ -1750,7 +1750,7 @@ void obj_mach_o_post_relax_hook (void) obj_mach_o_set_vma_data d; memset (&d, 0, sizeof (d)); - + bfd_map_over_sections (stdoutput, obj_mach_o_set_section_vma, (char *) &d); if ((d.vma_pass = d.zerofill_seen) != 0) bfd_map_over_sections (stdoutput, obj_mach_o_set_section_vma, (char *) &d); @@ -1787,7 +1787,7 @@ obj_mach_o_set_indirect_symbols (bfd *abfd, asection *sec, obj_mach_o_indirect_sym *isym; obj_mach_o_indirect_sym *list = NULL; obj_mach_o_indirect_sym *list_tail = NULL; - unsigned long eltsiz = + unsigned long eltsiz = bfd_mach_o_section_get_entry_size (abfd, ms); for (isym = indirect_syms; isym != NULL; isym = isym->next) @@ -1829,14 +1829,14 @@ obj_mach_o_set_indirect_symbols (bfd *abfd, asection *sec, as_fatal (_("internal error: failed to allocate %d indirect" "symbol pointers"), nactual); } - + for (isym = list, n = 0; isym != NULL; isym = isym->next, n++) { sym = (bfd_mach_o_asymbol *)symbol_get_bfdsym (isym->sym); /* Array is init to NULL & NULL signals a local symbol If the section is lazy-bound, we need to keep the reference to the symbol, since dyld can override. - + Absolute symbols are handled specially. */ if (sym->symbol.section == bfd_abs_section_ptr) ms->indirect_syms[n] = sym; @@ -1854,8 +1854,8 @@ obj_mach_o_set_indirect_symbols (bfd *abfd, asection *sec, { sym->n_desc &= ~LAZY; /* ... it can be lazy, if not defined or hidden. */ - if ((sym->n_type & BFD_MACH_O_N_TYPE) - == BFD_MACH_O_N_UNDF + if ((sym->n_type & BFD_MACH_O_N_TYPE) + == BFD_MACH_O_N_UNDF && ! (sym->n_type & BFD_MACH_O_N_PEXT) && (sym->n_type & BFD_MACH_O_N_EXT)) sym->n_desc |= lazy; @@ -1917,7 +1917,7 @@ obj_mach_o_is_frame_section (segT sec) being made. */ int -obj_mach_o_allow_local_subtract (expressionS * left ATTRIBUTE_UNUSED, +obj_mach_o_allow_local_subtract (expressionS * left ATTRIBUTE_UNUSED, expressionS * right ATTRIBUTE_UNUSED, segT seg) { diff --git a/gas/config/obj-macho.h b/gas/config/obj-macho.h index 5011b7e52a..e031e9e3ef 100644 --- a/gas/config/obj-macho.h +++ b/gas/config/obj-macho.h @@ -84,7 +84,7 @@ struct obj_mach_o_frag_data /* Symbol that corresponds to the subsection. */ symbolS *subsection; }; - + #define OBJ_FRAG_TYPE struct obj_mach_o_frag_data #define md_pre_output_hook obj_mach_o_pre_output_hook() diff --git a/gas/config/rl78-defs.h b/gas/config/rl78-defs.h index 67b1dbbc42..b41a7328f7 100644 --- a/gas/config/rl78-defs.h +++ b/gas/config/rl78-defs.h @@ -19,7 +19,7 @@ 02110-1301, USA. */ #ifndef RL78_DEFS_H -#define RL78_DEFS_H +#define RL78_DEFS_H /* Third operand to rl78_op. */ #define RL78REL_DATA 0 diff --git a/gas/config/rl78-parse.y b/gas/config/rl78-parse.y index f34903e6b6..b8795815f7 100644 --- a/gas/config/rl78-parse.y +++ b/gas/config/rl78-parse.y @@ -1551,7 +1551,7 @@ expr_is_word_aligned (expressionS exp) if (v & 1) return 0; return 1; - + } static void diff --git a/gas/config/rx-parse.y b/gas/config/rx-parse.y index 5269d6641b..e155257e4d 100644 --- a/gas/config/rx-parse.y +++ b/gas/config/rx-parse.y @@ -889,7 +889,7 @@ float2_op ; float2_op_ni - : { rx_check_float_support (); } + : { rx_check_float_support (); } REG ',' REG { id24 (1, 0x83 + (sub_op << 2), 0); F ($2, 16, 4); F ($4, 20, 4); } | { rx_check_float_support (); } diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index 2a7466aab7..a19fbc5a93 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -265,7 +265,7 @@ struct option md_longopts[] = #define OPTION_REPLACE (OPTION_RELAX + 1) #define OPTION_NOREPLACE (OPTION_REPLACE+1) { "replace", no_argument, NULL, OPTION_REPLACE }, - { "noreplace", no_argument, NULL, OPTION_NOREPLACE }, + { "noreplace", no_argument, NULL, OPTION_NOREPLACE }, #endif { NULL, no_argument, NULL, 0 } }; @@ -1798,7 +1798,7 @@ emit_insn (struct alpha_insn *insn) default: gas_assert (size >= 1 && size <= 4); } - + pcrel = reloc_howto->pc_relative; } @@ -2137,7 +2137,7 @@ assemble_insn (const struct alpha_opcode *opcode, /* If this is a real relocation (as opposed to a lituse hint), then the relocation width should match the operand width. - Take care of -MDISP in operand table. */ + Take care of -MDISP in operand table. */ else if (reloc < BFD_RELOC_UNUSED && reloc > 0) { reloc_howto_type *reloc_howto @@ -2190,7 +2190,7 @@ emit_ir_load (const expressionS *tok, if (basereg == alpha_gp_register && (symlen > 4 && strcmp (&symname [symlen - 4], "..lk") == 0)) return; - + newtok[0] = tok[0]; set_tok_preg (newtok[2], basereg); @@ -2231,7 +2231,7 @@ emit_loadstore (const expressionS *tok, if (alpha_noat_on) as_bad (_("macro requires $at register while noat in effect")); - lituse = load_expression (AXP_REG_AT, &tok[1], + lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1], (const char *) opname); } else @@ -3383,7 +3383,7 @@ add_to_link_pool (symbolS *sym, offsetT addend) fixS *fixp; symbolS *linksym, *expsym; expressionS e; - + basesym = alpha_evax_proc->symbol; /* @@ This assumes all entries in a given section will be of the same @@ -3556,7 +3556,7 @@ s_alpha_comm (int ignore ATTRIBUTE_UNUSED) segT current_seg = now_seg; subsegT current_subseg = now_subseg; int cur_size; - + input_line_pointer++; SKIP_WHITESPACE (); sec_name = s_alpha_section_name (); @@ -3610,7 +3610,7 @@ s_alpha_comm (int ignore ATTRIBUTE_UNUSED) subseg_set (current_seg, current_subseg); } #endif - + if (S_GET_VALUE (symbolP)) { if (S_GET_VALUE (symbolP) != (valueT) size) @@ -3626,7 +3626,7 @@ s_alpha_comm (int ignore ATTRIBUTE_UNUSED) #endif S_SET_EXTERNAL (symbolP); } - + #ifndef OBJ_EVAX know (symbolP->sy_frag == &zero_address_frag); #endif @@ -4240,7 +4240,7 @@ s_alpha_section_word (char *str, size_t len) { no = 1; str += 2; - len -= 2; + len -= 2; } if (len == 3) @@ -4507,10 +4507,10 @@ s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED) as_bad (_(".pdesc directive has no entry symbol")); return; } - + entry_sym = make_expr_symbol (&exp); entry_sym_name = S_GET_NAME (entry_sym); - + /* Strip "..en". */ len = strlen (entry_sym_name); if (len < 4 || strcmp (entry_sym_name + len - 4, "..en") != 0) @@ -4532,12 +4532,12 @@ s_alpha_pdesc (int ignore ATTRIBUTE_UNUSED) /* Define pdesc symbol. */ symbol_set_value_now (alpha_evax_proc->symbol); - + /* Save bfd symbol of proc entry in function symbol. */ ((struct evax_private_udata_struct *) symbol_get_bfdsym (alpha_evax_proc->symbol)->udata.p)->enbsym = symbol_get_bfdsym (entry_sym); - + SKIP_WHITESPACE (); if (*input_line_pointer++ != ',') { @@ -4703,7 +4703,7 @@ s_alpha_linkage (int ignore ATTRIBUTE_UNUSED) else { struct alpha_linkage_fixups *linkage_fixup; - + p = frag_more (LKP_S_K_SIZE); memset (p, 0, LKP_S_K_SIZE); fixp = fix_new_exp diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index b7edb5e06f..fabcf8082f 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -7767,7 +7767,7 @@ is_double_a_single (bfd_int64_t v) && (mantissa & 0x1FFFFFFFl) == 0; } -/* Returns a double precision value casted to single precision +/* Returns a double precision value casted to single precision (ignoring the least significant bits in exponent and mantissa). */ static int @@ -7865,7 +7865,7 @@ move_or_literal_pool (int i, enum lit_type t, bfd_boolean mode_3) } else l = generic_bignum; - + #if defined BFD_HOST_64_BIT v = ((((((((bfd_int64_t) l[3] & LITTLENUM_MASK) @@ -7922,7 +7922,7 @@ move_or_literal_pool (int i, enum lit_type t, bfd_boolean mode_3) return TRUE; } else if ((v & ~0xFFFF) == 0 || (v & ~0xFFFF0000) == 0) - { + { /* The number may be loaded with a movw/movt instruction. */ int imm; @@ -21880,7 +21880,7 @@ arm_tc_equal_in_insn (int c ATTRIBUTE_UNUSED, char * name) else free (nbuf); } - + return FALSE; } diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c index 91c1fdf77a..0f2456ec2a 100644 --- a/gas/config/tc-cr16.c +++ b/gas/config/tc-cr16.c @@ -335,7 +335,7 @@ get_register_pair (char *reg_name) char tmp_rp[16]="\0"; /* Add '(' and ')' to the reg pair, if its not present. */ - if (reg_name[0] != '(') + if (reg_name[0] != '(') { tmp_rp[0] = '('; strcat (tmp_rp, reg_name); @@ -349,7 +349,7 @@ get_register_pair (char *reg_name) return rreg->value.reg_val; return nullregister; -} +} /* Get the index register 'reg_name'. */ @@ -522,9 +522,9 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP) arelent * reloc; /* If symbols are local and resolved, then no relocation needed. */ - if ( ((fixP->fx_addsy) + if ( ((fixP->fx_addsy) && (S_GET_SEGMENT (fixP->fx_addsy) == absolute_section)) - || ((fixP->fx_subsy) + || ((fixP->fx_subsy) && (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section))) return NULL; @@ -932,7 +932,7 @@ process_label_constant (char *str, ins * cr16_ins) else if (strneq (input_line_pointer, "@GOT", 4) || strneq (input_line_pointer, "@got", 4)) { - if ((strneq (input_line_pointer, "+", 1)) + if ((strneq (input_line_pointer, "+", 1)) || (strneq (input_line_pointer, "-", 1))) as_warn (_("GOT bad expression with %s."), input_line_pointer); @@ -2457,7 +2457,7 @@ print_insn (ins *insn) int size; reloc_howto = bfd_reloc_type_lookup (stdoutput, insn->rtype); - + if (!reloc_howto) abort (); diff --git a/gas/config/tc-cr16.h b/gas/config/tc-cr16.h index 5d1154f546..211846dc8a 100644 --- a/gas/config/tc-cr16.h +++ b/gas/config/tc-cr16.h @@ -60,12 +60,12 @@ extern int cr16_force_relocation (struct fix *); extern void cr16_cons_fix_new (struct frag *, int, int, struct expressionS *, bfd_reloc_code_real_type); /* This is called by emit_expr when creating a reloc for a cons. - We could use the definition there, except that we want to handle + We could use the definition there, except that we want to handle the CR16 reloc type specially, rather than the BFD_RELOC type. */ #define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP, RELOC) \ cr16_cons_fix_new (FRAG, OFF, LEN, EXP, RELOC) -/* Give an error if a frag containing code is not aligned to a 2-byte +/* Give an error if a frag containing code is not aligned to a 2-byte boundary. */ #define md_frag_check(FRAGP) \ if ((FRAGP)->has_code \ diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c index 5b36da6876..25c9ea58ba 100644 --- a/gas/config/tc-cris.c +++ b/gas/config/tc-cris.c @@ -1812,7 +1812,7 @@ cris_process_instruction (char *insn_text, struct cris_instruction *out_insnp, out_insnp->opcode |= regno << 12; out_insnp->reloc = BFD_RELOC_CRIS_SIGNED_8; continue; - + case 'O': /* A BDAP expression for any size, "expr,R". */ if (! cris_get_expression (&s, &prefixp->expr)) @@ -4327,7 +4327,7 @@ cris_insn_ver_valid_for_arch (enum cris_insn_version_usage iver, || iver == cris_ver_v8_10 || iver == cris_ver_v10 || iver == cris_ver_v10p); - + case arch_crisv32: return (iver == cris_ver_version_all diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c index a2314b713b..0acb05eaa8 100644 --- a/gas/config/tc-crx.c +++ b/gas/config/tc-crx.c @@ -57,7 +57,7 @@ typedef enum OP_NOT_EVEN, /* Operand is Odd number, should be even. */ OP_ILLEGAL_DISPU4, /* Operand is not within DISPU4 range. */ OP_ILLEGAL_CST4, /* Operand is not within CST4 range. */ - OP_NOT_UPPER_64KB /* Operand is not within the upper 64KB + OP_NOT_UPPER_64KB /* Operand is not within the upper 64KB (0xFFFF0000-0xFFFFFFFF). */ } op_err; @@ -533,7 +533,7 @@ md_begin (void) /* Set up a hash table for the instructions. */ if ((crx_inst_hash = hash_new ()) == NULL) as_fatal (_("Virtual memory exhausted")); - + while (crx_instruction[i].mnemonic != NULL) { const char *mnemonic = crx_instruction[i].mnemonic; @@ -597,7 +597,7 @@ md_begin (void) linkrelax = 1; } -/* Process constants (immediate/absolute) +/* Process constants (immediate/absolute) and labels (jump targets/Memory locations). */ static void @@ -610,7 +610,7 @@ process_label_constant (char *str, ins * crx_ins) input_line_pointer = str; expression (&crx_ins->exp); - + switch (crx_ins->exp.X_op) { case O_big: @@ -651,7 +651,7 @@ process_label_constant (char *str, ins * crx_ins) case arg_idxr: crx_ins->rtype = BFD_RELOC_CRX_REGREL22; break; - + case arg_c: if (IS_INSN_MNEMONIC ("bal") || IS_INSN_TYPE (DCR_BRANCH_INS)) crx_ins->rtype = BFD_RELOC_CRX_REL16; @@ -665,7 +665,7 @@ process_label_constant (char *str, ins * crx_ins) else if (IS_INSN_TYPE (CMPBR_INS) || IS_INSN_TYPE (COP_BRANCH_INS)) crx_ins->rtype = BFD_RELOC_CRX_REL8_CMP; break; - + case arg_ic: if (IS_INSN_TYPE (ARITH_INS)) crx_ins->rtype = BFD_RELOC_CRX_IMM32; @@ -733,7 +733,7 @@ set_operand (char *operand, ins * crx_ins) case arg_c: /* Case 0x18. */ /* Set constant. */ process_label_constant (operandS, crx_ins); - + if (cur_arg->type != arg_ic) cur_arg->type = arg_c; break; @@ -746,7 +746,7 @@ set_operand (char *operand, ins * crx_ins) operandE++; *operandE = '\0'; process_label_constant (operandS, crx_ins); - operandS = operandE; + operandS = operandE; case arg_rbase: /* Case (r1). */ operandS++; /* Set register base. */ @@ -768,7 +768,7 @@ set_operand (char *operand, ins * crx_ins) *operandE = '\0'; process_label_constant (operandS, crx_ins); operandS = ++operandE; - + /* Set register base. */ while ((*operandE != ',') && (! ISSPACE (*operandE))) operandE++; @@ -885,7 +885,7 @@ parse_operand (char *operand, ins * crx_ins) default: break; } - + if (strchr (operand, '(') != NULL) { if (strchr (operand, ',') != NULL @@ -904,7 +904,7 @@ set_params: set_operand (operand, crx_ins); } -/* Parse the various operands. Each operand is then analyzed to fillup +/* Parse the various operands. Each operand is then analyzed to fillup the fields in the crx_ins data structure. */ static void @@ -999,18 +999,18 @@ gettrap (const char *s) return 0; } -/* Post-Increment instructions, as well as Store-Immediate instructions, are a - sub-group within load/stor instruction groups. - Therefore, when parsing a Post-Increment/Store-Immediate insn, we have to - advance the instruction pointer to the start of that sub-group (that is, up +/* Post-Increment instructions, as well as Store-Immediate instructions, are a + sub-group within load/stor instruction groups. + Therefore, when parsing a Post-Increment/Store-Immediate insn, we have to + advance the instruction pointer to the start of that sub-group (that is, up to the first instruction of that type). Otherwise, the insn will be mistakenly identified as of type LD_STOR_INS. */ static void handle_LoadStor (const char *operands) { - /* Post-Increment instructions precede Store-Immediate instructions in - CRX instruction table, hence they are handled before. + /* Post-Increment instructions precede Store-Immediate instructions in + CRX instruction table, hence they are handled before. This synchronization should be kept. */ /* Assuming Post-Increment insn has the following format : @@ -1220,8 +1220,8 @@ print_constant (int nbits, int shift, argument *arg) break; } - /* When instruction size is 3 and 'shift' is 16, a 16-bit constant is - always filling the upper part of output_opcode[1]. If we mistakenly + /* When instruction size is 3 and 'shift' is 16, a 16-bit constant is + always filling the upper part of output_opcode[1]. If we mistakenly write it to output_opcode[0], the constant prefix (that is, 'match') will be overridden. 0 1 2 3 @@ -1316,8 +1316,8 @@ get_number_of_operands (void) return i; } -/* Verify that the number NUM can be represented in BITS bits (that is, - within its permitted range), based on the instruction's FLAGS. +/* Verify that the number NUM can be represented in BITS bits (that is, + within its permitted range), based on the instruction's FLAGS. If UPDATE is nonzero, update the value of NUM if necessary. Return OP_LEGAL upon success, actual error type upon failure. */ @@ -1379,11 +1379,11 @@ check_range (long *num, int bits, int unsigned flags, int update) { int is_dispu4 = 0; - uint32_t mul = (instruction->flags & DISPUB4 ? 1 + uint32_t mul = (instruction->flags & DISPUB4 ? 1 : instruction->flags & DISPUW4 ? 2 : instruction->flags & DISPUD4 ? 4 : 0); - + for (bin = 0; bin < cst4_maps; bin++) { if (value == mul * bin) @@ -1436,7 +1436,7 @@ check_range (long *num, int bits, int unsigned flags, int update) /* Assemble a single instruction: INSN is already parsed (that is, all operand values and types are set). - For instruction to be assembled, we need to find an appropriate template in + For instruction to be assembled, we need to find an appropriate template in the instruction table, meeting the following conditions: 1: Has the same number of operands. 2: Has the same operand types. @@ -1489,7 +1489,7 @@ assemble_insn (char *mnemonic, ins *insn) /* In some case, same mnemonic can appear with different instruction types. For example, 'storb' is supported with 3 different types : LD_STOR_INS, LD_STOR_INS_INC, STOR_IMM_INS. - We assume that when reaching this point, the instruction type was + We assume that when reaching this point, the instruction type was pre-determined. We need to make sure that the type stays the same during a search for matching instruction. */ ins_type = CRX_INS_TYPE(instruction->flags); @@ -1529,19 +1529,19 @@ assemble_insn (char *mnemonic, ins *insn) { /* Reverse the operand indices for certain opcodes: Index 0 -->> 1 - Index 1 -->> 0 + Index 1 -->> 0 Other index -->> stays the same. */ - int j = instruction->flags & REVERSE_MATCH ? - i == 0 ? 1 : - i == 1 ? 0 : i : + int j = instruction->flags & REVERSE_MATCH ? + i == 0 ? 1 : + i == 1 ? 0 : i : i; - /* Only check range - don't update the constant's value, since the - current instruction may not be the last we try to match. - The constant's value will be updated later, right before printing + /* Only check range - don't update the constant's value, since the + current instruction may not be the last we try to match. + The constant's value will be updated later, right before printing it to the object file. */ - if ((insn->arg[j].X_op == O_constant) - && (op_error = check_range (&insn->arg[j].constant, cur_size[j], + if ((insn->arg[j].X_op == O_constant) + && (op_error = check_range (&insn->arg[j].constant, cur_size[j], cur_flags[j], 0))) { if (invalid_const == -1) @@ -1551,10 +1551,10 @@ assemble_insn (char *mnemonic, ins *insn) } goto next_insn; } - /* For symbols, we make sure the relocation size (which was already + /* For symbols, we make sure the relocation size (which was already determined) is sufficient. */ else if ((insn->arg[j].X_op == O_symbol) - && ((bfd_reloc_type_lookup (stdoutput, insn->rtype))->bitsize + && ((bfd_reloc_type_lookup (stdoutput, insn->rtype))->bitsize > cur_size[j])) goto next_insn; } @@ -1593,7 +1593,7 @@ next_insn: as_bad (_("Invalid CST4 operand value (arg %d)"), invalid_const); break; case OP_NOT_UPPER_64KB: - as_bad (_("Operand value is not within upper 64 KB (arg %d)"), + as_bad (_("Operand value is not within upper 64 KB (arg %d)"), invalid_const); break; default: @@ -1601,7 +1601,7 @@ next_insn: break; } } - + return 0; } else @@ -1610,23 +1610,23 @@ next_insn: /* Make further checkings (such that couldn't be made earlier). Warn the user if necessary. */ warn_if_needed (insn); - + /* Check whether we need to adjust the instruction pointer. */ if (adjust_if_needed (insn)) - /* If instruction pointer was adjusted, we need to update + /* If instruction pointer was adjusted, we need to update the size of the current template operands. */ GET_CURRENT_SIZE; for (i = 0; i < insn->nargs; i++) { - int j = instruction->flags & REVERSE_MATCH ? - i == 0 ? 1 : - i == 1 ? 0 : i : + int j = instruction->flags & REVERSE_MATCH ? + i == 0 ? 1 : + i == 1 ? 0 : i : i; /* This time, update constant value before printing it. */ - if ((insn->arg[j].X_op == O_constant) - && (check_range (&insn->arg[j].constant, cur_size[j], + if ((insn->arg[j].X_op == O_constant) + && (check_range (&insn->arg[j].constant, cur_size[j], cur_flags[j], 1) != OP_LEGAL)) as_fatal (_("Illegal operand (arg %d)"), j+1); } @@ -1637,7 +1637,7 @@ next_insn: for (i = 0; i < insn->nargs; i++) { cur_arg_num = i; - print_operand (cur_size[i], instruction->operands[i].shift, + print_operand (cur_size[i], instruction->operands[i].shift, &insn->arg[i]); } } @@ -1651,15 +1651,15 @@ next_insn: void warn_if_needed (ins *insn) { - /* If the post-increment address mode is used and the load/store - source register is the same as rbase, the result of the + /* If the post-increment address mode is used and the load/store + source register is the same as rbase, the result of the instruction is undefined. */ if (IS_INSN_TYPE (LD_STOR_INS_INC)) { /* Enough to verify that one of the arguments is a simple reg. */ if ((insn->arg[0].type == arg_r) || (insn->arg[1].type == arg_r)) if (insn->arg[0].r == insn->arg[1].r) - as_bad (_("Same src/dest register is used (`r%d'), result is undefined"), + as_bad (_("Same src/dest register is used (`r%d'), result is undefined"), insn->arg[0].r); } @@ -1671,17 +1671,17 @@ warn_if_needed (ins *insn) as_bad (_("`%s' has undefined result"), ins_parse); } - /* If the rptr register is specified as one of the registers to be loaded, + /* If the rptr register is specified as one of the registers to be loaded, the final contents of rptr are undefined. Thus, we issue an error. */ if (instruction->flags & NO_RPTR) { if ((1 << getreg_image (insn->arg[0].r)) & insn->arg[1].constant) - as_bad (_("Same src/dest register is used (`r%d'), result is undefined"), + as_bad (_("Same src/dest register is used (`r%d'), result is undefined"), getreg_image (insn->arg[0].r)); } } -/* In some cases, we need to adjust the instruction pointer although a +/* In some cases, we need to adjust the instruction pointer although a match was already found. Here, we gather all these cases. Returns 1 if instruction pointer was adjusted, otherwise 0. */ @@ -1705,7 +1705,7 @@ adjust_if_needed (ins *insn) } } - /* Optimization: Omit a zero displacement in bit operations, + /* Optimization: Omit a zero displacement in bit operations, saving 2-byte encoding space (e.g., 'cbitw $8, 0(r1)'). */ if (IS_INSN_TYPE (CSTBIT_INS)) { @@ -1792,7 +1792,7 @@ preprocess_reglist (char *param, int *allocated) { if (((cr = get_copregister (reg_name)) == nullcopregister) || (crx_copregtab[cr-MAX_REG].type != CRX_CS_REGTYPE)) - as_fatal (_("Illegal register `%s' in cop-special-register list"), + as_fatal (_("Illegal register `%s' in cop-special-register list"), reg_name); mask_reg (getreg_image (cr - cs0), &mask); } @@ -1812,8 +1812,8 @@ preprocess_reglist (char *param, int *allocated) else if (((r = get_register (reg_name)) == nullregister) || (crx_regtab[r].type != CRX_U_REGTYPE)) as_fatal (_("Illegal register `%s' in user register list"), reg_name); - - mask_reg (getreg_image (r - u0), &mask); + + mask_reg (getreg_image (r - u0), &mask); } /* General purpose register r. */ else diff --git a/gas/config/tc-crx.h b/gas/config/tc-crx.h index 65f86bc474..c1eaa6b032 100644 --- a/gas/config/tc-crx.h +++ b/gas/config/tc-crx.h @@ -58,7 +58,7 @@ extern int crx_force_relocation (struct fix *); #define DWARF2_LINE_MIN_INSN_LENGTH 2 /* This is called by emit_expr when creating a reloc for a cons. - We could use the definition there, except that we want to handle + We could use the definition there, except that we want to handle the CRX reloc type specially, rather than the BFD_RELOC type. */ #define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP, RELOC) \ (void) RELOC, \ @@ -68,7 +68,7 @@ extern int crx_force_relocation (struct fix *); : LEN == 4 ? BFD_RELOC_CRX_NUM32 \ : BFD_RELOC_NONE); -/* Give an error if a frag containing code is not aligned to a 2-byte +/* Give an error if a frag containing code is not aligned to a 2-byte boundary. */ #define md_frag_check(FRAGP) \ if ((FRAGP)->has_code \ diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c index da962db0d3..a0a6021b0e 100644 --- a/gas/config/tc-dlx.c +++ b/gas/config/tc-dlx.c @@ -803,7 +803,7 @@ machine_ip (char *str) continue; } - the_insn.reloc = (the_insn.HI) ? RELOC_DLX_HI16 + the_insn.reloc = (the_insn.HI) ? RELOC_DLX_HI16 : (the_insn.LO ? RELOC_DLX_LO16 : RELOC_DLX_16); the_insn.reloc_offset = 2; the_insn.size = 2; diff --git a/gas/config/tc-frv.c b/gas/config/tc-frv.c index 0bec23219a..0ca1a6e8b4 100644 --- a/gas/config/tc-frv.c +++ b/gas/config/tc-frv.c @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ #include "as.h" -#include "subsegs.h" +#include "subsegs.h" #include "symcat.h" #include "opcodes/frv-desc.h" #include "opcodes/frv-opc.h" @@ -60,7 +60,7 @@ enum vliw_insn_type VLIW_BRANCH_HAS_NOPS /* A Branch that requires NOPS. */ }; -/* We're going to use these in the fr_subtype field to mark +/* We're going to use these in the fr_subtype field to mark whether to keep inserted nops. */ #define NOP_KEEP 1 /* Keep these NOPS. */ @@ -115,7 +115,7 @@ static struct vliw_insn_list *current_vliw_insn; const char comment_chars[] = ";"; const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "!"; +const char line_separator_chars[] = "!"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; @@ -477,14 +477,14 @@ md_show_usage (FILE * stream) fprintf (stream, _(" Record the cpu type\n")); fprintf (stream, _("-mtomcat-stats Print out stats for tomcat workarounds\n")); fprintf (stream, _("-mtomcat-debug Debug tomcat workarounds\n")); -} +} void md_begin (void) { /* Initialize the `cgen' interface. */ - + /* Set the machine number and endian. */ gas_cgen_cpu_desc = frv_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0, CGEN_CPU_OPEN_ENDIAN, @@ -559,26 +559,26 @@ frv_insert_vliw_insn (bfd_boolean count) } /* Identify the following cases: - + 1) A VLIW insn that contains both a branch and the branch destination. This requires the insertion of two vliw instructions before the branch. The first consists of two nops. The second consists of a single nop. - + 2) A single instruction VLIW insn which is the destination of a branch that is in the next VLIW insn. This requires the insertion of a vliw insn containing two nops before the branch. - + 3) A double instruction VLIW insn which contains the destination of a branch that is in the next VLIW insn. This requires the insertion of a VLIW insn containing a single nop before the branch. - + 4) A single instruction VLIW insn which contains branch destination (x), followed by a single instruction VLIW insn which does not contain the branch to (x), followed by a VLIW insn which does contain the branch to (x). This requires the insertion of a VLIW insn containing a single nop before the VLIW instruction containing the branch. - + */ #define FRV_IS_NOP(insn) (insn.buffer[0] == FRV_NOP_PACK || insn.buffer[0] == FRV_NOP_NOPACK) #define FRV_NOP_PACK 0x00880000 /* ori.p gr0,0,gr0 */ @@ -611,11 +611,11 @@ enum vliw_nop_type { /* A Vliw insn containing a single nop insn. */ VLIW_SINGLE_NOP, - + /* A Vliw insn containing two nop insns. */ VLIW_DOUBLE_NOP, - /* Two vliw insns. The first containing two nop insns. + /* Two vliw insns. The first containing two nop insns. The second contain a single nop insn. */ VLIW_DOUBLE_THEN_SINGLE_NOP }; @@ -697,7 +697,7 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type, pack_prev = TRUE; prev_insn = curr_insn; curr_insn = curr_insn->next; - } + } while (curr_vliw && curr_vliw != vliw_to_split) { @@ -736,10 +736,10 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type, frv_adjust_vliw_count (second_part); single_nop->next = second_part; - + vliw_to_split->next = single_nop; prev_insn->next = NULL; - + return_me = second_part; frv_adjust_vliw_count (vliw_to_split); } @@ -773,13 +773,13 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type, second_part->insn_list->type = VLIW_BRANCH_HAS_NOPS; second_part->next = vliw_to_split->next; frv_adjust_vliw_count (second_part); - + double_nop->next = second_part; - + vliw_to_split->next = single_nop; prev_insn->next = NULL; frv_adjust_vliw_count (vliw_to_split); - + return_me = second_part; } break; @@ -799,7 +799,7 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type, prev_vliw->next = double_nop; else vliw_chain_top = double_nop; - + single_nop->next = vliw_to_split; return_me = vliw_to_split; vliw_to_split->insn_list->type = VLIW_BRANCH_HAS_NOPS; @@ -814,7 +814,7 @@ frv_tomcat_shuffle (enum vliw_nop_type this_nop_type, } /* The branch is in the middle of this vliw insn. Split into first and - second parts. Insert the nop vliws in between. */ + second parts. Insert the nop vliws in between. */ second_part->insn_list = insert_before_insn; second_part->insn_list->type = VLIW_BRANCH_HAS_NOPS; second_part->next = vliw_to_split->next; @@ -881,7 +881,7 @@ workaround_top: tomcat_doubles++; goto workaround_top; } - else if (vliw2 + else if (vliw2 && vliw2->insn_count == 1 && (temp_insn = frv_find_in_vliw (VLIW_BRANCH_TYPE, vliw3, vliw1->insn_list->sym)) != NULL) { @@ -1000,7 +1000,7 @@ fr550_check_insn_acc_range (frv_insn *insn, int low, int hi) case FRV_INSN_CMQMULHU: case FRV_INSN_MMACHS: case FRV_INSN_MMRDHS: - case FRV_INSN_CMMACHS: + case FRV_INSN_CMMACHS: case FRV_INSN_MQMACHS: case FRV_INSN_CMQMACHS: case FRV_INSN_MQXMACHS: @@ -1102,13 +1102,13 @@ md_assemble (char *str) insn.insn = frv_cgen_assemble_insn (gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, &errmsg); - + if (!insn.insn) { as_bad ("%s", errmsg); return; } - + /* If the cpu is tomcat, then we need to insert nops to workaround hardware limitations. We need to keep track of each vliw unit and examine the length of the unit and the individual insns @@ -1118,7 +1118,7 @@ md_assemble (char *str) { /* If we've just finished a VLIW insn OR this is a branch, then start up a new frag. Fill it with nops. We will get rid - of those that are not required after we've seen all of the + of those that are not required after we've seen all of the instructions but before we start resolving fixups. */ if ( !FRV_IS_NOP (insn) && (frv_is_branch_insn (insn.insn) || insn.fields.f_pack)) @@ -1206,14 +1206,14 @@ md_assemble (char *str) previous_vliw_chain = current_vliw_chain; current_vliw_chain = NULL; current_vliw_insn = NULL; - } + } } } /* The syntax in the manual says constants begin with '#'. We just ignore it. */ -void +void md_operand (expressionS *expressionP) { if (* input_line_pointer == '#') @@ -1275,8 +1275,8 @@ md_estimate_size_before_relax (fragS *fragP, segT segment ATTRIBUTE_UNUSED) default: case NOP_DELETE: return 0; - } -} + } +} /* *fragP has been relaxed to its final size, and now needs to have the bytes inside it modified to conform to the new size. @@ -1299,7 +1299,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, case NOP_KEEP: fragP->fr_fix = fragP->fr_var; fragP->fr_var = 0; - return; + return; } } @@ -1369,7 +1369,7 @@ md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED, case FRV_OPERAND_U12: return BFD_RELOC_FRV_GPRELU12; - default: + default: break; } return BFD_RELOC_NONE; @@ -1593,7 +1593,7 @@ frv_pic_ptr (int nbytes) do { bfd_reloc_code_real_type reloc_type = BFD_RELOC_CTOR; - + if (strncasecmp (input_line_pointer, "funcdesc(", 9) == 0) { input_line_pointer += 9; @@ -1808,7 +1808,7 @@ frv_frob_label (symbolS *this_label) vliw_insn_list_entry = frv_insert_vliw_insn(DONT_COUNT); vliw_insn_list_entry->type = VLIW_LABEL_TYPE; - vliw_insn_list_entry->sym = this_label; + vliw_insn_list_entry->sym = this_label; } fixS * @@ -1828,6 +1828,6 @@ frv_cgen_record_fixup_exp (fragS *frag, && current_vliw_insn->type == VLIW_BRANCH_TYPE && exp != NULL) current_vliw_insn->sym = exp->X_add_symbol; - + return fixP; } diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c index 9ff813809b..9609f2b0c9 100644 --- a/gas/config/tc-h8300.c +++ b/gas/config/tc-h8300.c @@ -251,7 +251,7 @@ md_begin (void) prev_buffer[0] = 0; nopcodes = sizeof (h8_opcodes) / sizeof (struct h8_opcode); - + h8_instructions = (struct h8_instruction *) xmalloc (nopcodes * sizeof (struct h8_instruction)); @@ -398,36 +398,36 @@ parse_reg (char *src, op_type *mode, unsigned int *reg, int direction) *reg = 7; return len; } - if (len == 3 && - TOLOWER (src[0]) == 'c' && - TOLOWER (src[1]) == 'c' && + if (len == 3 && + TOLOWER (src[0]) == 'c' && + TOLOWER (src[1]) == 'c' && TOLOWER (src[2]) == 'r') { *mode = CCR; *reg = 0; return len; } - if (len == 3 && - TOLOWER (src[0]) == 'e' && - TOLOWER (src[1]) == 'x' && + if (len == 3 && + TOLOWER (src[0]) == 'e' && + TOLOWER (src[1]) == 'x' && TOLOWER (src[2]) == 'r') { *mode = EXR; *reg = 1; return len; } - if (len == 3 && - TOLOWER (src[0]) == 'v' && - TOLOWER (src[1]) == 'b' && + if (len == 3 && + TOLOWER (src[0]) == 'v' && + TOLOWER (src[1]) == 'b' && TOLOWER (src[2]) == 'r') { *mode = VBR; *reg = 6; return len; } - if (len == 3 && - TOLOWER (src[0]) == 's' && - TOLOWER (src[1]) == 'b' && + if (len == 3 && + TOLOWER (src[0]) == 's' && + TOLOWER (src[1]) == 'b' && TOLOWER (src[2]) == 'r') { *mode = SBR; @@ -621,7 +621,7 @@ get_operand (char **ptr, struct h8_op *op, int direction) /* Gross. Gross. ldm and stm have a format not easily handled by get_operand. We deal with it explicitly here. */ - if (TOLOWER (src[0]) == 'e' && TOLOWER (src[1]) == 'r' && + if (TOLOWER (src[0]) == 'e' && TOLOWER (src[1]) == 'r' && ISDIGIT (src[2]) && src[3] == '-' && TOLOWER (src[4]) == 'e' && TOLOWER (src[5]) == 'r' && ISDIGIT (src[6])) { @@ -764,7 +764,7 @@ get_operand (char **ptr, struct h8_op *op, int direction) } if (mode && src[len + 2] == ',' - && TOLOWER (src[len + 3]) != 'p' + && TOLOWER (src[len + 3]) != 'p' && TOLOWER (src[len + 4]) != 'c' && src[len + 5] != ')') { @@ -878,9 +878,9 @@ get_operand (char **ptr, struct h8_op *op, int direction) *ptr = parse_exp (src + 1, op); return; } - else if (strncmp (src, "mach", 4) == 0 || + else if (strncmp (src, "mach", 4) == 0 || strncmp (src, "macl", 4) == 0 || - strncmp (src, "MACH", 4) == 0 || + strncmp (src, "MACH", 4) == 0 || strncmp (src, "MACL", 4) == 0) { op->reg = TOLOWER (src[3]) == 'l'; @@ -979,7 +979,7 @@ get_mova_operands (char *op_end, struct h8_op *operand) } else if ((operand[1].mode & MODE) == LOWREG) { - switch (operand[1].mode & SIZE) + switch (operand[1].mode & SIZE) { case L_8: operand[0].mode = (operand[0].mode & ~MODE) | INDEXB; @@ -1483,12 +1483,12 @@ build_bytes (const struct h8_instruction *this_try, struct h8_op *operand) if (!Hmode && this_try->opcode->available != AV_H8) as_warn (_("Opcode `%s' with these operand types not available in H8/300 mode"), this_try->opcode->name); - else if (!Smode - && this_try->opcode->available != AV_H8 + else if (!Smode + && this_try->opcode->available != AV_H8 && this_try->opcode->available != AV_H8H) as_warn (_("Opcode `%s' with these operand types not available in H8/300H mode"), this_try->opcode->name); - else if (!SXmode + else if (!SXmode && this_try->opcode->available != AV_H8 && this_try->opcode->available != AV_H8H && this_try->opcode->available != AV_H8S) @@ -1748,7 +1748,7 @@ build_bytes (const struct h8_instruction *this_try, struct h8_op *operand) /* To be compatible with the proposed H8 ELF format, we want the relocation's offset to point to the first byte that will be modified, not to the start of the instruction. */ - + if ((operand->mode & SIZE) == L_32) { where = 2; @@ -1760,8 +1760,8 @@ build_bytes (const struct h8_instruction *this_try, struct h8_op *operand) /* This jmp may be a jump or a branch. */ - check_operand (operand + i, - SXmode ? 0xffffffff : Hmode ? 0xffffff : 0xffff, + check_operand (operand + i, + SXmode ? 0xffffffff : Hmode ? 0xffffff : 0xffff, "@"); if (operand[i].exp.X_add_number & 1) @@ -1891,7 +1891,7 @@ fix_operand_size (struct h8_op *operand, int size) is safe. get_specific() will relax L_24 into L_32 where necessary. */ if (Hmode - && !Nmode + && !Nmode && ((((addressT) operand->exp.X_add_number + 0x8000) & 0xffffffff) > 0xffff || operand->exp.X_add_symbol != 0 diff --git a/gas/config/tc-i370.c b/gas/config/tc-i370.c index f9d49acebb..6993f7900d 100644 --- a/gas/config/tc-i370.c +++ b/gas/config/tc-i370.c @@ -1185,7 +1185,7 @@ i370_elf_validate_fix (fixS *fixp, segT seg) waste space padding out to alignments. The four pointers longlong_poolP, word_poolP, etc. point to a symbol labeling the start of each pool part. - + lit_pool_num increments from zero to infinity and uniquely id's -- its used to generate the *_poolP symbol name. */ diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 2bdb7699be..6c910ed11c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -797,7 +797,7 @@ static const arch_entry cpu_arch[] = { STRING_COMMA_LEN ("bdver4"), PROCESSOR_BD, CPU_BDVER4_FLAGS, 0, 0 }, { STRING_COMMA_LEN ("znver1"), PROCESSOR_ZNVER, - CPU_ZNVER1_FLAGS, 0, 0 }, + CPU_ZNVER1_FLAGS, 0, 0 }, { STRING_COMMA_LEN ("btver1"), PROCESSOR_BT, CPU_BTVER1_FLAGS, 0, 0 }, { STRING_COMMA_LEN ("btver2"), PROCESSOR_BT, diff --git a/gas/config/tc-i860.c b/gas/config/tc-i860.c index e3a0bdf355..919ee0061a 100644 --- a/gas/config/tc-i860.c +++ b/gas/config/tc-i860.c @@ -90,7 +90,7 @@ static void s_enddual (int); static void s_atmp (int); static void s_align_wrapper (int); static int i860_get_expression (char *); -static bfd_reloc_code_real_type obtain_reloc_for_imm16 (fixS *, long *); +static bfd_reloc_code_real_type obtain_reloc_for_imm16 (fixS *, long *); #ifdef DEBUG_I860 static void print_insn (struct i860_it *); #endif @@ -173,7 +173,7 @@ s_atmp (int ignore ATTRIBUTE_UNUSED) } /* Handle ".align" directive depending on syntax mode. - AT&T/SVR4 syntax uses the standard align directive. However, + AT&T/SVR4 syntax uses the standard align directive. However, the Intel syntax additionally allows keywords for the alignment parameter: ".align type", where type is one of {.short, .long, .quad, .single, .double} representing alignments of 2, 4, @@ -197,7 +197,7 @@ s_align_wrapper (int arg) strncpy (parm, " 4", 7); else if (strncmp (parm, ".double", 7) == 0) strncpy (parm, " 8", 7); - + while (*input_line_pointer == ' ') ++input_line_pointer; } @@ -895,7 +895,7 @@ i860_process_insn (char *str) the_insn.expand = insn->expand; fc++; - + continue; } else @@ -1482,7 +1482,7 @@ void i860_check_label (symbolS *labelsym) { /* At this point, the current line pointer is sitting on the character - just after the first colon on the label. */ + just after the first colon on the label. */ if (target_intel_syntax && *input_line_pointer == ':') { S_SET_EXTERNAL (labelsym); diff --git a/gas/config/tc-i960.c b/gas/config/tc-i960.c index cd140fee31..6321791aa4 100644 --- a/gas/config/tc-i960.c +++ b/gas/config/tc-i960.c @@ -564,7 +564,7 @@ get_cdisp (char *dispP, /* Displacement as specified in source instruction. */ int numbits, /* # bits of displacement (13 for COBR, 24 for CTRL). */ int var_frag,/* 1 if varying length code fragment should be emitted; 0 if an address fix should be emitted. */ - int callj) /* 1 if callj relocation should be done; else 0. */ + int callj) /* 1 if callj relocation should be done; else 0. */ { expressionS e; /* Parsed expression. */ fixS *fixP; /* Structure describing needed address fix. */ @@ -802,7 +802,7 @@ parse_regop (struct regop *regopP, /* Where to put description of register opera } /* get_ispec: parse a memory operand for an index specification - + Here, an "index specification" is taken to be anything surrounded by square brackets and NOT followed by anything else. @@ -811,7 +811,7 @@ parse_regop (struct regop *regopP, /* Where to put description of register opera static char * get_ispec (char *textP) /* Pointer to memory operand from source instruction, no white space. */ - + { /* Points to start of index specification. */ char *start; @@ -1258,7 +1258,7 @@ parse_ldconst (char *arg[]) /* See above. */ ldconst 64, -> shlo 8,3, ldconst -1, -> subo 1,0, ldconst -31, -> subo 31,0, - + Anything else becomes: lda xxx,. */ n = offs (e); @@ -2287,7 +2287,7 @@ parse_po (int po_num) /* Pseudo-op number: currently S_LEAFPROC or S_SYSPROC. passed fixup structure. */ int -reloc_callj (fixS *fixP) /* Relocation that can be done at assembly time. */ +reloc_callj (fixS *fixP) /* Relocation that can be done at assembly time. */ { /* Points to the binary for the instruction being relocated. */ char *where; diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index f3c4120011..d11570a9f1 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -829,7 +829,7 @@ ar_is_only_in_integer_unit (int reg) return reg >= 64 && reg <= 111; } -/* Determine if application register REGNUM resides only in the memory +/* Determine if application register REGNUM resides only in the memory unit (as opposed to the integer unit). */ static int ar_is_only_in_memory_unit (int reg) @@ -3687,7 +3687,7 @@ generate_unwind_image (const segT text_seg) /* Set expression which points to start of unwind descriptor area. */ unwind.info = expr_build_dot (); - + frag_var (rs_machine_dependent, size, size, 0, 0, (offsetT) (long) unwind.personality_routine, (char *) list); @@ -6009,10 +6009,10 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) if (e->X_op == O_constant) { /* 5-bit signed scaled by 64 */ - if ((e->X_add_number <= ( 0xf << 6 )) + if ((e->X_add_number <= ( 0xf << 6 )) && (e->X_add_number >= -( 0x10 << 6 ))) { - + /* Must be a multiple of 64 */ if ((e->X_add_number & 0x3f) != 0) as_warn (_("stride must be a multiple of 64; lower 6 bits ignored")); @@ -6028,7 +6028,7 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) if (e->X_op == O_constant) { /* 6-bit unsigned biased by 1 -- count 0 is meaningless */ - if ((e->X_add_number <= 64) + if ((e->X_add_number <= 64) && (e->X_add_number > 0) ) { return OPERAND_MATCH; @@ -6143,7 +6143,7 @@ parse_operands (struct ia64_opcode *idesc) for (; ; ++i) { - if (i < NELEMS (CURR_SLOT.opnd)) + if (i < NELEMS (CURR_SLOT.opnd)) { sep = parse_operand_maybe_eval (CURR_SLOT.opnd + i, '=', idesc->operands[i]); @@ -7011,7 +7011,7 @@ emit_one_bundle (void) as_bad_where (md.slot[curr].src_file, md.slot[curr].src_line, _("Missing '}' at end of file")); } - + know (md.num_slots_in_use < NUM_SLOTS); t0 = end_of_insn_group | (template_val << 1) | (insn[0] << 5) | (insn[1] << 46); @@ -9653,7 +9653,7 @@ update_qp_mutex (valueT mask) print_prmask (qp_mutexes[i].prmask); fprintf (stderr, "\n"); } - + /* Deal with the old mutex with more than 3+ PRs only if the new mutex on the same execution path with it. @@ -9666,7 +9666,7 @@ update_qp_mutex (valueT mask) if (add == 0 && (qp_mutexes[i].prmask & mask) == mask) add = 1; - + qp_mutexes[i].prmask &= ~mask; if (qp_mutexes[i].prmask & (qp_mutexes[i].prmask - 1)) { @@ -9676,7 +9676,7 @@ update_qp_mutex (valueT mask) i++; } } - + if (keep == 0) /* Remove the mutex. */ qp_mutexes[i] = qp_mutexes[--qp_mutexeslen]; @@ -10797,7 +10797,7 @@ md_assemble (char *str) { enum ia64_opnd opnd1, opnd2; int rop; - + opnd1 = idesc->operands[0]; opnd2 = idesc->operands[1]; if (opnd1 == IA64_OPND_AR3) @@ -11700,7 +11700,7 @@ ia64_handle_align (fragS *fragp) bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix; p = fragp->fr_literal + fragp->fr_fix; - /* If no paddings are needed, we check if we need a stop bit. */ + /* If no paddings are needed, we check if we need a stop bit. */ if (!bytes && fragp->tc_frag_data) { if (fragp->fr_fix < 16) @@ -11881,7 +11881,7 @@ dot_alias (int section) h = (struct alias *) xmalloc (sizeof (struct alias)); as_where (&h->file, &h->line); h->name = name; - + error_string = hash_jam (ahash, alias, (void *) h); if (error_string) { @@ -12001,7 +12001,7 @@ ia64_vms_note (void) bname = xstrdup (lbasename (out_file_name)); if ((p = strrchr (bname, '.'))) *p = '\0'; - + /* VMS note header is 24 bytes long. */ p = frag_more (8 + 8 + 8); number_to_chars_littleendian (p + 0, 8, 8); diff --git a/gas/config/tc-ip2k.c b/gas/config/tc-ip2k.c index 788a86328b..4f4cffe593 100644 --- a/gas/config/tc-ip2k.c +++ b/gas/config/tc-ip2k.c @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ #include "as.h" -#include "subsegs.h" +#include "subsegs.h" #include "symcat.h" #include "opcodes/ip2k-desc.h" #include "opcodes/ip2k-opc.h" @@ -52,7 +52,7 @@ ip2k_insn; const char comment_chars[] = ";"; const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; +const char line_separator_chars[] = ""; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; @@ -119,7 +119,7 @@ enum options OPTION_CPU_IP2022EXT }; -struct option md_longopts[] = +struct option md_longopts[] = { { "mip2022", no_argument, NULL, OPTION_CPU_IP2022 }, { "mip2022ext", no_argument, NULL, OPTION_CPU_IP2022EXT }, @@ -164,7 +164,7 @@ void md_begin (void) { /* Initialize the `cgen' interface. */ - + /* Set the machine number and endian. */ gas_cgen_cpu_desc = ip2k_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, ip2k_mach_bitmask, @@ -247,7 +247,7 @@ md_estimate_size_before_relax (fragS * fragP ATTRIBUTE_UNUSED, { as_fatal (_("relaxation not supported\n")); return 1; -} +} /* *fragP has been relaxed to its final size, and now needs to have @@ -420,7 +420,7 @@ ip2k_elf_section_flags (flagword flags, word alignment should be forced. */ if (flags & SEC_CODE) force_code_align = 1; - + return flags; } diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c index f7b70a4893..2c8136be59 100644 --- a/gas/config/tc-m32c.c +++ b/gas/config/tc-m32c.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #include "as.h" -#include "subsegs.h" +#include "subsegs.h" #include "symcat.h" #include "opcodes/m32c-desc.h" #include "opcodes/m32c-opc.h" @@ -141,7 +141,7 @@ void md_show_usage (FILE * stream) { fprintf (stream, _(" M32C specific command line options:\n")); -} +} static void s_bss (int ignore ATTRIBUTE_UNUSED) @@ -261,21 +261,21 @@ m32c_indirect_operand (char *str) if (s[0] == '[' && s[1] == '[') indirection[operand] = relative; } - + if (indirection[1] == none && indirection[2] == none) return FALSE; - + operand = 1; ns_len = strlen (str); new_str = (char*) xmalloc (ns_len); ns = new_str; ns_end = ns + ns_len; - + for (s = str; *s; s++) { if (s[0] == ',') operand = 2; - + if (s[0] == '[' && ! brace_n[operand]) { brace_n[operand] += 1; @@ -283,7 +283,7 @@ m32c_indirect_operand (char *str) if (indirection[operand] != none) continue; } - + else if (s[0] == '[' && brace_n[operand]) { brace_n[operand] += 1; @@ -315,7 +315,7 @@ m32c_indirect_operand (char *str) { fprintf (stderr, "Unmatched [[operand-%d]] %d\n", operand, brace_n[operand]); } - + if (indirection[1] != none && indirection[2] != none) md_assemble ("src-dest-indirect"); else if (indirection[1] != none) @@ -345,7 +345,7 @@ md_assemble (char * str) insn.insn = m32c_cgen_assemble_insn (gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg); - + if (!insn.insn) { as_bad ("%s", errmsg); @@ -398,7 +398,7 @@ md_assemble (char * str) /* The syntax in the manual says constants begin with '#'. We just ignore it. */ -void +void md_operand (expressionS * exp) { /* In case of a syntax error, escape back to try next syntax combo. */ @@ -595,7 +595,7 @@ md_estimate_size_before_relax (fragS * fragP, segT segment ATTRIBUTE_UNUSED) } return subtype_mappings[fragP->fr_subtype].bytes - (fragP->fr_fix - where); -} +} /* *fragP has been relaxed to its final size, and now needs to have the bytes inside it modified to conform to the new size. @@ -1063,9 +1063,9 @@ tc_gen_reloc (asection *sec, fixS *fx) || fx->fx_r_type == BFD_RELOC_M32C_RL_2ADDR) { arelent * reloc; - + reloc = xmalloc (sizeof (* reloc)); - + reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); *reloc->sym_ptr_ptr = symbol_get_bfdsym (fx->fx_addsy); reloc->address = fx->fx_frag->fr_address + fx->fx_where; diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c index b080f9e1b0..38da4b5068 100644 --- a/gas/config/tc-m32r.c +++ b/gas/config/tc-m32r.c @@ -2198,9 +2198,9 @@ tc_gen_reloc (asection * section, fixS * fixP) { arelent * reloc; bfd_reloc_code_real_type code; - + reloc = xmalloc (sizeof (* reloc)); - + reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy); reloc->address = fixP->fx_frag->fr_address + fixP->fx_where; @@ -2215,7 +2215,7 @@ tc_gen_reloc (asection * section, fixS * fixP) bfd_set_error (bfd_error_bad_value); } } - + code = fixP->fx_r_type; if (pic_code) { @@ -2267,7 +2267,7 @@ printf("%s",bfd_get_reloc_code_name(code)); printf(" => %s",bfd_get_reloc_code_name(code)); #endif } - + reloc->howto = bfd_reloc_type_lookup (stdoutput, code); #ifdef DEBUG_PIC @@ -2281,7 +2281,7 @@ printf(" => %s\n",reloc->howto->name); fixP->fx_r_type, bfd_get_reloc_code_name (code)); return NULL; } - + /* Use fx_offset for these cases. */ if ( fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT @@ -2299,7 +2299,7 @@ printf(" => %s\n",reloc->howto->name); reloc->addend = fixP->fx_offset; else reloc->addend = fixP->fx_addnumber; - + return reloc; } diff --git a/gas/config/tc-m32r.h b/gas/config/tc-m32r.h index 1114c3075d..6f350e1019 100644 --- a/gas/config/tc-m32r.h +++ b/gas/config/tc-m32r.h @@ -108,7 +108,7 @@ extern void m32r_elf_section_change_hook (void); #define md_flush_pending_output() m32r_flush_pending_output () extern void m32r_flush_pending_output (void); - + #define elf_tc_final_processing m32r_elf_final_processing extern void m32r_elf_final_processing (void); diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c index a12d106b1e..a2aa4240e7 100644 --- a/gas/config/tc-m68hc11.c +++ b/gas/config/tc-m68hc11.c @@ -2141,8 +2141,8 @@ build_indexed_byte (operand *op, int format ATTRIBUTE_UNUSED, int move_insn) if (!check_range (val, M6812_OP_IDX)) as_bad (_("Offset out of 16-bit range: %ld."), val); - if (move_insn && !(val >= -16 && val <= 15) - && ((!(mode & M6812_OP_IDX) && !(mode & M6812_OP_D_IDX_2)) + if (move_insn && !(val >= -16 && val <= 15) + && ((!(mode & M6812_OP_IDX) && !(mode & M6812_OP_D_IDX_2)) || !(current_architecture & cpu9s12x))) { as_bad (_("Offset out of 5-bit range for movw/movb insn: %ld."), @@ -2420,7 +2420,7 @@ build_insn_xg (struct m68hc11_opcode *opcode, f = m68hc11_new_insn (1); number_to_chars_bigendian (f, opcode->opcode >> 8, 1); /* High byte. */ fixup8_xg (&operands[0].exp, format, M68XG_OP_REL9); - } + } else if (format & M68XG_OP_REL10) { f = m68hc11_new_insn (1); @@ -2949,7 +2949,7 @@ md_assemble (char *str) } else as_bad ("No opcode found\n"); - + return; } else @@ -2973,7 +2973,7 @@ md_assemble (char *str) { opcode_local.opcode |= (operands[0].exp.X_add_number); operands[0].mode = M68XG_OP_IMM3; - + opcode = find (opc, operands, 1); if (opcode) { @@ -3067,7 +3067,7 @@ md_assemble (char *str) if (opc->format & (M68XG_OP_REL9 | M68XG_OP_REL10)) { - opcode_local.format = opc->format; + opcode_local.format = opc->format; input_line_pointer = skip_whites (input_line_pointer); expression (&operands[0].exp); if (operands[0].exp.X_op == O_illegal) @@ -3093,12 +3093,12 @@ md_assemble (char *str) if ((*input_line_pointer == '\n') || (*input_line_pointer == '\r') || (*input_line_pointer == '\0')) return; /* nothing left */ - + if (*input_line_pointer == '#') { as_bad ("No register specified before hash\n"); return; - } + } /* first operand is expected to be a register */ if ((*input_line_pointer == 'R') || (*input_line_pointer == 'r')) @@ -3165,12 +3165,12 @@ md_assemble (char *str) if (opcode) opcode_local.opcode = opcode->opcode | (operands[0].reg1 << 8); - + if (operands[0].exp.X_op != O_constant) as_bad ("Only constants supported at for IMM4 mode\n"); else { - if (check_range + if (check_range (operands[0].exp.X_add_number,M68XG_OP_R_IMM4)) opcode_local.opcode |= (operands[0].exp.X_add_number << 4); @@ -3226,7 +3226,7 @@ md_assemble (char *str) com RD, RS alias for xnor RD,R0,RS mov RD, RS alias for or RD, R0, RS neg RD, RS alias for sub RD, R0, RS */ - opcode_local.opcode = opcode->opcode + opcode_local.opcode = opcode->opcode | (operands[0].reg1 << 8) | (operands[1].reg1 << 2); } else if ((strncmp (opc->opcode->name, "cmp",3) == 0) @@ -3235,7 +3235,7 @@ md_assemble (char *str) /* special cases for: cmp RS1, RS2 alias for sub R0, RS1, RS2 cpc RS1, RS2 alias for sbc R0, RS1, RS2 */ - opcode_local.opcode = opcode->opcode + opcode_local.opcode = opcode->opcode | (operands[0].reg1 << 5) | (operands[1].reg1 << 2); } else @@ -3277,7 +3277,7 @@ md_assemble (char *str) opcode = find (opc, operands, 1); if (opcode) { - opcode_local.opcode = opcode->opcode + opcode_local.opcode = opcode->opcode | (operands[0].reg1 << 8) | (operands[1].reg1 << 5) | (operands[2].reg1 << 2); opcode_local.format = M68XG_OP_NONE; @@ -3314,7 +3314,7 @@ md_assemble (char *str) } input_line_pointer = skip_whites (input_line_pointer); - + if (*input_line_pointer != ',') { as_bad (_("Missing operand.")); @@ -3349,7 +3349,7 @@ md_assemble (char *str) { input_line_pointer++; } - + /* Ok so far, can only be one mode. */ opcode_local.format = M68XG_OP_R_R_OFFS5; operands[0].mode = M68XG_OP_R_R_OFFS5; @@ -4433,7 +4433,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) value); if (value >= 0) where[0] |= value; - else + else where[0] |= (0x10 | (16 + value)); break; @@ -4445,7 +4445,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) /* sign bit already in xb postbyte */ if (value >= 0) where[1] = value; - else + else where[1] = (256 + value); break; diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 443bf20e08..acfe3499d8 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -654,13 +654,13 @@ static const struct m68k_cpu m68k_cpus[] = {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52277_ctrl, "52274", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52277_ctrl, "52277", 0}, - + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5235_ctrl, "5232", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5235_ctrl, "5233", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5235_ctrl, "5234", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5235_ctrl, "5235", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5235_ctrl, "523x", 0}, - + {mcfisa_a|mcfhwdiv|mcfemac, mcf5249_ctrl, "5249", 0}, {mcfisa_a|mcfhwdiv|mcfemac, mcf5250_ctrl, "5250", 0}, {mcfisa_a|mcfhwdiv|mcfemac, mcf5253_ctrl, "5253", 0}, @@ -671,20 +671,20 @@ static const struct m68k_cpu m68k_cpus[] = {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52256", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52258", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52259", 0}, - + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5271_ctrl, "5270", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5271_ctrl, "5271", 0}, - + {mcfisa_a|mcfhwdiv|mcfmac, mcf5272_ctrl, "5272", 0}, - + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5275_ctrl, "5274", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5275_ctrl, "5275", 0}, - + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5282_ctrl, "5280", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5282_ctrl, "5281", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5282_ctrl, "5282", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5282_ctrl, "528x", 0}, - + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53011", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53012", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53013", -1}, @@ -692,18 +692,18 @@ static const struct m68k_cpu m68k_cpus[] = {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53015", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53016", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53017", 0}, - + {mcfisa_a|mcfhwdiv|mcfmac, mcf5307_ctrl, "5307", 0}, - + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5329_ctrl, "5327", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5329_ctrl, "5328", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5329_ctrl, "5329", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5329_ctrl, "532x", 0}, - + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5373_ctrl, "5372", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5373_ctrl, "5373", -1}, {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5373_ctrl, "537x", 0}, - + {mcfisa_a|mcfisa_b|mcfhwdiv|mcfmac, mcf5407_ctrl, "5407",0}, {mcfisa_a|mcfisa_c|mcfhwdiv|mcfemac|mcfusp, mcf54418_ctrl, "54410", -1}, @@ -718,7 +718,7 @@ static const struct m68k_cpu m68k_cpus[] = {mcfisa_a|mcfisa_c|mcfhwdiv|mcfemac|mcfusp, mcf54455_ctrl, "54453", -1}, {mcfisa_a|mcfisa_c|mcfhwdiv|mcfemac|mcfusp, mcf54455_ctrl, "54454", -1}, {mcfisa_a|mcfisa_c|mcfhwdiv|mcfemac|mcfusp, mcf54455_ctrl, "54455", 0}, - + {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5475_ctrl, "5470", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5475_ctrl, "5471", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5475_ctrl, "5472", -1}, @@ -726,7 +726,7 @@ static const struct m68k_cpu m68k_cpus[] = {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5475_ctrl, "5474", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5475_ctrl, "5475", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5475_ctrl, "547x", 0}, - + {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5485_ctrl, "5480", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5485_ctrl, "5481", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5485_ctrl, "5482", -1}, @@ -734,7 +734,7 @@ static const struct m68k_cpu m68k_cpus[] = {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5485_ctrl, "5484", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5485_ctrl, "5485", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcf5485_ctrl, "548x", 0}, - + {fido_a, fido_ctrl, "fidoa", 0}, {fido_a, fido_ctrl, "fido", 1}, @@ -870,7 +870,7 @@ relax_typeS md_relax_table[] = { 32767, -32768, 2, TAB (ABSTOPCREL, LONG) }, { 0, 0, 4, 0 }, { 1, 1, 0, 0 }, - + { 127, -128, 0, TAB (BRANCHBWPL, SHORT) }, { 32767, -32768, 2, TAB (BRANCHBWPL, LONG) }, { 0, 0, 10, 0 }, @@ -1998,7 +1998,7 @@ m68k_ip (char *instring) else { const enum m68k_register *rp; - + for (rp = control_regs; *rp; rp++) { if (*rp == opP->reg) @@ -2410,7 +2410,7 @@ m68k_ip (char *instring) { const struct m68k_cpu *alias; int seen_master = 0; - + if (any) APPEND (", "); any = 0; @@ -2468,7 +2468,7 @@ m68k_ip (char *instring) { int have_disp = 0; int use_pl = 0; - + /* This switch is a doozy. Watch the first step; its a big one! */ switch (s[0]) @@ -3128,7 +3128,7 @@ m68k_ip (char *instring) case 'B': tmpreg = get_num (&opP->disp, 90); - + switch (s[1]) { case 'B': @@ -3148,15 +3148,15 @@ m68k_ip (char *instring) case 'g': /* Conditional branch */ have_disp = HAVE_LONG_CALL (current_architecture); goto var_branch; - + case 'b': /* Unconditional branch */ have_disp = HAVE_LONG_BRANCH (current_architecture); use_pl = LONG_BRANCH_VIA_COND (current_architecture); goto var_branch; - + case 's': /* Unconditional subroutine */ have_disp = HAVE_LONG_CALL (current_architecture); - + var_branch: if (subs (&opP->disp) /* We can't relax it. */ #ifdef OBJ_ELF @@ -3170,7 +3170,7 @@ m68k_ip (char *instring) as_warn (_("Can't use long branches on this architecture")); goto long_branch; } - + /* This could either be a symbol, or an absolute address. If it's an absolute address, turn it into an absolute jump right here and keep it out of the @@ -3286,7 +3286,7 @@ m68k_ip (char *instring) case 'e': /* EMAC ACCx, reg/reg. */ install_operand (s[1], opP->reg - ACC); break; - + case 'E': /* Ignore it. */ break; @@ -4332,7 +4332,7 @@ md_assemble (char *str) } if (!initialized) m68k_init_arch (); - + /* In MRI mode, the instruction and operands are separated by a space. Anything following the operands is a comment. The label has already been removed. */ @@ -4625,7 +4625,7 @@ md_begin (void) slak->m_operands = ins->args; slak->m_arch = ins->arch; slak->m_opcode = ins->opcode; - + /* In most cases we can determine the number of opcode words by checking the second word of the mask. Unfortunately some instructions have 2 opcode words, but no fixed bits @@ -4641,7 +4641,7 @@ md_begin (void) else slak->m_codenum = 1; slak->m_opnum = strlen (slak->m_operands) / 2; - + if (i + 1 != m68k_numopcodes && !strcmp (ins->name, m68k_sorted_opcodes[i + 1]->name)) { @@ -7336,7 +7336,7 @@ s_m68k_cpu (int ignored ATTRIBUTE_UNUSED) ignore_rest_of_line (); return; } - + name = input_line_pointer; while (*input_line_pointer && !ISSPACE(*input_line_pointer)) input_line_pointer++; @@ -7344,7 +7344,7 @@ s_m68k_cpu (int ignored ATTRIBUTE_UNUSED) *input_line_pointer = 0; m68k_set_cpu (name, 1, 0); - + *input_line_pointer = saved_char; demand_empty_rest_of_line (); return; @@ -7364,7 +7364,7 @@ s_m68k_arch (int ignored ATTRIBUTE_UNUSED) ignore_rest_of_line (); return; } - + name = input_line_pointer; while (*input_line_pointer && *input_line_pointer != ',' && !ISSPACE (*input_line_pointer)) @@ -7389,7 +7389,7 @@ s_m68k_arch (int ignored ATTRIBUTE_UNUSED) } while (m68k_set_extension (name, 1, 0)); } - + *input_line_pointer = saved_char; demand_empty_rest_of_line (); return; @@ -7418,7 +7418,7 @@ m68k_lookup_cpu (const char *arg, const struct m68k_cpu *table, *negated = 1; } } - + /* Remove 'm' or 'mc' prefix from 68k variants. */ if (allow_m) { @@ -7658,7 +7658,7 @@ m68k_init_arch (void) } else current_architecture |= selected_cpu->arch; - + current_architecture &= ~not_current_architecture; if ((current_architecture & (cfloat | m68881)) == (cfloat | m68881)) @@ -7690,7 +7690,7 @@ m68k_init_arch (void) else current_architecture &= ~m68k_mask; } - + /* Permit m68881 specification with all cpus; those that can't work with a coprocessor could be doing emulation. */ if (current_architecture & m68851) @@ -7703,7 +7703,7 @@ m68k_init_arch (void) if (cpu_of_arch (current_architecture) < m68020 || arch_coldfire_p (current_architecture)) md_relax_table[TAB (PCINDEX, BYTE)].rlx_more = 0; - + initialized = 1; } @@ -7738,7 +7738,7 @@ md_show_usage (FILE *stream) "), m68k_extensions[i].name, m68k_extensions[i].alias > 0 ? " ColdFire" : m68k_extensions[i].alias < 0 ? " m68k" : ""); - + fprintf (stream, _("\ -l use 1 word for refs to undefined symbols [default 2]\n\ -pic, -k generate position independent code\n\ @@ -7752,7 +7752,7 @@ md_show_usage (FILE *stream) --disp-size-default-16 displacement with unknown size is 16 bits\n\ --disp-size-default-32 displacement with unknown size is 32 bits (default)\n\ ")); - + fprintf (stream, _("Architecture variants are: ")); for (i = 0; m68k_archs[i].name; i++) { @@ -7915,7 +7915,7 @@ void m68k_elf_final_processing (void) { unsigned flags = 0; - + if (arch_coldfire_fpu (current_architecture)) flags |= EF_M68K_CFV4E; /* Set file-specific flags if this is a cpu32 processor. */ @@ -7926,7 +7926,7 @@ m68k_elf_final_processing (void) else if ((cpu_of_arch (current_architecture) & m68000up) && !(cpu_of_arch (current_architecture) & m68020up)) flags |= EF_M68K_M68000; - + if (current_architecture & mcfisa_a) { static const unsigned isa_features[][2] = @@ -7948,7 +7948,7 @@ m68k_elf_final_processing (void) }; unsigned ix; unsigned pattern; - + pattern = (current_architecture & (mcfisa_a|mcfisa_aa|mcfisa_b|mcfisa_c|mcfhwdiv|mcfusp)); for (ix = 0; isa_features[ix][1]; ix++) diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c index dbb30271e1..307cacfa6f 100644 --- a/gas/config/tc-mcore.c +++ b/gas/config/tc-mcore.c @@ -1769,7 +1769,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, .align 2 0: .long disp 1: - + If the b!cond is 4 byte aligned, the literal which would go at x+4 will also be aligned. */ int first_inst = fragP->fr_fix + fragP->fr_address; diff --git a/gas/config/tc-mep.c b/gas/config/tc-mep.c index 0f20bc493f..780356f07f 100644 --- a/gas/config/tc-mep.c +++ b/gas/config/tc-mep.c @@ -508,7 +508,7 @@ md_begin () gas_cgen_initialize_saved_fixups_array(); } -/* Variant of mep_cgen_assemble_insn. Assemble insn STR of cpu CD as a +/* Variant of mep_cgen_assemble_insn. Assemble insn STR of cpu CD as a coprocessor instruction, if possible, into FIELDS, BUF, and INSN. */ static const CGEN_INSN * @@ -523,14 +523,14 @@ mep_cgen_assemble_cop_insn (CGEN_CPU_DESC cd, const char *errmsg = NULL; /* The instructions are stored in hashed lists. */ - ilist = CGEN_ASM_LOOKUP_INSN (gas_cgen_cpu_desc, + ilist = CGEN_ASM_LOOKUP_INSN (gas_cgen_cpu_desc, CGEN_INSN_MNEMONIC (pinsn)); start = str; for ( ; ilist != NULL ; ilist = CGEN_ASM_NEXT_INSN (ilist)) { const CGEN_INSN *insn = ilist->insn; - if (strcmp (CGEN_INSN_MNEMONIC (ilist->insn), + if (strcmp (CGEN_INSN_MNEMONIC (ilist->insn), CGEN_INSN_MNEMONIC (pinsn)) == 0 && MEP_INSN_COP_P (ilist->insn) && mep_cgen_insn_supported (cd, insn)) @@ -548,7 +548,7 @@ mep_cgen_assemble_cop_insn (CGEN_CPU_DESC cd, errmsg = CGEN_PARSE_FN (cd, insn) (cd, insn, & str, fields); if (errmsg != NULL) continue; - + errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf, (bfd_vma) 0); if (errmsg != NULL) @@ -612,7 +612,7 @@ mep_check_parallel32_scheduling (void) as_bad (_("core and copro insn lengths must total 32 bits.")); } else - as_bad (_("vliw group must consist of 1 core and 1 copro insn.")); + as_bad (_("vliw group must consist of 1 core and 1 copro insn.")); } else { @@ -648,15 +648,15 @@ mep_check_parallel32_scheduling (void) CGEN_INSN_VLIW32_NO_MATCHING_NOP)) as_fatal ("No valid nop."); - /* At this point we know that we have a single 16-bit insn that has - a matching nop. We have to assemble it and put it into the saved + /* At this point we know that we have a single 16-bit insn that has + a matching nop. We have to assemble it and put it into the saved insn and fixup chain arrays. */ if (insn0iscopro) { char *errmsg; mep_insn insn; - + /* Move the insn and it's fixups to the second element of the saved insns arrary and insert a 16 bit core nope into the first element. */ @@ -671,7 +671,7 @@ mep_check_parallel32_scheduling (void) /* Move the insn in element 0 to element 1 and insert the nop into element 0. Move the fixups in element 0 to - element 1 and save the current fixups to element 0. + element 1 and save the current fixups to element 0. Really there aren't any fixups at this point because we're inserting a nop but we might as well be general so that if there's ever a need to insert a general insn, we'll @@ -818,7 +818,7 @@ mep_check_parallel64_scheduling (void) nop has been added, then make the necessary changes and handle its assembly and insertion here. Otherwise, go figure out why either: - + 1. The assembler thinks that there is a 32-bit core nop to match a 32-bit coprocessor insn, or 2. The assembler thinks that there is a 48-bit core nop @@ -835,7 +835,7 @@ mep_check_parallel64_scheduling (void) /* Move the insn in element 0 to element 1 and insert the nop into element 0. Move the fixups in element 0 to - element 1 and save the current fixups to element 0. + element 1 and save the current fixups to element 0. Really there aren't any fixups at this point because we're inserting a nop but we might as well be general so that if there's ever a need to insert a general insn, we'll @@ -1154,7 +1154,7 @@ static void mep_check_parallel_scheduling (void) { /* This is where we will eventually read the config information - and choose which scheduling checking function to call. */ + and choose which scheduling checking function to call. */ #ifdef MEP_IVC2_SUPPORTED if (mep_cop == EF_MEP_COP_IVC2) mep_check_ivc2_scheduling (); @@ -1244,9 +1244,9 @@ md_assemble (char * str) int thisInsnIsCopro = 0; mep_insn insn; int i; - + /* Initialize the insn buffer */ - + if (! CGEN_INT_INSN_P) for (i=0; i < CGEN_MAX_INSN_SIZE; i++) insn.buffer[i]='\0'; @@ -1546,7 +1546,7 @@ md_estimate_size_before_relax (fragS * fragP, segT segment) switch (fragP->fr_cgen.insn->base->num) { case MEP_INSN_BSR12: - fragP->fr_subtype = insn_to_subtype + fragP->fr_subtype = insn_to_subtype (subtype_mappings[fragP->fr_subtype].insn_for_extern); break; case MEP_INSN_BEQZ: @@ -1614,7 +1614,7 @@ target_address_for (fragS *frag) } void -md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, +md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT seg ATTRIBUTE_UNUSED, fragS *fragP) { @@ -1866,7 +1866,7 @@ md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED, #ifdef OBJ_COMPLEX_RELC /* coalescing this into RELOC_MEP_16 is actually a bug, since it's a signed operand. let the relc code handle it. */ - return BFD_RELOC_RELC; + return BFD_RELOC_RELC; #endif case MEP_OPERAND_UIMM16: @@ -1879,7 +1879,7 @@ md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED, default: #ifdef OBJ_COMPLEX_RELC - /* this is not an error, yet. + /* this is not an error, yet. pass it to the linker. */ return BFD_RELOC_RELC; #endif @@ -2198,5 +2198,5 @@ mep_flush_pending_output (void) pluspresent = 0; } - return 1; + return 1; } diff --git a/gas/config/tc-mep.h b/gas/config/tc-mep.h index f5ff44d092..8d70ad1aa8 100644 --- a/gas/config/tc-mep.h +++ b/gas/config/tc-mep.h @@ -112,7 +112,7 @@ extern flagword mep_elf_section_flags (flagword, bfd_vma, int); #define ELF_TC_SPECIAL_SECTIONS \ { VTEXT_SECTION_NAME, SHT_PROGBITS, SHF_ALLOC|SHF_EXECINSTR|SHF_MEP_VLIW }, -/* The values of the following enum are for use with parinsnum, which +/* The values of the following enum are for use with parinsnum, which is a variable in md_assemble that keeps track of whether or not the next instruction is expected to be the first or second instrucion in a parallelization group. */ diff --git a/gas/config/tc-microblaze.h b/gas/config/tc-microblaze.h index 70f9af7e4a..f5aec4ebd9 100644 --- a/gas/config/tc-microblaze.h +++ b/gas/config/tc-microblaze.h @@ -68,7 +68,7 @@ extern const struct relax_type md_relax_table[]; /* We want local label support. */ #define LOCAL_LABELS_FB 1 - + /* Want the section information too... */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC) @@ -96,7 +96,7 @@ extern const struct relax_type md_relax_table[]; #endif #include "write.h" /* For definition of fixS */ - + extern void md_begin (void); extern void md_assemble (char *); extern symbolS * md_undefined_symbol (char *); diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 45126fec7c..ecff88b6e4 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -1868,7 +1868,7 @@ mips_clear_insn_labels (void) { for (pl = &free_insn_labels; *pl != NULL; pl = &(*pl)->next) ; - + si = seg_info (now_seg); *pl = si->label_list; si->label_list = NULL; @@ -2542,7 +2542,7 @@ struct regname { {"$28", RTYPE_NUM | 28}, \ {"$29", RTYPE_NUM | 29}, \ {"$30", RTYPE_NUM | 30}, \ - {"$31", RTYPE_NUM | 31} + {"$31", RTYPE_NUM | 31} #define FPU_REGISTER_NAMES \ {"$f0", RTYPE_FPU | 0}, \ @@ -2624,7 +2624,7 @@ struct regname { {"$ta0", RTYPE_GP | 12}, /* alias for $t4 */ \ {"$ta1", RTYPE_GP | 13}, /* alias for $t5 */ \ {"$ta2", RTYPE_GP | 14}, /* alias for $t6 */ \ - {"$ta3", RTYPE_GP | 15} /* alias for $t7 */ + {"$ta3", RTYPE_GP | 15} /* alias for $t7 */ /* Remaining symbolic register names */ #define SYMBOLIC_REGISTER_NAMES \ @@ -2720,7 +2720,7 @@ static const struct regname reg_names[] = { /* The $txx registers depends on the abi, these will be added later into the symbol table from - one of the tables below once mips_abi is set after + one of the tables below once mips_abi is set after parsing of arguments from the command line. */ SYMBOLIC_REGISTER_NAMES, @@ -3578,17 +3578,17 @@ md_begin (void) /* We add all the general register names to the symbol table. This helps us detect invalid uses of them. */ - for (i = 0; reg_names[i].name; i++) + for (i = 0; reg_names[i].name; i++) symbol_table_insert (symbol_new (reg_names[i].name, reg_section, reg_names[i].num, /* & RNUM_MASK, */ &zero_address_frag)); if (HAVE_NEWABI) - for (i = 0; reg_names_n32n64[i].name; i++) + for (i = 0; reg_names_n32n64[i].name; i++) symbol_table_insert (symbol_new (reg_names_n32n64[i].name, reg_section, reg_names_n32n64[i].num, /* & RNUM_MASK, */ &zero_address_frag)); else - for (i = 0; reg_names_o32[i].name; i++) + for (i = 0; reg_names_o32[i].name; i++) symbol_table_insert (symbol_new (reg_names_o32[i].name, reg_section, reg_names_o32[i].num, /* & RNUM_MASK, */ &zero_address_frag)); @@ -6366,7 +6366,7 @@ fix_24k_record_store_info (struct fix_24k_store_info *stinfo, * Run the data cache in write-through mode. * Insert a non-store instruction between Store A and Store B or Store B and Store C. */ - + static int nops_for_24k (int ignore, const struct mips_cl_insn *hist, const struct mips_cl_insn *insn) @@ -12488,7 +12488,7 @@ macro (struct mips_cl_insn *ip, char *str) abort (); break; - + case M_SAA_AB: s = "saa"; goto saa_saad; @@ -18684,7 +18684,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] = { "sb1", 0, ASE_MIPS3D | ASE_MDMX, ISA_MIPS64, CPU_SB1 }, /* Broadcom SB-1A CPU core */ { "sb1a", 0, ASE_MIPS3D | ASE_MDMX, ISA_MIPS64, CPU_SB1 }, - + { "loongson3a", 0, 0, ISA_MIPS64R2, CPU_LOONGSON_3A }, /* MIPS 64 Release 2 */ @@ -18924,7 +18924,7 @@ MIPS options:\n\ -mno-micromips do not generate microMIPS instructions\n")); fprintf (stream, _("\ -msmartmips generate smartmips instructions\n\ --mno-smartmips do not generate smartmips instructions\n")); +-mno-smartmips do not generate smartmips instructions\n")); fprintf (stream, _("\ -mdsp generate DSP instructions\n\ -mno-dsp do not generate DSP instructions\n")); diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c index a02e027ddb..c5128cd1b6 100644 --- a/gas/config/tc-mmix.c +++ b/gas/config/tc-mmix.c @@ -2973,7 +2973,7 @@ mmix_handle_mmixal (void) if (*s == 0 || is_end_of_line[(unsigned int) *s]) /* We avoid handling empty lines here. */ return; - + if (is_name_beginner (*s)) label = s; @@ -3413,7 +3413,7 @@ mmix_md_relax_frag (segT seg, fragS *fragP, long stretch) fragP->fr_subtype = ENCODE_RELAX (STATE_PUSHJSTUB, STATE_ZERO); } /* FALLTHROUGH. */ - + /* See if this PUSHJ is redirectable to a stub. */ case ENCODE_RELAX (STATE_PUSHJSTUB, STATE_ZERO): { diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index 1a244aba89..1d37b29475 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -938,7 +938,7 @@ md_begin (void) as_warn (_("could not set architecture and machine")); current_machine = AM33_2; -#else +#else if (!bfd_set_arch_mach (stdoutput, bfd_arch_mn10300, MN103)) as_warn (_("could not set architecture and machine")); @@ -1069,7 +1069,7 @@ mn10300_cons_fix_new (fragS *frag, int off, int size, expressionS *exp, as_bad (_("unsupported BFD relocation size %u"), size); fixup.reloc = BFD_RELOC_UNUSED; } - + fix_new_exp (frag, off, size, &fixup.exp, 0, fixup.reloc); } @@ -2216,7 +2216,7 @@ tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp) reloc2->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); *reloc2->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy); - reloc->addend = fixp->fx_offset; + reloc->addend = fixp->fx_offset; if (asec == absolute_section) { reloc->addend += S_GET_VALUE (fixp->fx_addsy); @@ -2283,7 +2283,7 @@ static inline bfd_boolean has_known_symbol_location (fragS * fragp, asection * sec) { symbolS * sym = fragp->fr_symbol; - + return sym != NULL && S_IS_DEFINED (sym) && ! S_IS_WEAK (sym) @@ -2384,7 +2384,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg) case BFD_RELOC_MN10300_ALIGN: fixP->fx_done = 1; return; - + case BFD_RELOC_NONE: default: as_bad_where (fixP->fx_file, fixP->fx_line, @@ -2453,7 +2453,7 @@ mn10300_end_of_match (char *cont, char *what) return cont + len; return NULL; -} +} int mn10300_parse_name (char const *name, @@ -2500,7 +2500,7 @@ mn10300_parse_name (char const *name, } exprP->X_add_symbol = symbol_find_or_make (name); - + if (*nextcharP != '@') goto no_suffix; else if ((next_end = mn10300_end_of_match (next + 1, "GOTOFF"))) diff --git a/gas/config/tc-moxie.c b/gas/config/tc-moxie.c index e1fcc9ef2f..9f03ecd3b1 100644 --- a/gas/config/tc-moxie.c +++ b/gas/config/tc-moxie.c @@ -616,13 +616,13 @@ md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED) { switch (c) { - case OPTION_EB: - target_big_endian = 1; + case OPTION_EB: + target_big_endian = 1; break; - case OPTION_EL: + case OPTION_EL: target_big_endian = 0; break; - default: + default: return 0; } @@ -640,7 +640,7 @@ md_show_usage (FILE *stream ATTRIBUTE_UNUSED) /* Apply a fixup to the object file. */ void -md_apply_fix (fixS *fixP ATTRIBUTE_UNUSED, +md_apply_fix (fixS *fixP ATTRIBUTE_UNUSED, valueT * valP ATTRIBUTE_UNUSED, segT seg ATTRIBUTE_UNUSED) { char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index 17c5fbe3d2..6516998667 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -696,60 +696,60 @@ msp430_set_arch (int option) support the 430 ISA. */ static const char * msp430_mcu_names [] = { -"msp430afe221", "msp430afe222", "msp430afe223", "msp430afe231", -"msp430afe232", "msp430afe233", "msp430afe251", "msp430afe252", -"msp430afe253", "msp430c091", "msp430c092", "msp430c111", -"msp430c1111", "msp430c112", "msp430c1121", "msp430c1331", -"msp430c1351", "msp430c311s", "msp430c312", "msp430c313", -"msp430c314", "msp430c315", "msp430c323", "msp430c325", -"msp430c336", "msp430c337", "msp430c412", "msp430c413", -"msp430e112", "msp430e313", "msp430e315", "msp430e325", -"msp430e337", "msp430f110", "msp430f1101", "msp430f1101a", -"msp430f1111", "msp430f1111a", "msp430f112", "msp430f1121", -"msp430f1121a", "msp430f1122", "msp430f1132", "msp430f122", -"msp430f1222", "msp430f123", "msp430f1232", "msp430f133", -"msp430f135", "msp430f147", "msp430f1471", "msp430f148", -"msp430f1481", "msp430f149", "msp430f1491", "msp430f155", -"msp430f156", "msp430f157", "msp430f1610", "msp430f1611", -"msp430f1612", "msp430f167", "msp430f168", "msp430f169", -"msp430f2001", "msp430f2002", "msp430f2003", "msp430f2011", -"msp430f2012", "msp430f2013", "msp430f2101", "msp430f2111", -"msp430f2112", "msp430f2121", "msp430f2122", "msp430f2131", -"msp430f2132", "msp430f2232", "msp430f2234", "msp430f2252", -"msp430f2254", "msp430f2272", "msp430f2274", "msp430f233", -"msp430f2330", "msp430f235", "msp430f2350", "msp430f2370", -"msp430f2410", "msp430f247", "msp430f2471", "msp430f248", -"msp430f2481", "msp430f249", "msp430f2491", "msp430f412", -"msp430f413", "msp430f4132", "msp430f415", "msp430f4152", -"msp430f417", "msp430f423", "msp430f423a", "msp430f425", -"msp430f4250", "msp430f425a", "msp430f4260", "msp430f427", -"msp430f4270", "msp430f427a", "msp430f435", "msp430f4351", -"msp430f436", "msp430f4361", "msp430f437", "msp430f4371", -"msp430f438", "msp430f439", "msp430f447", "msp430f448", -"msp430f4481", "msp430f449", "msp430f4491", "msp430f477", -"msp430f478", "msp430f4783", "msp430f4784", "msp430f479", -"msp430f4793", "msp430f4794", "msp430fe423", "msp430fe4232", -"msp430fe423a", "msp430fe4242", "msp430fe425", "msp430fe4252", -"msp430fe425a", "msp430fe427", "msp430fe4272", "msp430fe427a", -"msp430fg4250", "msp430fg4260", "msp430fg4270", "msp430fg437", -"msp430fg438", "msp430fg439", "msp430fg477", "msp430fg478", -"msp430fg479", "msp430fw423", "msp430fw425", "msp430fw427", -"msp430fw428", "msp430fw429", "msp430g2001", "msp430g2101", -"msp430g2102", "msp430g2111", "msp430g2112", "msp430g2113", -"msp430g2121", "msp430g2131", "msp430g2132", "msp430g2152", -"msp430g2153", "msp430g2201", "msp430g2202", "msp430g2203", -"msp430g2210", "msp430g2211", "msp430g2212", "msp430g2213", -"msp430g2221", "msp430g2230", "msp430g2231", "msp430g2232", -"msp430g2233", "msp430g2252", "msp430g2253", "msp430g2302", -"msp430g2303", "msp430g2312", "msp430g2313", "msp430g2332", -"msp430g2333", "msp430g2352", "msp430g2353", "msp430g2402", -"msp430g2403", "msp430g2412", "msp430g2413", "msp430g2432", -"msp430g2433", "msp430g2444", "msp430g2452", "msp430g2453", -"msp430g2513", "msp430g2533", "msp430g2544", "msp430g2553", -"msp430g2744", "msp430g2755", "msp430g2855", "msp430g2955", -"msp430i2020", "msp430i2021", "msp430i2030", "msp430i2031", -"msp430i2040", "msp430i2041", "msp430l092", "msp430p112", -"msp430p313", "msp430p315", "msp430p315s", "msp430p325", +"msp430afe221", "msp430afe222", "msp430afe223", "msp430afe231", +"msp430afe232", "msp430afe233", "msp430afe251", "msp430afe252", +"msp430afe253", "msp430c091", "msp430c092", "msp430c111", +"msp430c1111", "msp430c112", "msp430c1121", "msp430c1331", +"msp430c1351", "msp430c311s", "msp430c312", "msp430c313", +"msp430c314", "msp430c315", "msp430c323", "msp430c325", +"msp430c336", "msp430c337", "msp430c412", "msp430c413", +"msp430e112", "msp430e313", "msp430e315", "msp430e325", +"msp430e337", "msp430f110", "msp430f1101", "msp430f1101a", +"msp430f1111", "msp430f1111a", "msp430f112", "msp430f1121", +"msp430f1121a", "msp430f1122", "msp430f1132", "msp430f122", +"msp430f1222", "msp430f123", "msp430f1232", "msp430f133", +"msp430f135", "msp430f147", "msp430f1471", "msp430f148", +"msp430f1481", "msp430f149", "msp430f1491", "msp430f155", +"msp430f156", "msp430f157", "msp430f1610", "msp430f1611", +"msp430f1612", "msp430f167", "msp430f168", "msp430f169", +"msp430f2001", "msp430f2002", "msp430f2003", "msp430f2011", +"msp430f2012", "msp430f2013", "msp430f2101", "msp430f2111", +"msp430f2112", "msp430f2121", "msp430f2122", "msp430f2131", +"msp430f2132", "msp430f2232", "msp430f2234", "msp430f2252", +"msp430f2254", "msp430f2272", "msp430f2274", "msp430f233", +"msp430f2330", "msp430f235", "msp430f2350", "msp430f2370", +"msp430f2410", "msp430f247", "msp430f2471", "msp430f248", +"msp430f2481", "msp430f249", "msp430f2491", "msp430f412", +"msp430f413", "msp430f4132", "msp430f415", "msp430f4152", +"msp430f417", "msp430f423", "msp430f423a", "msp430f425", +"msp430f4250", "msp430f425a", "msp430f4260", "msp430f427", +"msp430f4270", "msp430f427a", "msp430f435", "msp430f4351", +"msp430f436", "msp430f4361", "msp430f437", "msp430f4371", +"msp430f438", "msp430f439", "msp430f447", "msp430f448", +"msp430f4481", "msp430f449", "msp430f4491", "msp430f477", +"msp430f478", "msp430f4783", "msp430f4784", "msp430f479", +"msp430f4793", "msp430f4794", "msp430fe423", "msp430fe4232", +"msp430fe423a", "msp430fe4242", "msp430fe425", "msp430fe4252", +"msp430fe425a", "msp430fe427", "msp430fe4272", "msp430fe427a", +"msp430fg4250", "msp430fg4260", "msp430fg4270", "msp430fg437", +"msp430fg438", "msp430fg439", "msp430fg477", "msp430fg478", +"msp430fg479", "msp430fw423", "msp430fw425", "msp430fw427", +"msp430fw428", "msp430fw429", "msp430g2001", "msp430g2101", +"msp430g2102", "msp430g2111", "msp430g2112", "msp430g2113", +"msp430g2121", "msp430g2131", "msp430g2132", "msp430g2152", +"msp430g2153", "msp430g2201", "msp430g2202", "msp430g2203", +"msp430g2210", "msp430g2211", "msp430g2212", "msp430g2213", +"msp430g2221", "msp430g2230", "msp430g2231", "msp430g2232", +"msp430g2233", "msp430g2252", "msp430g2253", "msp430g2302", +"msp430g2303", "msp430g2312", "msp430g2313", "msp430g2332", +"msp430g2333", "msp430g2352", "msp430g2353", "msp430g2402", +"msp430g2403", "msp430g2412", "msp430g2413", "msp430g2432", +"msp430g2433", "msp430g2444", "msp430g2452", "msp430g2453", +"msp430g2513", "msp430g2533", "msp430g2544", "msp430g2553", +"msp430g2744", "msp430g2755", "msp430g2855", "msp430g2955", +"msp430i2020", "msp430i2021", "msp430i2030", "msp430i2031", +"msp430i2040", "msp430i2041", "msp430l092", "msp430p112", +"msp430p313", "msp430p315", "msp430p315s", "msp430p325", "msp430p337", "msp430tch5e" }; @@ -873,7 +873,7 @@ msp430_section (int arg) char * name = obj_elf_section_name (); msp430_make_init_symbols (name); - + input_line_pointer = saved_ilp; obj_elf_section (arg); } @@ -1940,7 +1940,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) opcode->name); return 0; } - + fmt = (-fmt) - 1; extended_op = TRUE; } @@ -3085,7 +3085,7 @@ msp430_operands (struct msp430_opcode_s * opcode, char * line) as_bad (_("polymorphs are not enabled. Use -mP option to enable.")); break; } - + line = extract_operand (line, l1, sizeof (l1)); if (l1[0]) { @@ -3385,7 +3385,7 @@ md_apply_fix (fixS * fixp, valueT * valuep, segT seg) value &= 0xffff; /* Get rid of extended sign. */ bfd_putl16 ((bfd_vma) value, where); break; - + case BFD_RELOC_32: bfd_putl16 ((bfd_vma) value, where); break; diff --git a/gas/config/tc-mt.c b/gas/config/tc-mt.c index 6613d54bf3..b90ee607dd 100644 --- a/gas/config/tc-mt.c +++ b/gas/config/tc-mt.c @@ -20,7 +20,7 @@ #include "as.h" #include "dwarf2dbg.h" -#include "subsegs.h" +#include "subsegs.h" #include "symcat.h" #include "opcodes/mt-desc.h" #include "opcodes/mt-opc.h" @@ -54,14 +54,14 @@ mt_insn; const char comment_chars[] = ";"; const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; +const char line_separator_chars[] = ""; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; /* The target specific pseudo-ops which we support. */ const pseudo_typeS md_pseudo_table[] = { - { "word", cons, 4 }, + { "word", cons, 4 }, { NULL, NULL, 0 } }; @@ -69,7 +69,7 @@ const pseudo_typeS md_pseudo_table[] = static int no_scheduling_restrictions = 0; -struct option md_longopts[] = +struct option md_longopts[] = { #define OPTION_NO_SCHED_REST (OPTION_MD_BASE) { "nosched", no_argument, NULL, OPTION_NO_SCHED_REST }, @@ -161,7 +161,7 @@ void md_begin (void) { /* Initialize the `cgen' interface. */ - + /* Set the machine number and endian. */ gas_cgen_cpu_desc = mt_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, mt_mach_bitmask, CGEN_CPU_OPEN_ENDIAN, @@ -267,7 +267,7 @@ md_assemble (char * str) as_warn (_("operand references R%ld of instruction before previous."), prev_delayed_load_register); } - + /* Detect data dependency between conditional branch instruction and an immediately preceding arithmetic or logical instruction. */ if (last_insn_was_arithmetic_or_logic @@ -310,22 +310,22 @@ md_assemble (char * str) last_insn_was_branch_insn = CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_BR_INSN); - + last_insn_was_conditional_branch_insn = CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_BR_INSN) && CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_USES_FRSR2); - + prev_delayed_load_register = delayed_load_register; - + if (CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_USES_FRDR)) - delayed_load_register = insn.fields.f_dr; + delayed_load_register = insn.fields.f_dr; else if (CGEN_INSN_ATTR_VALUE (insn.insn, CGEN_INSN_USES_FRDRRR)) - delayed_load_register = insn.fields.f_drrr; + delayed_load_register = insn.fields.f_drrr; else /* Insns has no destination register. */ - delayed_load_register = 0; + delayed_load_register = 0; /* Generate dwarf2 line numbers. */ - dwarf2_emit_insn (4); + dwarf2_emit_insn (4); } valueT @@ -348,7 +348,7 @@ md_estimate_size_before_relax (fragS * fragP ATTRIBUTE_UNUSED, { as_fatal (_("md_estimate_size_before_relax\n")); return 1; -} +} /* *fragP has been relaxed to its final size, and now needs to have the bytes inside it modified to conform to the new size. @@ -471,13 +471,13 @@ mt_fix_adjustable (fixS * fixP) if (fixP->fx_addsy == NULL) return TRUE; - + /* Prevent all adjustments to global symbols. */ if (S_IS_EXTERNAL (fixP->fx_addsy)) return FALSE; - + if (S_IS_WEAK (fixP->fx_addsy)) return FALSE; - + return 1; } diff --git a/gas/config/tc-mt.h b/gas/config/tc-mt.h index 871dbf55e8..e3e5016ac6 100644 --- a/gas/config/tc-mt.h +++ b/gas/config/tc-mt.h @@ -45,7 +45,7 @@ #define LITERAL_PREFIXPERCENT_BIN #define md_apply_fix mt_apply_fix -extern void mt_apply_fix (struct fix *, valueT *, segT); +extern void mt_apply_fix (struct fix *, valueT *, segT); /* Call md_pcrel_from_section(), not md_pcrel_from(). */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC) diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c index 4488a4748b..42bb115c15 100644 --- a/gas/config/tc-nios2.c +++ b/gas/config/tc-nios2.c @@ -106,7 +106,7 @@ struct do not generate warnings. */ bfd_boolean noat; - /* .set nobreak -> nobreak = 1 allows assembly code to use ba,bt without + /* .set nobreak -> nobreak = 1 allows assembly code to use ba,bt without warning. .set break -> nobreak = 0, assembly code using ba,bt warns. */ bfd_boolean nobreak; @@ -145,7 +145,7 @@ typedef struct nios2_insn_info /* Constant bits masked into insn_code for self-check mode. */ unsigned long constant_bits; - + /* Pointer to the relevant bit of the opcode table. */ const struct nios2_opcode *insn_nios2_opcode; /* After parsing ptrs to the tokens in the instruction fill this array @@ -576,11 +576,11 @@ s_nios2_set (int equiv) trying a directive. This prevents us from polluting the name space. */ SKIP_WHITESPACE (); - if (is_end_of_line[(unsigned char) *input_line_pointer]) + if (is_end_of_line[(unsigned char) *input_line_pointer]) { bfd_boolean done = TRUE; *endline = 0; - + if (!strcmp (directive, "noat")) nios2_as_options.noat = TRUE; else if (!strcmp (directive, "at")) @@ -597,7 +597,7 @@ s_nios2_set (int equiv) nios2_as_options.relax = relax_all; else done = FALSE; - + if (done) { *endline = delim; @@ -607,7 +607,7 @@ s_nios2_set (int equiv) } /* If we fall through to here, either we have ".set XXX, YYY" - or we have ".set XXX" where XXX is unknown or we have + or we have ".set XXX" where XXX is unknown or we have a syntax error. */ input_line_pointer = directive; *endline = delim; @@ -652,7 +652,7 @@ const pseudo_typeS md_pseudo_table[] = { Nios II PC-relative branch instructions only support 16-bit offsets. And, there's no good way to add a 32-bit constant to the PC without using two registers. - + To deal with this, for the pc-relative relaxation mode we convert br label into a series of 16-bit adds, like: @@ -691,7 +691,7 @@ const pseudo_typeS md_pseudo_table[] = { 16-bit CDX branch instructions are relaxed first into equivalent 32-bit branches and then the above transformations are applied - if necessary. + if necessary. */ @@ -1020,7 +1020,7 @@ md_convert_frag (bfd *headers ATTRIBUTE_UNUSED, segT segment ATTRIBUTE_UNUSED, md_number_to_chars (buffer, op, 4); fragp->fr_fix += 4; buffer += 4; - + /* We need to know whether the offset is positive or negative. */ target += S_GET_VALUE (symbolp); offset = target - fragp->fr_address - fragp->fr_fix; @@ -1183,7 +1183,7 @@ nios2_diagnose_overflow (valueT fixup, reloc_howto_type *howto, = ((fixP->fx_frag->fr_address + fixP->fx_where) & 0xf0000000); range_max = range_min + 0x0fffffff; address = fixup | range_min; - + as_bad_where (fixP->fx_file, fixP->fx_line, _("call target address 0x%08x out of range 0x%08x to 0x%08x"), address, range_min, range_max); @@ -1304,7 +1304,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) if (fixP->fx_r_type == BFD_RELOC_64) { /* We may reach here due to .8byte directives, but we never output - BFD_RELOC_64; it must be resolved. */ + BFD_RELOC_64; it must be resolved. */ if (fixP->fx_addsy != NULL) as_bad_where (fixP->fx_file, fixP->fx_line, _("cannot create 64-bit relocation")); @@ -1749,7 +1749,7 @@ nios2_parse_base_register (char *str, int *direction, int *writeback, int *ret) /* The various nios2_assemble_* functions call this function to generate an expression from a string representing an expression. It then tries to evaluate the expression, and if it can, returns its value. - If not, it creates a new nios2_insn_relocS and stores the expression and + If not, it creates a new nios2_insn_relocS and stores the expression and reloc_type for future use. */ static unsigned long nios2_assemble_expression (const char *exprstr, @@ -1774,7 +1774,7 @@ nios2_assemble_expression (const char *exprstr, { reloc_type = nios2_special_reloc[i].reloc_type; exprstr += strlen (nios2_special_reloc[i].string) + 1; - + /* %lo and %hiadj have different meanings for PC-relative expressions. */ if (pcrel) @@ -1784,7 +1784,7 @@ nios2_assemble_expression (const char *exprstr, if (reloc_type == BFD_RELOC_NIOS2_HIADJ16) reloc_type = BFD_RELOC_NIOS2_PCREL_HA; } - + break; } @@ -1851,7 +1851,7 @@ nios2_assemble_reg3 (const char *token) /* Control register index. */ -static void +static void nios2_assemble_arg_c (const char *token, nios2_insn_infoS *insn) { struct nios2_reg *reg = nios2_parse_reg (token, REG_CONTROL); @@ -1874,7 +1874,7 @@ nios2_assemble_arg_c (const char *token, nios2_insn_infoS *insn) } /* Destination register. */ -static void +static void nios2_assemble_arg_d (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -1919,7 +1919,7 @@ nios2_assemble_arg_d (const char *token, nios2_insn_infoS *insn) } /* Source register 1. */ -static void +static void nios2_assemble_arg_s (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -1996,7 +1996,7 @@ nios2_assemble_arg_s (const char *token, nios2_insn_infoS *insn) } /* Source register 2. */ -static void +static void nios2_assemble_arg_t (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2062,12 +2062,12 @@ nios2_assemble_arg_t (const char *token, nios2_insn_infoS *insn) } /* Destination register w/3-bit encoding. */ -static void +static void nios2_assemble_arg_D (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; int reg = nios2_assemble_reg3 (token); - + switch (op->format) { case iw_T1I7_type: @@ -2097,12 +2097,12 @@ nios2_assemble_arg_D (const char *token, nios2_insn_infoS *insn) } /* Source register w/3-bit encoding. */ -static void +static void nios2_assemble_arg_S (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; int reg = nios2_assemble_reg3 (token); - + switch (op->format) { case iw_T1I7_type: @@ -2142,12 +2142,12 @@ nios2_assemble_arg_S (const char *token, nios2_insn_infoS *insn) } /* Source register 2 w/3-bit encoding. */ -static void +static void nios2_assemble_arg_T (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; int reg = nios2_assemble_reg3 (token); - + switch (op->format) { case iw_T2I4_type: @@ -2165,7 +2165,7 @@ nios2_assemble_arg_T (const char *token, nios2_insn_infoS *insn) } /* 16-bit signed immediate. */ -static void +static void nios2_assemble_arg_i (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2189,7 +2189,7 @@ nios2_assemble_arg_i (const char *token, nios2_insn_infoS *insn) } /* 12-bit signed immediate. */ -static void +static void nios2_assemble_arg_I (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2213,7 +2213,7 @@ nios2_assemble_arg_I (const char *token, nios2_insn_infoS *insn) } /* 16-bit unsigned immediate. */ -static void +static void nios2_assemble_arg_u (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2237,7 +2237,7 @@ nios2_assemble_arg_u (const char *token, nios2_insn_infoS *insn) } /* 7-bit unsigned immediate with 2-bit shift. */ -static void +static void nios2_assemble_arg_U (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2261,7 +2261,7 @@ nios2_assemble_arg_U (const char *token, nios2_insn_infoS *insn) } /* 5-bit unsigned immediate with 2-bit shift. */ -static void +static void nios2_assemble_arg_V (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2280,7 +2280,7 @@ nios2_assemble_arg_V (const char *token, nios2_insn_infoS *insn) } /* 4-bit unsigned immediate with 2-bit shift. */ -static void +static void nios2_assemble_arg_W (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2294,7 +2294,7 @@ nios2_assemble_arg_W (const char *token, nios2_insn_infoS *insn) insn->constant_bits |= SET_IW_T2I4_IMM4 (val >> 2); break; case iw_L5I4X1_type: - /* This argument is optional for push.n/pop.n, and defaults to + /* This argument is optional for push.n/pop.n, and defaults to zero if unspecified. */ if (token == NULL) return; @@ -2309,7 +2309,7 @@ nios2_assemble_arg_W (const char *token, nios2_insn_infoS *insn) } /* 4-bit unsigned immediate with 1-bit shift. */ -static void +static void nios2_assemble_arg_X (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2328,7 +2328,7 @@ nios2_assemble_arg_X (const char *token, nios2_insn_infoS *insn) } /* 4-bit unsigned immediate without shift. */ -static void +static void nios2_assemble_arg_Y (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2348,7 +2348,7 @@ nios2_assemble_arg_Y (const char *token, nios2_insn_infoS *insn) /* 16-bit signed immediate address offset. */ -static void +static void nios2_assemble_arg_o (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2372,7 +2372,7 @@ nios2_assemble_arg_o (const char *token, nios2_insn_infoS *insn) } /* 10-bit signed address offset with 1-bit shift. */ -static void +static void nios2_assemble_arg_O (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2391,7 +2391,7 @@ nios2_assemble_arg_O (const char *token, nios2_insn_infoS *insn) } /* 7-bit signed address offset with 1-bit shift. */ -static void +static void nios2_assemble_arg_P (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2410,7 +2410,7 @@ nios2_assemble_arg_P (const char *token, nios2_insn_infoS *insn) } /* 5-bit unsigned immediate. */ -static void +static void nios2_assemble_arg_j (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2458,7 +2458,7 @@ nios2_assemble_arg_j (const char *token, nios2_insn_infoS *insn) } /* Second 5-bit unsigned immediate field. */ -static void +static void nios2_assemble_arg_k (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2483,7 +2483,7 @@ nios2_assemble_arg_k (const char *token, nios2_insn_infoS *insn) } /* 8-bit unsigned immediate. */ -static void +static void nios2_assemble_arg_l (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2507,7 +2507,7 @@ nios2_assemble_arg_l (const char *token, nios2_insn_infoS *insn) } /* 26-bit unsigned immediate. */ -static void +static void nios2_assemble_arg_m (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2537,7 +2537,7 @@ nios2_assemble_arg_m (const char *token, nios2_insn_infoS *insn) } /* 6-bit unsigned immediate with no shifting. */ -static void +static void nios2_assemble_arg_M (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2556,7 +2556,7 @@ nios2_assemble_arg_M (const char *token, nios2_insn_infoS *insn) } /* 6-bit unsigned immediate with 2-bit shift. */ -static void +static void nios2_assemble_arg_N (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2576,7 +2576,7 @@ nios2_assemble_arg_N (const char *token, nios2_insn_infoS *insn) /* Encoded enumeration for addi.n/subi.n. */ -static void +static void nios2_assemble_arg_e (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2603,7 +2603,7 @@ nios2_assemble_arg_e (const char *token, nios2_insn_infoS *insn) } /* Encoded enumeration for slli.n/srli.n. */ -static void +static void nios2_assemble_arg_f (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2630,7 +2630,7 @@ nios2_assemble_arg_f (const char *token, nios2_insn_infoS *insn) } /* Encoded enumeration for andi.n. */ -static void +static void nios2_assemble_arg_g (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2657,7 +2657,7 @@ nios2_assemble_arg_g (const char *token, nios2_insn_infoS *insn) } /* Encoded enumeration for movi.n. */ -static void +static void nios2_assemble_arg_h (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2688,7 +2688,7 @@ nios2_assemble_arg_h (const char *token, nios2_insn_infoS *insn) } /* Encoded REGMASK for ldwm/stwm or push.n/pop.n. */ -static void +static void nios2_assemble_arg_R (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2739,14 +2739,14 @@ nios2_assemble_arg_R (const char *token, nios2_insn_infoS *insn) insn->insn_code |= SET_IW_L5I4X1_CS (1); } break; - + default: bad_opcode (op); } } /* Base register for ldwm/stwm. */ -static void +static void nios2_assemble_arg_B (const char *token, nios2_insn_infoS *insn) { const struct nios2_opcode *op = insn->insn_nios2_opcode; @@ -2762,7 +2762,7 @@ nios2_assemble_arg_B (const char *token, nios2_insn_infoS *insn) switch (op->format) { case iw_F1X4L17_type: - /* For ldwm, check to see if the base register is already inside the + /* For ldwm, check to see if the base register is already inside the register list. */ if (op->match == MATCH_R2_LDWM && (nios2_reglist_mask & (1 << reg->index))) @@ -2828,71 +2828,71 @@ nios2_assemble_args (nios2_insn_infoS *insn) case 'c': nios2_assemble_arg_c (insn->insn_tokens[tokidx++], insn); break; - + case 'd': nios2_assemble_arg_d (insn->insn_tokens[tokidx++], insn); break; - + case 's': nios2_assemble_arg_s (insn->insn_tokens[tokidx++], insn); break; - + case 't': nios2_assemble_arg_t (insn->insn_tokens[tokidx++], insn); break; - + case 'D': nios2_assemble_arg_D (insn->insn_tokens[tokidx++], insn); break; - + case 'S': nios2_assemble_arg_S (insn->insn_tokens[tokidx++], insn); break; - + case 'T': nios2_assemble_arg_T (insn->insn_tokens[tokidx++], insn); break; - + case 'i': nios2_assemble_arg_i (insn->insn_tokens[tokidx++], insn); break; - + case 'I': nios2_assemble_arg_I (insn->insn_tokens[tokidx++], insn); break; - + case 'u': nios2_assemble_arg_u (insn->insn_tokens[tokidx++], insn); break; - + case 'U': nios2_assemble_arg_U (insn->insn_tokens[tokidx++], insn); break; - + case 'V': nios2_assemble_arg_V (insn->insn_tokens[tokidx++], insn); break; - + case 'W': nios2_assemble_arg_W (insn->insn_tokens[tokidx++], insn); break; - + case 'X': nios2_assemble_arg_X (insn->insn_tokens[tokidx++], insn); break; - + case 'Y': nios2_assemble_arg_Y (insn->insn_tokens[tokidx++], insn); break; - + case 'o': nios2_assemble_arg_o (insn->insn_tokens[tokidx++], insn); break; - + case 'O': nios2_assemble_arg_O (insn->insn_tokens[tokidx++], insn); break; - + case 'P': nios2_assemble_arg_P (insn->insn_tokens[tokidx++], insn); break; @@ -2900,15 +2900,15 @@ nios2_assemble_args (nios2_insn_infoS *insn) case 'j': nios2_assemble_arg_j (insn->insn_tokens[tokidx++], insn); break; - + case 'k': nios2_assemble_arg_k (insn->insn_tokens[tokidx++], insn); break; - + case 'l': nios2_assemble_arg_l (insn->insn_tokens[tokidx++], insn); break; - + case 'm': nios2_assemble_arg_m (insn->insn_tokens[tokidx++], insn); break; @@ -2924,19 +2924,19 @@ nios2_assemble_args (nios2_insn_infoS *insn) case 'e': nios2_assemble_arg_e (insn->insn_tokens[tokidx++], insn); break; - + case 'f': nios2_assemble_arg_f (insn->insn_tokens[tokidx++], insn); break; - + case 'g': nios2_assemble_arg_g (insn->insn_tokens[tokidx++], insn); break; - + case 'h': nios2_assemble_arg_h (insn->insn_tokens[tokidx++], insn); break; - + case 'R': nios2_assemble_arg_R (insn->insn_tokens[tokidx++], insn); break; @@ -2950,7 +2950,7 @@ nios2_assemble_args (nios2_insn_infoS *insn) break; } - /* Perform argument checking. */ + /* Perform argument checking. */ nios2_check_assembly (insn->insn_code | insn->constant_bits, insn->insn_tokens[tokidx]); } @@ -2966,7 +2966,7 @@ static char * nios2_consume_arg (char *argstr, const char *parsestr) { char *temp; - + switch (*parsestr) { case 'c': @@ -3015,7 +3015,7 @@ nios2_consume_arg (char *argstr, const char *parsestr) case 'h': case 'M': case 'N': - + /* We can't have %hi, %lo or %hiadj here. */ if (*argstr == '%') as_bad (_("badly formed expression near %s"), argstr); @@ -3102,7 +3102,7 @@ nios2_parse_args (nios2_insn_infoS *insn, char *argstr, p = argstr; i = 0; bfd_boolean terminate = FALSE; - + /* This rest of this function is it too fragile and it mostly works, therefore special case this one. */ if (*parsestr == 0 && argstr != 0) @@ -3111,7 +3111,7 @@ nios2_parse_args (nios2_insn_infoS *insn, char *argstr, parsed_args[0] = NULL; return; } - + while (p != NULL && !terminate && i < NIOS2_MAX_INSN_TOKENS) { parsed_args[i] = nios2_consume_arg (p, parsestr); @@ -3219,7 +3219,7 @@ nios2_append_arg (char **parsed_args, const char *appnd, int num, parsed_args[i + 1] = NULL; } -/* This function inserts the string insert num times in the array +/* This function inserts the string insert num times in the array parsed_args, starting at the index start. */ static void nios2_insert_arg (char **parsed_args, const char *insert, int num, @@ -3323,7 +3323,7 @@ static void output_insn (nios2_insn_infoS *insn) { char *f; - nios2_insn_relocS *reloc; + nios2_insn_relocS *reloc; f = frag_more (insn->insn_nios2_opcode->size); /* This allocates enough space for the instruction and puts it in the current frag. */ @@ -3619,7 +3619,7 @@ md_begin (void) break; } - /* Create and fill a hashtable for the Nios II opcodes, registers and + /* Create and fill a hashtable for the Nios II opcodes, registers and arguments. */ nios2_opcode_hash = hash_new (); nios2_reg_hash = hash_new (); @@ -3688,7 +3688,7 @@ md_begin (void) void md_assemble (char *op_str) { - char *argstr; + char *argstr; char *op_strdup = NULL; unsigned long saved_pinfo = 0; nios2_insn_infoS thisinsn; @@ -3731,11 +3731,11 @@ md_assemble (char *op_str) nios2_parse_args (insn, argstr, insn->insn_nios2_opcode->args_test, (char **) &insn->insn_tokens[1]); - /* We need to preserve the MOVIA macro as this is clobbered by + /* We need to preserve the MOVIA macro as this is clobbered by translate_pseudo_insn. */ if (insn->insn_nios2_opcode->pinfo == NIOS2_INSN_MACRO_MOVIA) saved_pinfo = NIOS2_INSN_MACRO_MOVIA; - /* If the instruction is an pseudo-instruction, we want to replace it + /* If the instruction is an pseudo-instruction, we want to replace it with its real equivalent, and then continue. */ if ((insn->insn_nios2_opcode->pinfo & NIOS2_INSN_MACRO) == NIOS2_INSN_MACRO) diff --git a/gas/config/tc-ns32k.c b/gas/config/tc-ns32k.c index fa195032f0..cab97c17d2 100644 --- a/gas/config/tc-ns32k.c +++ b/gas/config/tc-ns32k.c @@ -710,7 +710,7 @@ get_addr_mode (char *ptr, addr_modeS *addrmodeP) addrmodeP->am_size += 1; } - gas_assert (addrmodeP->mode >= 0); + gas_assert (addrmodeP->mode >= 0); if (disp_test[(unsigned int) addrmodeP->mode]) { char c; diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index ce3257f8aa..8cff4dc6d5 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -3091,7 +3091,7 @@ md_assemble (char *str) if (opcode->flags & PPC_OPCODE_VLE) { int tmp_insn = insn & opcode->mask; - + int use_d_reloc = (tmp_insn == E_OR2I_INSN || tmp_insn == E_AND2I_DOT_INSN || tmp_insn == E_OR2IS_INSN @@ -3129,7 +3129,7 @@ md_assemble (char *str) else if (use_a_reloc) reloc = BFD_RELOC_PPC_VLE_HI16A; break; - + case BFD_RELOC_HI16_S: if (use_d_reloc) reloc = BFD_RELOC_PPC_VLE_HA16D; diff --git a/gas/config/tc-rl78.c b/gas/config/tc-rl78.c index c9d5c9791d..a74703ebf5 100644 --- a/gas/config/tc-rl78.c +++ b/gas/config/tc-rl78.c @@ -1148,7 +1148,7 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, fprintf(stderr, "Missed case %d %d at 0x%lx\n", rl78_opcode_type (fragP->fr_opcode), fragP->fr_subtype, mypc); abort (); - + } break; @@ -1253,7 +1253,7 @@ tc_gen_reloc (asection * seg ATTRIBUTE_UNUSED, fixS * fixp) the __rl78_abs__ symbol and arrange for the linker scripts to place this symbol at address 0. */ #define OPIMM(IMM) OPX (BFD_RELOC_RL78_SYM, symbol_get_bfdsym (rl78_abs_sym), IMM) - + #define OP(OP) OPX(BFD_RELOC_RL78_##OP, *reloc[0]->sym_ptr_ptr, 0) #define SYM0() reloc[0]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_RL78_SYM) diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c index ec54b3237b..e70295d7dc 100644 --- a/gas/config/tc-rx.c +++ b/gas/config/tc-rx.c @@ -2440,7 +2440,7 @@ tc_gen_reloc (asection * sec ATTRIBUTE_UNUSED, fixS * fixp) } else if (sec) is_opcode = sec->flags & SEC_CODE; - + /* Certain BFD relocations cannot be translated directly into a single (non-Red Hat) RX relocation, but instead need multiple RX relocations - handle them here. */ diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index 5051baf013..3250127944 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -2248,7 +2248,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) mop |= (unsigned int) ((value & 0xfff) << 8 | (value & 0xff000) >> 12); bfd_putb32 ((bfd_vma) mop, (unsigned char *) where); - } + } break; case BFD_RELOC_16: diff --git a/gas/config/tc-score.h b/gas/config/tc-score.h index 5b342a4a04..43227fe261 100644 --- a/gas/config/tc-score.h +++ b/gas/config/tc-score.h @@ -1,10 +1,10 @@ /* tc-score.h -- Score specific file for assembler Copyright (C) 2006-2015 Free Software Foundation, Inc. - Contributed by: + Contributed by: Brain.lin (brain.lin@sunplusct.com) Mei Ligang (ligang@sunnorth.com.cn) Pei-Lin Tsai (pltsai@sunplus.com) - + This file is part of GAS, the GNU Assembler. GAS is free software; you can redistribute it and/or modify diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index 493fa403bf..1b5beb2302 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -1363,7 +1363,7 @@ parse_reg (char *src, int *mode, int *reg) } else prefix = 0; - + consumed = parse_reg_without_prefix (src, mode, reg); if (consumed == 0) @@ -3245,10 +3245,10 @@ md_parse_option (int c, char *arg ATTRIBUTE_UNUSED) for (; bfd_arch; bfd_arch=bfd_arch->next) { int len = strlen(bfd_arch->printable_name); - + if (bfd_arch->mach == bfd_mach_sh5) continue; - + if (strncasecmp (bfd_arch->printable_name, arg, len) != 0) continue; @@ -3262,7 +3262,7 @@ md_parse_option (int c, char *arg ATTRIBUTE_UNUSED) continue; break; } - + if (!preset_target_arch) as_bad (_("Invalid argument to --isa option: %s"), arg); } diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index e468732d7b..edadfb81c2 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -280,7 +280,7 @@ static struct sparc_arch { { "v8pluse", "v9b", v9, 0, 1, HWCAP_V8PLUS|HWS_VE, 0 }, { "v8plusv", "v9b", v9, 0, 1, HWCAP_V8PLUS|HWS_VV, 0 }, { "v8plusm", "v9b", v9, 0, 1, HWCAP_V8PLUS|HWS_VM, 0 }, - + { "v9", "v9", v9, 0, 1, HWS_V9, 0 }, { "v9a", "v9a", v9, 0, 1, HWS_VA, 0 }, { "v9b", "v9b", v9, 0, 1, HWS_VB, 0 }, diff --git a/gas/config/tc-spu.c b/gas/config/tc-spu.c index 2343188c54..1ac1b7d70a 100644 --- a/gas/config/tc-spu.c +++ b/gas/config/tc-spu.c @@ -22,7 +22,7 @@ #include "as.h" #include "safe-ctype.h" #include "subsegs.h" -#include "dwarf2dbg.h" +#include "dwarf2dbg.h" const struct spu_opcode spu_opcodes[] = { #define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \ @@ -246,16 +246,16 @@ insn_fmt_string (struct spu_opcode *format) { int arg = format->arg[i]; char *exp; - if (i > 1 && arg != A_P && format->arg[i-1] != A_P) + if (i > 1 && arg != A_P && format->arg[i-1] != A_P) buf[len++] = ','; if (arg == A_P) exp = "("; else if (arg < A_P) exp = i == syntax_error_arg ? "REG" : "reg"; - else + else exp = i == syntax_error_arg ? "IMM" : "imm"; len += sprintf (&buf[len], "%s", exp); - if (i > 1 && format->arg[i-1] == A_P) + if (i > 1 && format->arg[i-1] == A_P) buf[len++] = ')'; } buf[len] = 0; @@ -363,7 +363,7 @@ md_assemble (char *op) /* if this instruction requires labels mark it for later */ for (i = 0; i < MAX_RELOCS; i++) - if (insn.reloc_arg[i] >= 0) + if (insn.reloc_arg[i] >= 0) { fixS *fixP; bfd_reloc_code_real_type reloc = insn.reloc[i]; @@ -504,7 +504,7 @@ get_reg (const char *param, struct spu_insn *insn, int arg, int accept_expr) saw_prefix = 1; param++; } - + if (arg == A_H) /* Channel */ { if ((param[0] == 'c' || param[0] == 'C') @@ -620,7 +620,7 @@ get_imm (const char *param, struct spu_insn *insn, int arg) i.e. for code loaded at address 0 $toc will be 0. */ param += 4; } - + if (*param == '$') { /* Symbols can start with $, but if this symbol matches a register @@ -632,7 +632,7 @@ get_imm (const char *param, struct spu_insn *insn, int arg) if (np) syntax_error_param = np; } - + save_ptr = input_line_pointer; input_line_pointer = (char *) param; expression (&insn->exp[reloc_i]); @@ -661,12 +661,12 @@ get_imm (const char *param, struct spu_insn *insn, int arg) if (emulate_apuasm) { - /* Convert the value to a format we expect. */ + /* Convert the value to a format we expect. */ val <<= arg_encode[arg].rshift; if (arg == A_U7A) val = 173 - val; else if (arg == A_U7B) - val = 155 - val; + val = 155 - val; } if (high) @@ -692,7 +692,7 @@ get_imm (const char *param, struct spu_insn *insn, int arg) if (arg == A_U7A) val = 173 - val; else if (arg == A_U7B) - val = 155 - val; + val = 155 - val; /* Branch hints have a split encoding. Do the bottom part. */ if (arg == A_S11 || arg == A_S11I) diff --git a/gas/config/tc-tic30.c b/gas/config/tc-tic30.c index 2b225203cf..87306dc3a3 100644 --- a/gas/config/tc-tic30.c +++ b/gas/config/tc-tic30.c @@ -280,7 +280,7 @@ output_invalid (char c) snprintf (output_invalid_buf, sizeof (output_invalid_buf), "'%c'", c); else - snprintf (output_invalid_buf, sizeof (output_invalid_buf), + snprintf (output_invalid_buf, sizeof (output_invalid_buf), "(0x%x)", (unsigned char) c); return output_invalid_buf; } diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c index b1ed451ba4..c27c8d1172 100644 --- a/gas/config/tc-tic4x.c +++ b/gas/config/tc-tic4x.c @@ -17,12 +17,12 @@ You should have received a copy of the GNU General Public License along with GAS; see the file COPYING. If not, write to - the Free Software Foundation, 51 Franklin Street - Fifth Floor, + the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ /* TODOs: ------ - + o .align cannot handle fill-data-width larger than 0xFF/8-bits. It should be possible to define a 32-bits pattern. @@ -195,10 +195,10 @@ const char comment_chars[] = ";"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' - .line and .file directives will appear in the pre-processed output. + .line and .file directives will appear in the pre-processed output. Note that input_file.c hand checks for '#' at the beginning of the first line of the input file. This is because the compiler outputs - #NO_APP at the beginning of its output. + #NO_APP at the beginning of its output. Also note that comments like this one will always work. */ const char line_comment_chars[] = "#*"; @@ -250,7 +250,7 @@ tic4x_gen_to_words (FLONUM_TYPE flonum, LITTLENUM_TYPE *words, int precision) The code in this function is altered slightly to support floats with 31-bits mantissas, thus the documentation below may be a little bit inaccurate. - + By Michael P. Hayes Here is how a generic floating point number is stored using flonums (an extension of bignums) where p is a pointer to an @@ -398,7 +398,7 @@ tic4x_gen_to_words (FLONUM_TYPE flonum, LITTLENUM_TYPE *words, int precision) /* +INF: Replace with maximum float. */ if (precision == S_PRECISION) words[0] = 0x77ff; - else + else { words[0] = 0x7f7f; words[1] = 0xffff; @@ -415,7 +415,7 @@ tic4x_gen_to_words (FLONUM_TYPE flonum, LITTLENUM_TYPE *words, int precision) /* -INF: Replace with maximum float. */ if (precision == S_PRECISION) words[0] = 0x7800; - else + else words[0] = 0x7f80; if (precision == E_PRECISION) words[2] = 0x8000; @@ -617,7 +617,7 @@ tic4x_atof (char *str, char what_kind, LITTLENUM_TYPE *words) return return_value; } -static void +static void tic4x_insert_reg (char *regname, int regnum) { char buf[32]; @@ -633,7 +633,7 @@ tic4x_insert_reg (char *regname, int regnum) &zero_address_frag)); } -static void +static void tic4x_insert_sym (char *symname, int value) { symbolS *symbolP; @@ -672,7 +672,7 @@ tic4x_expression_abs (char *str, offsetT *value) return s; } -static void +static void tic4x_emit_char (char c, int b) { expressionS exp; @@ -682,7 +682,7 @@ tic4x_emit_char (char c, int b) emit_expr (&exp, b); } -static void +static void tic4x_seg_alloc (char *name ATTRIBUTE_UNUSED, segT seg ATTRIBUTE_UNUSED, int size, @@ -707,7 +707,7 @@ tic4x_seg_alloc (char *name ATTRIBUTE_UNUSED, } /* .asg ["]character-string["], symbol */ -static void +static void tic4x_asg (int x ATTRIBUTE_UNUSED) { char c; @@ -744,7 +744,7 @@ tic4x_asg (int x ATTRIBUTE_UNUSED) } /* .bss symbol, size */ -static void +static void tic4x_bss (int x ATTRIBUTE_UNUSED) { char c; @@ -828,7 +828,7 @@ tic4x_globl (int ignore ATTRIBUTE_UNUSED) } /* Handle .byte, .word. .int, .long */ -static void +static void tic4x_cons (int bytes) { unsigned int c; @@ -871,7 +871,7 @@ tic4x_cons (int bytes) } /* Handle .ascii, .asciz, .string */ -static void +static void tic4x_stringer (int append_zero) { int bytes; @@ -924,7 +924,7 @@ tic4x_stringer (int append_zero) } /* .eval expression, symbol */ -static void +static void tic4x_eval (int x ATTRIBUTE_UNUSED) { char c; @@ -947,7 +947,7 @@ tic4x_eval (int x ATTRIBUTE_UNUSED) } /* Reset local labels. */ -static void +static void tic4x_newblock (int x ATTRIBUTE_UNUSED) { dollar_label_clear (); @@ -955,7 +955,7 @@ tic4x_newblock (int x ATTRIBUTE_UNUSED) /* .sect "section-name" [, value] */ /* .sect ["]section-name[:subsection-name]["] [, value] */ -static void +static void tic4x_sect (int x ATTRIBUTE_UNUSED) { char c; @@ -1026,7 +1026,7 @@ tic4x_sect (int x ATTRIBUTE_UNUSED) } /* symbol[:] .set value or .set symbol, value */ -static void +static void tic4x_set (int x ATTRIBUTE_UNUSED) { symbolS *symbolP; @@ -1056,7 +1056,7 @@ tic4x_set (int x ATTRIBUTE_UNUSED) } /* [symbol] .usect ["]section-name["], size-in-words [, alignment-flag] */ -static void +static void tic4x_usect (int x ATTRIBUTE_UNUSED) { char c; @@ -1122,7 +1122,7 @@ tic4x_usect (int x ATTRIBUTE_UNUSED) } /* .version cpu-version. */ -static void +static void tic4x_version (int x ATTRIBUTE_UNUSED) { offsetT temp; @@ -1139,7 +1139,7 @@ tic4x_version (int x ATTRIBUTE_UNUSED) demand_empty_rest_of_line (); } -static void +static void tic4x_init_regtable (void) { unsigned int i; @@ -1157,7 +1157,7 @@ tic4x_init_regtable (void) } } -static void +static void tic4x_init_symbols (void) { /* The TI tools accept case insensitive versions of these symbols, @@ -1188,7 +1188,7 @@ tic4x_init_symbols (void) Source: TI: TMS320C3x/C4x Assembly Language Tools User's Guide, 1997, SPRU035C, p. 3-17/3-18. */ tic4x_insert_sym (".REGPARM", tic4x_reg_args); - tic4x_insert_sym (".MEMPARM", !tic4x_reg_args); + tic4x_insert_sym (".MEMPARM", !tic4x_reg_args); tic4x_insert_sym (".BIGMODEL", tic4x_big_model); tic4x_insert_sym (".C30INTERRUPT", 0); tic4x_insert_sym (".TMS320xx", tic4x_cpu == 0 ? 40 : tic4x_cpu); @@ -1214,7 +1214,7 @@ tic4x_init_symbols (void) } /* Insert a new instruction template into hash table. */ -static int +static int tic4x_inst_insert (const tic4x_inst_t *inst) { static char prev_name[16]; @@ -1264,7 +1264,7 @@ tic4x_inst_make (char *name, unsigned long opcode, char *args) } /* Add instruction template, creating dynamic templates as required. */ -static int +static int tic4x_inst_add (const tic4x_inst_t *insts) { char *s = insts->name; @@ -1335,7 +1335,7 @@ tic4x_inst_add (const tic4x_inst_t *insts) /* This function is called once, at assembler startup time. It should set up all the tables, etc., that the MD part of the assembler will need. */ -void +void md_begin (void) { int ok = 1; @@ -1392,14 +1392,14 @@ md_begin (void) tic4x_init_symbols (); } -void +void tic4x_end (void) { - bfd_set_arch_mach (stdoutput, bfd_arch_tic4x, + bfd_set_arch_mach (stdoutput, bfd_arch_tic4x, IS_CPU_TIC4X (tic4x_cpu) ? bfd_mach_tic4x : bfd_mach_tic3x); } -static int +static int tic4x_indirect_parse (tic4x_operand_t *operand, const tic4x_indirect_t *indirect) { @@ -1662,7 +1662,7 @@ tic4x_operand_parse (char *s, tic4x_operand_t *operand) return new_pointer; } -static int +static int tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check) { const char *args = inst->args; @@ -1824,7 +1824,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check) if (!(operand->mode == M_REGISTER)) break; reg = exp->X_add_number; - if ( (reg >= REG_R0 && reg <= REG_R7) + if ( (reg >= REG_R0 && reg <= REG_R7) || (IS_CPU_TIC4X (tic4x_cpu) && reg >= REG_R8 && reg <= REG_R11) ) INSERTU (opcode, reg, 7, 0); else @@ -1864,7 +1864,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check) if (operand->mode != M_REGISTER) break; reg = exp->X_add_number; - if ( (reg >= REG_R0 && reg <= REG_R7) + if ( (reg >= REG_R0 && reg <= REG_R7) || (IS_CPU_TIC4X (tic4x_cpu) && reg >= REG_R8 && reg <= REG_R11) ) INSERTU (opcode, reg, 15, 8); else @@ -2055,7 +2055,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check) if (operand->mode != M_REGISTER) break; reg = exp->X_add_number; - if ( (reg >= REG_R0 && reg <= REG_R7) + if ( (reg >= REG_R0 && reg <= REG_R7) || (IS_CPU_TIC4X (tic4x_cpu) && reg >= REG_R8 && reg <= REG_R11) ) INSERTU (opcode, reg, 15, 0); else @@ -2077,7 +2077,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check) if (operand->mode != M_REGISTER) break; reg = exp->X_add_number; - if ( (reg >= REG_R0 && reg <= REG_R7) + if ( (reg >= REG_R0 && reg <= REG_R7) || (IS_CPU_TIC4X (tic4x_cpu) && reg >= REG_R8 && reg <= REG_R11) ) INSERTU (opcode, reg, 20, 16); else @@ -2336,7 +2336,7 @@ tic4x_operands_match (tic4x_inst_t *inst, tic4x_insn_t *tinsn, int check) static void tic4x_insn_check (tic4x_insn_t *tinsn) { - + if (!strcmp (tinsn->name, "lda")) { if (tinsn->num_operands < 2 || tinsn->num_operands > 2) @@ -2356,7 +2356,7 @@ tic4x_insn_check (tic4x_insn_t *tinsn) { if (tinsn->num_operands < 4 || tinsn->num_operands > 5) as_fatal ("Illegal internal %s insn definition", tinsn->name); - + if (tinsn->operands[1].mode == M_REGISTER && tinsn->operands[tinsn->num_operands-1].mode == M_REGISTER && tinsn->operands[1].expr.X_add_number == tinsn->operands[tinsn->num_operands-1].expr.X_add_number ) @@ -2364,7 +2364,7 @@ tic4x_insn_check (tic4x_insn_t *tinsn) } } -static void +static void tic4x_insn_output (tic4x_insn_t *tinsn) { char *dst; @@ -2389,7 +2389,7 @@ tic4x_insn_output (tic4x_insn_t *tinsn) } /* Parse the operands. */ -static int +static int tic4x_operands_parse (char *s, tic4x_operand_t *operands, int num_operands) { if (!*s) @@ -2410,7 +2410,7 @@ tic4x_operands_parse (char *s, tic4x_operand_t *operands, int num_operands) /* Assemble a single instruction. Its label has already been handled by the generic front end. We just parse mnemonic and operands, and produce the bytes of data and relocation. */ -void +void md_assemble (char *str) { int ok = 0; @@ -2427,7 +2427,7 @@ md_assemble (char *str) s = str; while (*s && *s != '|') s++; - + if (*s && s[1]=='|') { if(insn->parallel) @@ -2437,7 +2437,7 @@ md_assemble (char *str) insn->in_use = 0; return; } - + /* Lets take care of the first part of the parallel insn */ *s++ = 0; md_assemble(str); @@ -2446,7 +2446,7 @@ md_assemble (char *str) /* .. and let the second run though here */ } } - + if (str && insn->parallel) { /* Find mnemonic (second part of parallel instruction). */ @@ -2622,7 +2622,7 @@ md_atof (int type, char *litP, int *sizeP) return NULL; } -void +void md_apply_fix (fixS *fixP, valueT *value, segT seg ATTRIBUTE_UNUSED) { char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; @@ -2666,7 +2666,7 @@ md_apply_fix (fixS *fixP, valueT *value, segT seg ATTRIBUTE_UNUSED) } /* Should never be called for tic4x. */ -void +void md_convert_frag (bfd *headers ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED, fragS *fragP ATTRIBUTE_UNUSED) @@ -2735,7 +2735,7 @@ md_parse_option (int c, char *arg) tic4x_reg_args = 0; break; - case 'r': + case 'r': as_warn (_("Option -r is depreciated, please use -mregparm")); case OPTION_REGPARM: /* register args */ tic4x_reg_args = 1; @@ -2794,7 +2794,7 @@ md_show_usage (FILE *stream) /* This is called when a line is unrecognized. This is used to handle definitions of TI C3x tools style local labels $n where n is a single decimal digit. */ -int +int tic4x_unrecognized_line (int c) { int lab; @@ -2871,7 +2871,7 @@ md_section_align (segT segment ATTRIBUTE_UNUSED, valueT size) return size; /* Byte (i.e., 32-bit) alignment is fine? */ } -static int +static int tic4x_pc_offset (unsigned int op) { /* Determine the PC offset for a C[34]x instruction. @@ -2948,7 +2948,7 @@ md_pcrel_from (fixS *fixP) /* Fill the alignment area with NOP's on .text, unless fill-data was specified. */ -int +int tic4x_do_align (int alignment, const char *fill, int len, @@ -2956,7 +2956,7 @@ tic4x_do_align (int alignment, { /* Because we are talking lwords, not bytes, adjust alignment to do words */ alignment += 2; - + if (alignment != 0 && !need_pass_2) { if (fill == NULL) @@ -2976,13 +2976,13 @@ tic4x_do_align (int alignment, else frag_align_pattern (alignment, fill, len, max); } - + /* Return 1 to skip the default alignment function */ return 1; } /* Look for and remove parallel instruction operator ||. */ -void +void tic4x_start_line (void) { char *s = input_line_pointer; diff --git a/gas/config/tc-tic4x.h b/gas/config/tc-tic4x.h index 3b311f6a6b..5f7bb26dce 100644 --- a/gas/config/tc-tic4x.h +++ b/gas/config/tc-tic4x.h @@ -1,6 +1,6 @@ /* tc-tic4x.h -- Assemble for the Texas TMS320C[34]X. Copyright (C) 1997-2015 Free Software Foundation, Inc. - + Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz) This file is part of GAS, the GNU Assembler. diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c index 789400f041..1dd2e9223c 100644 --- a/gas/config/tc-tic6x.c +++ b/gas/config/tc-tic6x.c @@ -2068,7 +2068,7 @@ tic6x_fix_adjustable (fixS *fixP) case BFD_RELOC_C6000_PCR_H16: case BFD_RELOC_C6000_PCR_L16: return 0; - + default: return 1; } @@ -4680,18 +4680,18 @@ tic6x_start_unwind_section (const segT text_seg, int idx) static const int -tic6x_unwind_frame_regs[TIC6X_NUM_UNWIND_REGS] = +tic6x_unwind_frame_regs[TIC6X_NUM_UNWIND_REGS] = /* A15 B15 B14 B13 B12 B11 B10 B3 A14 A13 A12 A11 A10. */ { 15, 31, 30, 29, 28, 27, 26, 19, 14, 13, 12, 11, 10 }; /* Register save offsets for __c6xabi_push_rts. */ static const int -tic6x_pop_rts_offset_little[TIC6X_NUM_UNWIND_REGS] = +tic6x_pop_rts_offset_little[TIC6X_NUM_UNWIND_REGS] = /* A15 B15 B14 B13 B12 B11 B10 B3 A14 A13 A12 A11 A10. */ { -1, 1, 0, -3, -4, -7, -8,-11, -2, -5, -6, -9,-10}; static const int -tic6x_pop_rts_offset_big[TIC6X_NUM_UNWIND_REGS] = +tic6x_pop_rts_offset_big[TIC6X_NUM_UNWIND_REGS] = /* A15 B15 B14 B13 B12 B11 B10 B3 A14 A13 A12 A11 A10. */ { -2, 1, 0, -4, -3, -8, -7,-12, -1, -6, -5,-10, -9}; @@ -5340,7 +5340,7 @@ tic6x_cfi_endproc (struct fde_entry *fde) continue; unwind->saved_reg_count++; - /* Encoding uses 4 bits per word, so size of unwinding opcode data + /* Encoding uses 4 bits per word, so size of unwinding opcode data limits the save area size. The exact cap will be figured out later due to overflow, the 0x800 here is just a quick sanity check to weed out obviously excessive offsets. */ diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index dec8739cc1..e6f35b8acd 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -1767,7 +1767,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, /* Out of range conditional branch. Emit a branch around a 22bit jump. */ else if (fragP->fr_subtype == SUBYPTE_COND_9_22 + 1 || fragP->fr_subtype == SUBYPTE_COND_9_22_32 + 1 - || fragP->fr_subtype == SUBYPTE_COND_9_17_22 + 2 + || fragP->fr_subtype == SUBYPTE_COND_9_17_22 + 2 || fragP->fr_subtype == SUBYPTE_COND_9_17_22_32 + 2) { unsigned char *buffer = diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c index b99d525765..b64b8cb566 100644 --- a/gas/config/tc-vax.c +++ b/gas/config/tc-vax.c @@ -783,11 +783,11 @@ static const short int vax_operand_width_size[256] = ban these opcodes. They are mnemonics for "elastic" instructions that are supposed to assemble into the fewest bytes needed to do a branch, or to do a conditional branch, or whatever. - + The opcode is in the usual place [low-order n*8 bits]. This means that if you mask off the bucky bits, the usual rules apply about how long the opcode is. - + All VAX branch displacements come at the end of the instruction. For simple branches (1-byte opcode + 1-byte displacement) the last operand is coded 'b?' where the "data type" '?' is a clue that we @@ -795,14 +795,14 @@ static const short int vax_operand_width_size[256] = and branch around a jump. This is by far the most common case. That is why the VIT_OPCODE_SYNTHETIC bit is set: it says this is a 0-byte op-code followed by 2 or more bytes of operand address. - + If the op-code has VIT_OPCODE_SPECIAL set, then we have a more unusual case. - + For JBSB & JBR the treatment is the similar, except (1) we have a 'bw' option before (2) we can directly JSB/JMP because there is no condition. These operands have 'b-' as their access/data type. - + That leaves a bunch of random opcodes: JACBx, JxOBxxx. In these cases, we do the same idea. JACBxxx are all marked with a 'b!' JAOBxxx & JSOBxxx are marked with a 'b:'. */ @@ -977,14 +977,14 @@ vip_begin (int synthetic_too, /* 1 means include jXXX op-codes. */ /* Take 3 char.s, the last of which may be `\0` (non-existent) and return the VAX register number that they represent. - + Return -1 if they don't form a register name. Good names return a number from 0:15 inclusive. - + Case is not important in a name. - + Register names understood are: - + R0 R1 R2 @@ -1081,20 +1081,20 @@ vax_reg_parse (char c1, char c2, char c3, char c4) For speed, expect a string of whitespace to be reduced to a single ' '. This is the case for GNU AS, and is easy for other DEC-compatible assemblers. - + Knowledge about DEC VAX assembler operand notation lives here. This doesn't even know what a register name is, except it believes all register names are 2 or 3 characters, and lets vax_reg_parse() say what number each name represents. It does, however, know that PC, SP etc are special registers so it can detect addressing modes that are silly for those registers. - + Where possible, it delivers 1 fatal or 1 warning message if the operand is suspect. Exactly what we test for is still evolving. --- Arg block. - + There were a number of 'mismatched argument type' bugs to vip_op. The most general solution is to typedef each (of many) arguments. We used instead a typedef'd argument block. This is less modular @@ -1102,7 +1102,7 @@ vax_reg_parse (char c1, char c2, char c3, char c4) on most engines, and seems to keep programmers happy. It will have to be done properly if we ever want to use vip_op as a general-purpose module (it was designed to be). - + G^ Doesn't support DEC "G^" format operands. These always take 5 bytes @@ -1113,14 +1113,14 @@ vax_reg_parse (char c1, char c2, char c3, char c4) If there is some other use for "G^", feel free to code it in! speed - + If I nested if()s more, I could avoid testing (*err) which would save time, space and page faults. I didn't nest all those if()s for clarity and because I think the mode testing can be re-arranged 1st to test the - commoner constructs 1st. Does anybody have statistics on this? - + commoner constructs 1st. Does anybody have statistics on this? + error messages - + In future, we should be able to 'compose' error messages in a scratch area and give the user MUCH more informative error messages. Although this takes a little more code at run-time, it will make this module much more self- @@ -1129,18 +1129,18 @@ vax_reg_parse (char c1, char c2, char c3, char c4) the Un*x characters "$`*", that most users will expect from this AS. ---- - + The input is a string, ending with '\0'. - + We also require a 'hint' of what kind of operand is expected: so we can remind caller not to write into literals for instance. - + The output is a skeletal instruction. - + The algorithm has two parts. 1. extract the syntactic features (parse off all the @^#-()+[] mode crud); 2. express the @^#-()+[] as some parameters suited to further analysis. - + 2nd step is where we detect the googles of possible invalid combinations a human (or compiler) might write. Note that if we do a half-way decent assembler, we don't know how long to make (eg) displacement @@ -1157,19 +1157,19 @@ vax_reg_parse (char c1, char c2, char c3, char c4) - error text(s) why we couldn't understand the operand ---- - + To decode output of this, test errtxt. If errtxt[0] == '\0', then we had no errors that prevented parsing. Also, if we ever report an internal bug, errtxt[0] is set non-zero. So one test tells you if the other outputs are to be taken seriously. ---- - + Dec defines the semantics of address modes (and values) by a two-letter code, explained here. - + letter 1: access type - + a address calculation - no data access, registers forbidden b branch displacement m read - let go of bus - write back "modify" @@ -1177,9 +1177,9 @@ vax_reg_parse (char c1, char c2, char c3, char c4) v bit field address: like 'a' but registers are OK w write space no operator (eg ".long foo") [our convention] - + letter 2: data type (i.e. width, alignment) - + b byte d double precision floating point (D format) f single precision floating point (F format) @@ -1192,11 +1192,11 @@ vax_reg_parse (char c1, char c2, char c3, char c4) ? simple synthetic branch operand - unconditional synthetic JSB/JSR operand ! complex synthetic branch operand - + The '-?!' letter 2's are not for external consumption. They are used for various assemblers. Generally, all unknown widths are assumed 0. We don't limit your choice of width character. - + DEC operands are hard work to parse. For example, '@' as the first character means indirect (deferred) mode but elsewhere it is a shift operator. @@ -1205,9 +1205,9 @@ vax_reg_parse (char c1, char c2, char c3, char c4) We try hard not to parse anything that MIGHT be part of the expression buried in that syntax. For example if we see @...(Rn) we don't check for '-' before the '(' because mode @-(Rn) does not exist. - + After parsing we have: - + at 1 if leading '@' (or Un*x '*') len takes one value from " bilsw". eg B^ -> 'b'. hash 1 if leading '#' (or Un*x '$') @@ -1218,7 +1218,7 @@ vax_reg_parse (char c1, char c2, char c3, char c4) paren 1 if () are around register reg major register number 0:15 -1 means absent ndx index register number 0:15 -1 means absent - + Again, I dare not explain it: just trace ALL the code! Summary of vip_op outputs. @@ -1316,7 +1316,7 @@ vip_op (char *optext, struct vop *vopP) /* p points to what may be the beginning of an expression. We have peeled off the front all that is peelable. We know at, len, hash. - + Lets point q at the end of the text and parse that (backwards). */ for (q = p; *q; q++) @@ -1491,7 +1491,7 @@ vip_op (char *optext, struct vop *vopP) We will deliver a 4-bit reg, and a 4-bit mode. */ /* Case of branch operand. Different. No L^B^W^I^S^ allowed for instance. - + in: at ? len ? hash ? @@ -1500,7 +1500,7 @@ vip_op (char *optext, struct vop *vopP) paren ? reg ? ndx ? - + out: mode 0 reg -1 len ' ' @@ -1519,7 +1519,7 @@ vip_op (char *optext, struct vop *vopP) /* Since nobody seems to use it: comment this 'feature'(?) out for now. */ #ifdef NEVER /* Case of stand-alone operand. e.g. ".long foo" - + in: at ? len ? hash ? @@ -1528,7 +1528,7 @@ vip_op (char *optext, struct vop *vopP) paren ? reg ? ndx ? - + out: mode 0 reg -1 len ' ' @@ -1565,7 +1565,7 @@ vip_op (char *optext, struct vop *vopP) #endif /* Case of S^#. - + in: at 0 len 's' definition hash 1 demand @@ -1574,7 +1574,7 @@ vip_op (char *optext, struct vop *vopP) paren 0 by "()" scan logic because "S^" seen reg -1 or nn by mistake ndx -1 - + out: mode 0 reg -1 len 's' @@ -1606,9 +1606,9 @@ vip_op (char *optext, struct vop *vopP) err = _("S^# may only read-access"); } } - + /* Case of -(Rn), which is weird case. - + in: at 0 len ' hash 0 @@ -1617,7 +1617,7 @@ vip_op (char *optext, struct vop *vopP) paren 1 by definition reg present by definition ndx optional - + out: mode 7 reg present len ' ' @@ -1648,7 +1648,7 @@ vip_op (char *optext, struct vop *vopP) } /* Case of (Rn)+, which is slightly different. - + in: at len ' ' hash 0 @@ -1657,7 +1657,7 @@ vip_op (char *optext, struct vop *vopP) paren 1 by definition reg present by definition ndx optional - + out: mode 8+@ reg present len ' ' @@ -1679,7 +1679,7 @@ vip_op (char *optext, struct vop *vopP) } /* Case of #, without S^. - + in: at len ' ' or 'i' hash 1 by definition @@ -1688,7 +1688,7 @@ vip_op (char *optext, struct vop *vopP) paren 0 reg absent ndx optional - + out: mode 8+@ reg PC len ' ' or 'i' @@ -1727,7 +1727,7 @@ vip_op (char *optext, struct vop *vopP) /* Case of Rn. We separate this one because it has a few special errors the remaining modes lack. - + in: at optional len ' ' hash 0 by program logic @@ -1736,7 +1736,7 @@ vip_op (char *optext, struct vop *vopP) paren 0 by definition reg present by definition ndx optional - + out: mode 5+@ reg present len ' ' enforce no length @@ -1773,7 +1773,7 @@ vip_op (char *optext, struct vop *vopP) paren == 1 OR reg==-1 */ /* Rest of cases fit into one bunch. - + in: at optional len ' ' or 'b' or 'w' or 'l' hash 0 by program logic @@ -1782,7 +1782,7 @@ vip_op (char *optext, struct vop *vopP) paren optional reg optional ndx optional - + out: mode 10 + @ + len reg optional len ' ' or 'b' or 'w' or 'l' @@ -1832,15 +1832,15 @@ vip_op (char *optext, struct vop *vopP) knowledge of how you parse (or evaluate) your expressions. We do however strip off and decode addressing modes and operation mnemonic. - + The exploded instruction is returned to a struct vit of your choice. #include "vax-inst.h" to know what a struct vit is. - + This function's value is a string. If it is not "" then an internal logic error was found: read this code to assign meaning to the string. No argument string should generate such an error string: it means a bug in our code, not in the user's text. - + You MUST have called vip_begin() once before using this function. */ static void @@ -1865,7 +1865,7 @@ vip (struct vit *vitP, /* We build an exploded instruction here. */ if (*instring == ' ') ++instring; - + /* MUST end in end-of-string or exactly 1 space. */ for (p = instring; *p && *p != ' '; p++) ; diff --git a/gas/config/tc-xc16x.c b/gas/config/tc-xc16x.c index c4c84ae100..bcfc845175 100644 --- a/gas/config/tc-xc16x.c +++ b/gas/config/tc-xc16x.c @@ -1,6 +1,6 @@ /* tc-xc16x.c -- Assembler for the Infineon XC16X. Copyright (C) 2006-2015 Free Software Foundation, Inc. - Contributed by KPIT Cummins Infosystems + Contributed by KPIT Cummins Infosystems This file is part of GAS, the GNU Assembler. @@ -334,7 +334,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) *valP = 256 - (*valP); } } - + gas_cgen_md_apply_fix (fixP, valP, seg); return; } diff --git a/gas/config/tc-xc16x.h b/gas/config/tc-xc16x.h index 550b14735b..00038ae867 100644 --- a/gas/config/tc-xc16x.h +++ b/gas/config/tc-xc16x.h @@ -1,6 +1,6 @@ /* This file is tc-xc16x.h Copyright (C) 2006-2015 Free Software Foundation, Inc. - Contributed by KPIT Cummins Infosystems + Contributed by KPIT Cummins Infosystems This file is part of GAS, the GNU Assembler. diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c index 4cdb0ee8e0..981dc950b7 100644 --- a/gas/config/tc-xstormy16.c +++ b/gas/config/tc-xstormy16.c @@ -204,9 +204,9 @@ xstormy16_cons_fix_new (fragS *f, /* This can happen when gcc is generating debug output. For example it can create a stab with the address of a function: - + .stabs "foo:F(0,21)",36,0,0,@fptr(foo) - + Since this does not involve switching code pages, we just allow the reloc to be generated without any @fptr behaviour. */ @@ -337,7 +337,7 @@ md_pcrel_from_section (fixS * fixP, segT sec) || xstormy16_force_relocation (fixP)) /* The symbol is undefined, or it is defined but not in this section, - or the relocation will be relative to this symbol not the section symbol. + or the relocation will be relative to this symbol not the section symbol. Let the linker figure it out. */ return 0; diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 18307c1b52..7311a054d3 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -1712,7 +1712,7 @@ map_suffix_reloc_to_operator (bfd_reloc_code_real_type reloc) { struct suffix_reloc_map *sfx; unsigned char operator = (unsigned char) -1; - + for (sfx = &suffix_relocs[0]; sfx->suffix; sfx++) { if (sfx->reloc == reloc) @@ -2454,7 +2454,7 @@ xg_translate_idioms (char **popname, int *pnum_args, char **arg_strings) } /* Don't do anything special with NOPs inside FLIX instructions. They - are handled elsewhere. Real NOP instructions are always available + are handled elsewhere. Real NOP instructions are always available in configurations with FLIX, so this should never be an issue but check for it anyway. */ if (!cur_vinsn.inside_bundle && xtensa_nop_opcode == XTENSA_UNDEFINED @@ -2744,7 +2744,7 @@ xtensa_insnbuf_set_operand (xtensa_insnbuf slotbuf, if (xtensa_operand_is_PCrelative (xtensa_default_isa, opcode, operand) == 1) as_bad_where ((char *) file, line, - _("operand %d of '%s' has out of range value '%u'"), + _("operand %d of '%s' has out of range value '%u'"), operand + 1, xtensa_opcode_name (xtensa_default_isa, opcode), value); @@ -5043,7 +5043,7 @@ xtensa_find_unaligned_loops (bfd *abfd ATTRIBUTE_UNUSED, if (frag->fr_fix == 0) frag = next_non_empty_frag (frag); - + if (frag) { xtensa_insnbuf_from_chars @@ -5051,7 +5051,7 @@ xtensa_find_unaligned_loops (bfd *abfd ATTRIBUTE_UNUSED, fmt = xtensa_format_decode (isa, insnbuf); op_size = xtensa_format_length (isa, fmt); frag_addr = frag->fr_address % xtensa_fetch_width; - + if (frag_addr + op_size > xtensa_fetch_width) as_warn_where (frag->fr_file, frag->fr_line, _("unaligned loop: %d bytes at 0x%lx"), @@ -5193,7 +5193,7 @@ md_begin (void) xtensa_rsr_lcount_opcode = xtensa_opcode_lookup (isa, "rsr.lcount"); xtensa_waiti_opcode = xtensa_opcode_lookup (isa, "waiti"); - for (i = 0; i < xtensa_isa_num_formats (isa); i++) + for (i = 0; i < xtensa_isa_num_formats (isa); i++) { int format_slots = xtensa_format_num_slots (isa, i); if (format_slots > config_max_slots) @@ -5831,7 +5831,7 @@ xtensa_fix_adjustable (fixS *fixP) symbolS *expr_symbols = NULL; -void +void xtensa_symbol_new_hook (symbolS *sym) { if (is_leb128_expr && S_GET_SEGMENT (sym) == expr_section) @@ -7605,7 +7605,7 @@ xtensa_mark_zcl_first_insns (void) /* Handle a corner case that comes up in hardware diagnostics. The original assembly looks like this: - + loop aX, LabelA --not found by next_non_empty_frag loop aY, LabelB @@ -7623,7 +7623,7 @@ xtensa_mark_zcl_first_insns (void) { if (loop_frag->fr_type == rs_machine_dependent && (loop_frag->fr_subtype == RELAX_ALIGN_NEXT_OPCODE - || loop_frag->fr_subtype + || loop_frag->fr_subtype == RELAX_CHECK_ALIGN_NEXT_OPCODE)) targ_frag = loop_frag; else @@ -7663,13 +7663,13 @@ xtensa_mark_zcl_first_insns (void) sleb128 value, the linker is unable to adjust that value to account for link-time relaxation. Mark all the code between such symbols so that its size cannot be changed by linker relaxation. */ - + static void xtensa_mark_difference_of_two_symbols (void) { symbolS *expr_sym; - for (expr_sym = expr_symbols; expr_sym; + for (expr_sym = expr_symbols; expr_sym; expr_sym = symbol_get_tc (expr_sym)->next_expr_symbol) { expressionS *exp = symbol_get_value_expression (expr_sym); @@ -7678,7 +7678,7 @@ xtensa_mark_difference_of_two_symbols (void) { symbolS *left = exp->X_add_symbol; symbolS *right = exp->X_op_symbol; - + /* Difference of two symbols not in the same section are handled with relocations in the linker. */ if (S_GET_SEGMENT (left) == S_GET_SEGMENT (right)) @@ -7687,7 +7687,7 @@ xtensa_mark_difference_of_two_symbols (void) fragS *end; fragS *walk; - if (symbol_get_frag (left)->fr_address + if (symbol_get_frag (left)->fr_address <= symbol_get_frag (right)->fr_address) { start = symbol_get_frag (left); @@ -7703,7 +7703,7 @@ xtensa_mark_difference_of_two_symbols (void) walk = start->tc_frag_data.no_transform_end; else walk = start; - do + do { walk->tc_frag_data.is_no_transform = 1; walk = walk->fr_next; @@ -8269,7 +8269,7 @@ xtensa_sanity_check (void) for (fragP = frchP->frch_root; fragP; fragP = fragP->fr_next) { if (fragP->fr_type == rs_machine_dependent - && fragP->fr_subtype == RELAX_SLOTS + && fragP->fr_subtype == RELAX_SLOTS && fragP->tc_frag_data.slot_subtypes[0] == RELAX_IMMED) { static xtensa_insnbuf insnbuf = NULL; @@ -9556,7 +9556,7 @@ bytes_to_stretch (fragS *this_frag, int extra_bytes; int bytes_short = desired_diff - num_widens; - gas_assert (desired_diff >= 0 + gas_assert (desired_diff >= 0 && desired_diff < (signed) xtensa_fetch_width); if (desired_diff == 0) return 0; @@ -9917,20 +9917,20 @@ relax_frag_immed (segT segP, /* The first instruction in the relaxed sequence will go after the current wide instruction, and thus its symbolic immediates might not fit. */ - + istack_init (&istack); - num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP, + num_steps = xg_assembly_relax (&istack, &tinsn, segP, fragP, frag_offset + old_size, min_steps, stretch + old_size); gas_assert (num_steps >= min_steps && num_steps <= RELAX_IMMED_MAXSTEPS); - fragP->tc_frag_data.slot_subtypes[slot] + fragP->tc_frag_data.slot_subtypes[slot] = (int) RELAX_IMMED + num_steps; num_literal_bytes = get_num_stack_literal_bytes (&istack); - literal_diff + literal_diff = num_literal_bytes - fragP->tc_frag_data.literal_expansion[slot]; - + num_text_bytes = get_num_stack_text_bytes (&istack) + old_size; } } @@ -11079,7 +11079,7 @@ match_section_group (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *inf) { const char *gname = inf; const char *group_name = elf_group_name (sec); - + return (group_name == gname || (group_name != NULL && gname != NULL @@ -11120,7 +11120,7 @@ cache_literal_section (bfd_boolean use_abs_literals) if (*pcached) return *pcached; - + text_name = default_lit_sections.lit_prefix; if (! text_name || ! *text_name) { @@ -12419,7 +12419,7 @@ xg_clear_vinsn (vliw_insn *v) { int i; - memset (v, 0, offsetof (vliw_insn, slots) + memset (v, 0, offsetof (vliw_insn, slots) + sizeof(TInsn) * config_max_slots); v->format = XTENSA_UNDEFINED; @@ -12437,7 +12437,7 @@ xg_clear_vinsn (vliw_insn *v) static void xg_copy_vinsn (vliw_insn *dst, vliw_insn *src) { - memcpy (dst, src, + memcpy (dst, src, offsetof(vliw_insn, slots) + src->num_slots * sizeof(TInsn)); dst->insnbuf = src->insnbuf; memcpy (dst->slotbuf, src->slotbuf, src->num_slots * sizeof(xtensa_insnbuf)); diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h index c6c76998b6..b2e43fa5c2 100644 --- a/gas/config/tc-xtensa.h +++ b/gas/config/tc-xtensa.h @@ -107,7 +107,7 @@ enum xtensa_relax_statesE /* When the code density option is available, this will generate a NOP.N marked RELAX_NARROW. Otherwise, it will create an rs_fill fragment with a NOP in it. Once a frag has been converted to - RELAX_LOOP_END_ADD_NOP, it should never be changed back to + RELAX_LOOP_END_ADD_NOP, it should never be changed back to RELAX_LOOP_END. */ RELAX_LITERAL, @@ -174,7 +174,7 @@ enum xtensa_relax_statesE RELAX_UNREACHABLE frag. */ RELAX_ORG, - /* This marks the location as having previously been an rs_org frag. + /* This marks the location as having previously been an rs_org frag. rs_org frags are converted to fill-zero frags immediately after relaxation. However, we need to remember where they were so we can prevent the linker from changing the size of any frag between the diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c index fe6300f0be..4931a486d2 100644 --- a/gas/config/tc-z80.c +++ b/gas/config/tc-z80.c @@ -524,14 +524,14 @@ is_indir (const char *s) } /* Check whether a symbol involves a register. */ -static int +static int contains_register(symbolS *sym) { if (sym) { expressionS * ex = symbol_get_value_expression(sym); - return (O_register == ex->X_op) - || (ex->X_add_symbol && contains_register(ex->X_add_symbol)) + return (O_register == ex->X_op) + || (ex->X_add_symbol && contains_register(ex->X_add_symbol)) || (ex->X_op_symbol && contains_register(ex->X_op_symbol)); } else @@ -693,7 +693,7 @@ void z80_cons_fix_new (fragS *frag_p, int offset, int nbytes, expressionS *exp) BFD_RELOC_32 }; - if (nbytes < 1 || nbytes > 4) + if (nbytes < 1 || nbytes > 4) { as_bad (_("unsupported BFD relocation size %u"), nbytes); } @@ -1822,7 +1822,7 @@ const pseudo_typeS md_pseudo_table[] = { "d32", cons, 4}, { "def24", cons, 3}, { "def32", cons, 4}, - { "defb", emit_data, 1}, + { "defb", emit_data, 1}, { "defs", s_space, 1}, /* Synonym for ds on some assemblers. */ { "defw", cons, 2}, { "ds", s_space, 1}, /* Fill with bytes rather than words. */ @@ -1929,12 +1929,12 @@ md_assemble (char* str) } else if ((*p) && (!ISSPACE (*p))) as_bad (_("syntax error")); - else + else { buf[i] = 0; p = skip_space (p); key = buf; - + insp = bsearch (&key, instab, ARRAY_SIZE (instab), sizeof (instab[0]), key_cmp); if (!insp) @@ -1997,7 +1997,7 @@ md_apply_fix (fixS * fixP, valueT* valP, segT seg ATTRIBUTE_UNUSED) if (val > 255 || val < -128) as_warn_where (fixP->fx_file, fixP->fx_line, _("overflow")); *p_lit++ = val; - fixP->fx_no_overflow = 1; + fixP->fx_no_overflow = 1; if (fixP->fx_addsy == NULL) fixP->fx_done = 1; break; @@ -2005,7 +2005,7 @@ md_apply_fix (fixS * fixP, valueT* valP, segT seg ATTRIBUTE_UNUSED) case BFD_RELOC_16: *p_lit++ = val; *p_lit++ = (val >> 8); - fixP->fx_no_overflow = 1; + fixP->fx_no_overflow = 1; if (fixP->fx_addsy == NULL) fixP->fx_done = 1; break; @@ -2014,7 +2014,7 @@ md_apply_fix (fixS * fixP, valueT* valP, segT seg ATTRIBUTE_UNUSED) *p_lit++ = val; *p_lit++ = (val >> 8); *p_lit++ = (val >> 16); - fixP->fx_no_overflow = 1; + fixP->fx_no_overflow = 1; if (fixP->fx_addsy == NULL) fixP->fx_done = 1; break; diff --git a/gas/config/tc-z80.h b/gas/config/tc-z80.h index bef8828ac8..2b14fd6737 100644 --- a/gas/config/tc-z80.h +++ b/gas/config/tc-z80.h @@ -102,7 +102,7 @@ extern void z80_cons_fix_new (fragS *, int, int, expressionS *); P2VAR to the truncated power of two of sizes up to eight bytes. */ #define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) (P2VAR) = 0 -/* It does not make any sense to perform arithmetic on the numbers +/* It does not make any sense to perform arithmetic on the numbers we use to identify registers. */ #define md_register_arithmetic 0 diff --git a/gas/config/te-generic.h b/gas/config/te-generic.h index 4a09e3bf2b..7b7143fa05 100644 --- a/gas/config/te-generic.h +++ b/gas/config/te-generic.h @@ -19,7 +19,7 @@ /* This file is te-generic.h and is intended to be a template for target environment specific header files. - + It is my intent that this file will evolve into a file suitable for config, compile, and copying as an aid for testing and porting. xoxorich. */ diff --git a/gas/config/te-vms.c b/gas/config/te-vms.c index e73b18aff0..ea732d9a12 100644 --- a/gas/config/te-vms.c +++ b/gas/config/te-vms.c @@ -342,6 +342,6 @@ vms_dwarf2_file_name (const char *filename, const char *dirname) static char buff [255 + 7]; vms_file_stats_name (dirname, filename, 0, 0, 0, &ver); - snprintf (buff, 255 + 7, "%s;%d", filename, ver); + snprintf (buff, 255 + 7, "%s;%d", filename, ver); return buff; } diff --git a/gas/config/xtensa-relax.c b/gas/config/xtensa-relax.c index 4b999d5a20..ec0b79bdb2 100644 --- a/gas/config/xtensa-relax.c +++ b/gas/config/xtensa-relax.c @@ -247,7 +247,7 @@ struct string_pattern_pair_struct addi.n a4, 0x1010 => addi a4, 0x1010 => addmi a4, 0x1010 - => addmi a4, 0x1000, addi a4, 0x10. + => addmi a4, 0x1000, addi a4, 0x10. See the comments in xg_assembly_relax for some important details regarding how these chains must be built. */ @@ -351,7 +351,7 @@ static string_pattern_pair widen_spec_list[] = out-of-range branch. Put the wide branch relaxations first in the table since they are more efficient than the branch-around relaxations. */ - + {"beqz %as,%label ? IsaUseWideBranches", "WIDE.beqz %as,%label"}, {"bnez %as,%label ? IsaUseWideBranches", "WIDE.bnez %as,%label"}, {"bgez %as,%label ? IsaUseWideBranches", "WIDE.bgez %as,%label"}, @@ -376,7 +376,7 @@ static string_pattern_pair widen_spec_list[] = {"bnall %as,%at,%label ? IsaUseWideBranches", "WIDE.bnall %as,%at,%label"}, {"bbc %as,%at,%label ? IsaUseWideBranches", "WIDE.bbc %as,%at,%label"}, {"bbs %as,%at,%label ? IsaUseWideBranches", "WIDE.bbs %as,%at,%label"}, - + /* Widening branch comparisons eq/ne to zero. Prefer relaxing to narrow branches if the density option is available. */ {"beqz %as,%label ? IsaUseDensityInstruction", "bnez.n %as,%LABEL;j %label;LABEL"}, @@ -1543,7 +1543,7 @@ transition_applies (insn_pattern *initial_insn, else if (!strcmp (option_name, "Loops")) option_available = (XCHAL_HAVE_LOOPS == 1); else if (!strcmp (option_name, "WideBranches")) - option_available + option_available = (XCHAL_HAVE_WIDE_BRANCHES == 1 && produce_flix == FLIX_ALL); else if (!strcmp (option_name, "PredictedBranches")) option_available @@ -1612,7 +1612,7 @@ build_transition (insn_pattern *initial_insn, precond_e *precond; insn_repl_e *r; - if (!wide_branch_opcode (initial_insn->t.opcode_name, ".w18", &opcode) + if (!wide_branch_opcode (initial_insn->t.opcode_name, ".w18", &opcode) && !wide_branch_opcode (initial_insn->t.opcode_name, ".w15", &opcode)) opcode = xtensa_opcode_lookup (isa, initial_insn->t.opcode_name); diff --git a/gas/configure.ac b/gas/configure.ac index 8e05fb89bd..3f757046c7 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -9,12 +9,12 @@ dnl This file is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3 of the License, or dnl (at your option) any later version. -dnl +dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. -dnl +dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; see the file COPYING3. If not see dnl . diff --git a/gas/configure.com b/gas/configure.com index a48abea55e..0fb5e01765 100644 --- a/gas/configure.com +++ b/gas/configure.com @@ -2,19 +2,19 @@ $! configure.com $! This file sets things up to build gas on a VMS system to generate object $! files for a VMS system. We do not use the configure script, since we $! do not have /bin/sh to execute it. -$! +$! $! Copyright (C) 2012-2015 Free Software Foundation, Inc. $! $! This file is free software; you can redistribute it and/or modify $! it under the terms of the GNU General Public License as published by $! the Free Software Foundation; either version 3 of the License, or $! (at your option) any later version. -$! +$! $! This program is distributed in the hope that it will be useful, $! but WITHOUT ANY WARRANTY; without even the implied warranty of $! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the $! GNU General Public License for more details. -$! +$! $! You should have received a copy of the GNU General Public License $! along with this program; see the file COPYING3. If not see $! . @@ -238,7 +238,7 @@ $ LIBBFD = ",[-.bfd]libbfd.olb/lib" $ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib" $ LIBOPCODES = ",[-.opcodes]libopcodes.olb/lib" $! -$ AS_OBJS="targ-cpu," + FILES +$ AS_OBJS="targ-cpu," + FILES $! $ write sys$output "CFLAGS=",CFLAGS $! diff --git a/gas/configure.tgt b/gas/configure.tgt index d14bcdf5fa..00fa10474a 100644 --- a/gas/configure.tgt +++ b/gas/configure.tgt @@ -6,12 +6,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING3. If not see # . @@ -352,7 +352,7 @@ case ${generic_target} in moxie-*-uclinux) fmt=elf em=linux ;; moxie-*-moxiebox*) fmt=elf endian=little ;; moxie-*-*) fmt=elf ;; - + mt-*-elf) fmt=elf bfd_gas=yes ;; msp430-*-*) fmt=elf ;; @@ -461,7 +461,7 @@ case ${generic_target} in visium-*-elf) fmt=elf ;; xstormy16-*-*) fmt=elf ;; - + xgate-*-*) fmt=elf ;; xtensa*-*-*) fmt=elf ;; diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index ecaccc9cc2..07aa646acf 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -1296,7 +1296,7 @@ process_entries (segT seg, struct line_entry *e) section, as well as our sub-sections, and we have to ensure that all of the sub-sections are merged into a proper .debug_line section before a debugger sees them. */ - + sec_name = bfd_get_section_name (stdoutput, seg); if (strcmp (sec_name, ".text") != 0) { diff --git a/gas/itbl-lex.l b/gas/itbl-lex.l index 756d6a8a1a..e97b9cd97d 100644 --- a/gas/itbl-lex.l +++ b/gas/itbl-lex.l @@ -8,7 +8,7 @@ the Free Software Foundation; either version 3, or (at your option) any later version. - GAS is distributed in the hope that it will be useful, + GAS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -81,21 +81,21 @@ HEX [0-9A-Fa-f] } ";"|"#" { int c; - while ((c = input ()) != EOF) + while ((c = input ()) != EOF) { - if (c == '\n') + if (c == '\n') { unput (c); break; } } } -"\n" { - insntbl_line++; +"\n" { + insntbl_line++; MDBG (("in lex, NL = %d (x%x)\n", NL, NL)); - return NL; + return NL; } -" "|"\t" { +" "|"\t" { } . { MDBG (("char = %x, %d\n", yytext[0], yytext[0])); @@ -104,9 +104,9 @@ HEX [0-9A-Fa-f] %% #ifndef yywrap -int -yywrap () - { - return 1; +int +yywrap () + { + return 1; } #endif diff --git a/gas/itbl-parse.y b/gas/itbl-parse.y index 0e62af124b..3aeb387935 100644 --- a/gas/itbl-parse.y +++ b/gas/itbl-parse.y @@ -20,7 +20,7 @@ %{ -/* +/* Yacc grammar for instruction table entries. @@ -43,7 +43,7 @@ The table is an ordinary text file that the GNU assembler reads when it starts. Using the information in the table, the assembler generates an internal list of valid coprocessor registers and functions. The assembler uses this internal list in addition to the -standard MIPS registers and instructions which are built-in to the +standard MIPS registers and instructions which are built-in to the assembler during code generation. To specify the coprocessor table when invoking the GNU assembler, use @@ -125,7 +125,7 @@ Here is the grammar for the coprocessor table: entrydef -> type name val entrydef -> 'insn' name val funcdef ; type of entry (instruction) - z -> 'p'['0'..'3'] ; processor number + z -> 'p'['0'..'3'] ; processor number type -> ['dreg' | 'creg' | 'greg' ] ; type of entry (register) ; 'dreg', 'creg' or 'greg' specifies a data, control, or general ; register mnemonic, respectively @@ -139,10 +139,10 @@ Here is the grammar for the coprocessor table: field -> [','] ftype frange flags flags -> ['*' flagexpr] flagexpr -> '[' flagexpr ']' - flagexpr -> val '|' flagexpr + flagexpr -> val '|' flagexpr ftype -> [ type | 'immed' | 'addr' ] ; 'immed' specifies an immediate value; see grammar for "val" above - ; 'addr' specifies a C identifier; name of symbol to be resolved at + ; 'addr' specifies a C identifier; name of symbol to be resolved at ; link time frange -> ':' val '-' val ; starting to ending bit positions, where ; where 0 is least significant bit @@ -150,9 +150,9 @@ Here is the grammar for the coprocessor table: comment -> [';'|'#'] [char]* char -> any printable character - ltr -> ['a'..'z'|'A'..'Z'] + ltr -> ['a'..'z'|'A'..'Z'] dec -> ['0'..'9']* ; value in decimal - hex -> '0x'['0'..'9' | 'a'..'f' | 'A'..'F']* ; value in hexadecimal + hex -> '0x'['0'..'9' | 'a'..'f' | 'A'..'F']* ; value in hexadecimal Examples @@ -164,7 +164,7 @@ The table: p1 dreg d1 1 ; data register "d1" for COP1 has value 1 p1 creg c3 3 ; ctrl register "c3" for COP1 has value 3 - p3 func fill 0x1f:24-20 ; function "fill" for COP3 has value 31 and + p3 func fill 0x1f:24-20 ; function "fill" for COP3 has value 31 and ; no fields will allow the assembler to accept the following coprocessor instructions: @@ -172,8 +172,8 @@ will allow the assembler to accept the following coprocessor instructions: LWC1 d1,0x100 ($2) fill -Here, the general purpose register "$2", and instruction "LWC1", are standard -mnemonics built-in to the MIPS assembler. +Here, the general purpose register "$2", and instruction "LWC1", are standard +mnemonics built-in to the MIPS assembler. Example 2: @@ -182,9 +182,9 @@ The table: p3 dreg d3 3 ; data register "d3" for COP3 has value 3 p3 creg c2 22 ; control register "c2" for COP3 has value 22 - p3 func fee 0x1f:24-20 dreg:17-13 creg:12-8 immed:7-0 - ; function "fee" for COP3 has value 31, and 3 fields - ; consisting of a data register, a control register, + p3 func fee 0x1f:24-20 dreg:17-13 creg:12-8 immed:7-0 + ; function "fee" for COP3 has value 31, and 3 fields + ; consisting of a data register, a control register, ; and an immediate value. will allow the assembler to accept the following coprocessor instruction: @@ -195,7 +195,7 @@ and will emit the object code: 31-26 25 24-20 19-18 17-13 12-8 7-0 COPz CO fun dreg creg immed - 010011 1 11111 00 00011 10110 00000001 + 010011 1 11111 00 00011 10110 00000001 0x4ff07601 @@ -216,8 +216,8 @@ instruction: and will emit the object code: 31-26 25 24-20 19-18 17-13 12-8 7-0 - COPz CO fun dreg creg - 010011 1 11111 00 00011 10110 00000001 + COPz CO fun dreg creg + 010011 1 11111 00 00011 10110 00000001 0x4ff07601 @@ -230,7 +230,7 @@ Additional notes: Encoding of ranges: To handle more than one bit position range within an instruction, use 0s to mask out the ranges which don't apply. -May decide to modify the syntax to allow commas separate multiple +May decide to modify the syntax to allow commas separate multiple ranges within an instruction (range','range). Changes in grammar: @@ -238,7 +238,7 @@ Changes in grammar: was deleted from the original format such that we now count the fields. ---- -FIXME! should really change lexical analyzer +FIXME! should really change lexical analyzer to recognize 'dreg' etc. in context sensitive way. Currently function names or mnemonics may be incorrectly parsed as keywords @@ -263,13 +263,13 @@ FIXME! hex is ambiguous with any digit #if DBG_LVL >= 1 #define DBG(x) printf x #else -#define DBG(x) +#define DBG(x) #endif #if DBG_LVL >= 2 #define DBGL2(x) printf x #else -#define DBGL2(x) +#define DBGL2(x) #endif static int sbit, ebit; @@ -278,7 +278,7 @@ static int yyerror (const char *); %} -%union +%union { char *str; int num; @@ -307,7 +307,7 @@ entrys: entry: pnum regtype name value NL { - DBG (("line %d: entry pnum=%d type=%d name=%s value=x%x\n", + DBG (("line %d: entry pnum=%d type=%d name=%s value=x%x\n", insntbl_line, $1, $2, $3, $4)); itbl_add_reg ($1, $2, $3, $4); } @@ -331,12 +331,12 @@ fieldspecs: ; ftype: - regtype + regtype { DBGL2 (("ftype\n")); $$ = $1; } - | ADDR + | ADDR { DBGL2 (("addr\n")); $$ = ADDR; @@ -351,7 +351,7 @@ ftype: fieldspec: ftype range flags { - DBG (("line %d: field type=%d sbit=%d ebit=%d, flags=0x%x\n", + DBG (("line %d: field type=%d sbit=%d ebit=%d, flags=0x%x\n", insntbl_line, $1, sbit, ebit, $3)); itbl_add_operand (insn, $1, sbit, ebit, $3); } @@ -378,7 +378,7 @@ flags: DBGL2 (("flags=%d\n", $2)); $$ = $2; } - | + | { $$ = 0; } @@ -397,7 +397,7 @@ range: ebit = 0; } ; - + pnum: PNUM { @@ -428,7 +428,7 @@ name: ID { DBGL2 (("name=%s\n",$1)); - $$ = $1; + $$ = $1; } ; diff --git a/gas/makefile.vms b/gas/makefile.vms index cca98ef32d..ddb7dd0da3 100644 --- a/gas/makefile.vms +++ b/gas/makefile.vms @@ -9,12 +9,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING3. If not see # .