diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-12-17 19:41:57 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-12-17 19:41:57 +0000 |
commit | 4746505869ddb9f95da81ff85b97c9c78f8c4cb5 (patch) | |
tree | f7cec578e9a419d7564af0eac64869686f2c34a7 /gas | |
parent | 4a3523fa63382284cdcfe2c574e51446bf6ccfaf (diff) | |
download | gdb-4746505869ddb9f95da81ff85b97c9c78f8c4cb5.zip gdb-4746505869ddb9f95da81ff85b97c9c78f8c4cb5.tar.gz gdb-4746505869ddb9f95da81ff85b97c9c78f8c4cb5.tar.bz2 |
2007-12-17 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (output_insn): Use ARRAY_SIZE.
(lex_got): Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index e1de1f0..6a6fa5e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2007-12-17 H.J. Lu <hongjiu.lu@intel.com> + * config/tc-i386.c (output_insn): Use ARRAY_SIZE. + (lex_got): Likewise. + +2007-12-17 H.J. Lu <hongjiu.lu@intel.com> + * config/tc-i386.c (output_insn): Use FRAG_APPEND_1_CHAR instead of frag_more/md_number_to_chars. (md_short_jump_size): Removed. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 1906201..b33d1be 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4962,6 +4962,7 @@ output_insn (void) /* Output normal instructions here. */ char *p; unsigned char *q; + unsigned int j; unsigned int prefix; switch (i.tm.opcode_length) @@ -4995,13 +4996,9 @@ check_prefix: } /* The prefix bytes. */ - for (q = i.prefix; - q < i.prefix + sizeof (i.prefix) / sizeof (i.prefix[0]); - q++) - { - if (*q) - FRAG_APPEND_1_CHAR (*q); - } + for (j = ARRAY_SIZE (i.prefix), q = i.prefix; j > 0; j--, q++) + if (*q) + FRAG_APPEND_1_CHAR (*q); /* Now the opcode; be careful about word order here! */ if (i.tm.opcode_length == 1) @@ -5451,7 +5448,7 @@ lex_got (enum bfd_reloc_code_real *reloc, if (is_end_of_line[(unsigned char) *cp] || *cp == ',') return NULL; - for (j = 0; j < sizeof (gotrel) / sizeof (gotrel[0]); j++) + for (j = 0; j < ARRAY_SIZE (gotrel); j++) { int len; |