diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-03-15 17:30:31 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-03-15 17:30:31 +0000 |
commit | c3fe08facbc8d8e8e0bdff27a01c0c77a03a5047 (patch) | |
tree | e452b44b07f1d8277eb0f51d1e53c87222e18515 /gas | |
parent | 4061927e10148290f821a3bce1b20870bf01534a (diff) | |
download | gdb-c3fe08facbc8d8e8e0bdff27a01c0c77a03a5047.zip gdb-c3fe08facbc8d8e8e0bdff27a01c0c77a03a5047.tar.gz gdb-c3fe08facbc8d8e8e0bdff27a01c0c77a03a5047.tar.bz2 |
gas/
2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (md_begin): Use i386_regtab_size to scan
i386_regtab.
(parse_register): Use i386_regtab_size instead of ARRAY_SIZE
on i386_regtab.
opcodes/
2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
* i386-opc.c: Include "libiberty.h".
(i386_regtab): Remove the last entry.
(i386_regtab_size): New.
(i386_float_regtab_size): Likewise.
* i386-opc.h (i386_regtab_size): New.
(i386_float_regtab_size): Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index da20b24..24ac6e7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2007-03-15 H.J. Lu <hongjiu.lu@intel.com> + + * config/tc-i386.c (md_begin): Use i386_regtab_size to scan + i386_regtab. + (parse_register): Use i386_regtab_size instead of ARRAY_SIZE + on i386_regtab. + 2007-03-15 Alexandre Oliva <aoliva@redhat.com> PR gas/4184 diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 26684c8..0f3077c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1238,8 +1238,9 @@ md_begin () reg_hash = hash_new (); { const reg_entry *regtab; + unsigned int regtab_size = i386_regtab_size; - for (regtab = i386_regtab; regtab->reg_name != NULL; regtab++) + for (regtab = i386_regtab; regtab_size--; regtab++) { hash_err = hash_insert (reg_hash, regtab->reg_name, (PTR) regtab); if (hash_err) @@ -5791,7 +5792,7 @@ parse_register (char *reg_string, char **end_op) know (e->X_op == O_register); know (e->X_add_number >= 0 - && (valueT) e->X_add_number < ARRAY_SIZE (i386_regtab)); + && (valueT) e->X_add_number < i386_regtab_size); r = i386_regtab + e->X_add_number; *end_op = input_line_pointer; } |