diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-21 09:17:53 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-21 18:26:35 +0930 |
commit | e01e1cee39777b6278ff01502742347247e8dfd7 (patch) | |
tree | 59c5d6f34e19555ac544023bd8d096d17f4fd024 /gas/config/tc-mmix.c | |
parent | d285ba8d064bbcfbf518cd6cf0142b5722c8215a (diff) | |
download | gdb-e01e1cee39777b6278ff01502742347247e8dfd7.zip gdb-e01e1cee39777b6278ff01502742347247e8dfd7.tar.gz gdb-e01e1cee39777b6278ff01502742347247e8dfd7.tar.bz2 |
Rearrange symbol_create parameters
These functions take an offset within frag, frag within section, and
section parameter. So it makes sense to order the parameters as
section, frag, offset.
* symbols.h (symbol_new, symbol_create, local_symbol_make),
(symbol_temp_new): Arrange params as section, frag, offset.
* symbols.c: Adjust to suit.
* as.c: Likewise.
* cgen.c: Likewise.
* dwarf2dbg.c: Likewise.
* ecoff.c: Likewise.
* expr.c: Likewise.
* itbl-ops.c: Likewise.
* read.c: Likewise.
* stabs.c: Likewise.
* subsegs.c: Likewise.
* config/obj-coff.c: Likewise.
* config/obj-elf.c: Likewise.
* config/obj-macho.c: Likewise.
* config/tc-aarch64.c: Likewise.
* config/tc-alpha.c: Likewise.
* config/tc-arc.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-avr.c: Likewise.
* config/tc-cr16.c: Likewise.
* config/tc-cris.c: Likewise.
* config/tc-csky.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-hppa.c: Likewise.
* config/tc-i386.c: Likewise.
* config/tc-ia64.c: Likewise.
* config/tc-m32r.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-mmix.c: Likewise.
* config/tc-mn10200.c: Likewise.
* config/tc-mn10300.c: Likewise.
* config/tc-nds32.c: Likewise.
* config/tc-nios2.c: Likewise.
* config/tc-ppc.c: Likewise.
* config/tc-riscv.c: Likewise.
* config/tc-s390.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-tic4x.c: Likewise.
* config/tc-tic54x.c: Likewise.
* config/tc-xtensa.c: Likewise.
Diffstat (limited to 'gas/config/tc-mmix.c')
-rw-r--r-- | gas/config/tc-mmix.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c index fb1f3d2..82a69f1 100644 --- a/gas/config/tc-mmix.c +++ b/gas/config/tc-mmix.c @@ -785,8 +785,8 @@ mmix_md_begin (void) /* Alternatively, we could diddle with '$' and the following number, but keeping the registers as symbols helps keep parsing simple. */ sprintf (buf, "$%d", i); - symbol_table_insert (symbol_new (buf, reg_section, i, - &zero_address_frag)); + symbol_table_insert (symbol_new (buf, reg_section, + &zero_address_frag, i)); } /* Insert mmixal built-in names if allowed. */ @@ -795,21 +795,21 @@ mmix_md_begin (void) for (i = 0; mmix_spec_regs[i].name != NULL; i++) symbol_table_insert (symbol_new (mmix_spec_regs[i].name, reg_section, - mmix_spec_regs[i].number + 256, - &zero_address_frag)); + &zero_address_frag, + mmix_spec_regs[i].number + 256)); /* FIXME: Perhaps these should be recognized as specials; as field names for those instructions. */ - symbol_table_insert (symbol_new ("ROUND_CURRENT", reg_section, 512, - &zero_address_frag)); - symbol_table_insert (symbol_new ("ROUND_OFF", reg_section, 512 + 1, - &zero_address_frag)); - symbol_table_insert (symbol_new ("ROUND_UP", reg_section, 512 + 2, - &zero_address_frag)); - symbol_table_insert (symbol_new ("ROUND_DOWN", reg_section, 512 + 3, - &zero_address_frag)); - symbol_table_insert (symbol_new ("ROUND_NEAR", reg_section, 512 + 4, - &zero_address_frag)); + symbol_table_insert (symbol_new ("ROUND_CURRENT", reg_section, + &zero_address_frag, 512)); + symbol_table_insert (symbol_new ("ROUND_OFF", reg_section, + &zero_address_frag, 512 + 1)); + symbol_table_insert (symbol_new ("ROUND_UP", reg_section, + &zero_address_frag, 512 + 2)); + symbol_table_insert (symbol_new ("ROUND_DOWN", reg_section, + &zero_address_frag, 512 + 3)); + symbol_table_insert (symbol_new ("ROUND_NEAR", reg_section, + &zero_address_frag, 512 + 4)); } } @@ -3520,8 +3520,8 @@ mmix_md_end (void) sprintf (locsymbol, ":%s%s", MMIX_LOC_SECTION_START_SYMBOL_PREFIX, ".text"); symbolP - = symbol_new (locsymbol, absolute_section, lowest_text_loc, - &zero_address_frag); + = symbol_new (locsymbol, absolute_section, &zero_address_frag, + lowest_text_loc); S_SET_EXTERNAL (symbolP); } @@ -3536,8 +3536,8 @@ mmix_md_end (void) sprintf (locsymbol, ":%s%s", MMIX_LOC_SECTION_START_SYMBOL_PREFIX, ".data"); symbolP - = symbol_new (locsymbol, absolute_section, lowest_data_loc, - &zero_address_frag); + = symbol_new (locsymbol, absolute_section, &zero_address_frag, + lowest_data_loc); S_SET_EXTERNAL (symbolP); } @@ -3845,9 +3845,8 @@ mmix_parse_predefined_name (char *name, expressionS *expP) script. */ symp = symbol_find (name); if (symp == NULL) - symp = symbol_new (name, text_section, - 0x10 * (handler_charp + 1 - handler_chars), - &zero_address_frag); + symp = symbol_new (name, text_section, &zero_address_frag, + 0x10 * (handler_charp + 1 - handler_chars)); } else { @@ -3906,8 +3905,8 @@ mmix_parse_predefined_name (char *name, expressionS *expP) { symbol_table_insert (symbol_new (predefined_abs_syms[i].name, absolute_section, - predefined_abs_syms[i].val, - &zero_address_frag)); + &zero_address_frag, + predefined_abs_syms[i].val)); /* Let gas find the symbol we just created, through its ordinary lookup. */ |