diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-10-24 07:36:40 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2005-10-24 07:36:40 +0000 |
commit | 5e0bd1769ddea4d4b75770e2b9bced019ecbca2d (patch) | |
tree | 3529f749bd11549b015e64a28a6fab6279be8a8d /gas/config | |
parent | d30e8e7c0e2007a38a7648b5496d7fdf14836078 (diff) | |
download | gdb-5e0bd1769ddea4d4b75770e2b9bced019ecbca2d.zip gdb-5e0bd1769ddea4d4b75770e2b9bced019ecbca2d.tar.gz gdb-5e0bd1769ddea4d4b75770e2b9bced019ecbca2d.tar.bz2 |
gas/
2005-10-24 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (declare_register): Call symbol_create.
(md_begin): Remove local variables total, ar_base, and cr_base.
Start loops for registers at their respective first one. Don't
update md.regsym for alias names. Generate alias name tp for r13.
gas/testsuite/
2005-10-24 Jan Beulich <jbeulich@novell.com>
* gas/ia64/regs.pl: Also check tp alias of r13.
* gas/ia64/regs.s: Regenerate.
* gas/ia64/regs.d: Adjust.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-ia64.c | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 19b5769..5da3098 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -5599,7 +5599,7 @@ declare_register (name, regnum) const char *err; symbolS *sym; - sym = symbol_new (name, reg_section, regnum, &zero_address_frag); + sym = symbol_create (name, reg_section, regnum, &zero_address_frag); err = hash_insert (md.reg_hash, S_GET_NAME (sym), (PTR) sym); if (err) @@ -7366,7 +7366,7 @@ extra_goodness (int templ, int slot) void md_begin () { - int i, j, k, t, total, ar_base, cr_base, goodness, best, regnum, ok; + int i, j, k, t, goodness, best, regnum, ok; const char *err; char name[8]; @@ -7541,51 +7541,42 @@ md_begin () md.entry_hash = hash_new (); /* general registers: */ - - total = 128; - for (i = 0; i < total; ++i) + for (i = REG_GR; i < REG_GR + 128; ++i) { sprintf (name, "r%d", i - REG_GR); md.regsym[i] = declare_register (name, i); } /* floating point registers: */ - total += 128; - for (; i < total; ++i) + for (i = REG_FR; i < REG_FR + 128; ++i) { sprintf (name, "f%d", i - REG_FR); md.regsym[i] = declare_register (name, i); } /* application registers: */ - total += 128; - ar_base = i; - for (; i < total; ++i) + for (i = REG_AR; i < REG_AR + 128; ++i) { sprintf (name, "ar%d", i - REG_AR); md.regsym[i] = declare_register (name, i); } /* control registers: */ - total += 128; - cr_base = i; - for (; i < total; ++i) + for (i = REG_CR; i < REG_CR + 128; ++i) { sprintf (name, "cr%d", i - REG_CR); md.regsym[i] = declare_register (name, i); } /* predicate registers: */ - total += 64; - for (; i < total; ++i) + for (i = REG_P; i < REG_P + 64; ++i) { sprintf (name, "p%d", i - REG_P); md.regsym[i] = declare_register (name, i); } /* branch registers: */ - total += 8; - for (; i < total; ++i) + for (i = REG_BR; i < REG_BR + 8; ++i) { sprintf (name, "b%d", i - REG_BR); md.regsym[i] = declare_register (name, i); @@ -7606,17 +7597,16 @@ md_begin () } /* define synonyms for application registers: */ - for (i = REG_AR; i < REG_AR + NELEMS (ar); ++i) - md.regsym[i] = declare_register (ar[i - REG_AR].name, - REG_AR + ar[i - REG_AR].regnum); + for (i = 0; i < NELEMS (ar); ++i) + declare_register (ar[i].name, REG_AR + ar[i].regnum); /* define synonyms for control registers: */ - for (i = REG_CR; i < REG_CR + NELEMS (cr); ++i) - md.regsym[i] = declare_register (cr[i - REG_CR].name, - REG_CR + cr[i - REG_CR].regnum); + for (i = 0; i < NELEMS (cr); ++i) + declare_register (cr[i].name, REG_CR + cr[i].regnum); declare_register ("gp", REG_GR + 1); declare_register ("sp", REG_GR + 12); + declare_register ("tp", REG_GR + 13); declare_register ("rp", REG_BR + 0); /* pseudo-registers used to specify unwind info: */ |