diff options
author | Alan Modra <amodra@gmail.com> | 2001-06-06 10:23:39 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-06-06 10:23:39 +0000 |
commit | cb9401fc47194d97851787942c77aa61c3a6dd46 (patch) | |
tree | 4ca7dd3d9d0da76ce66a93b86d3f06431ddcb03e | |
parent | 3c5cdb543e1f70a38fe2959044eb1976c80ccbf1 (diff) | |
download | gdb-cb9401fc47194d97851787942c77aa61c3a6dd46.zip gdb-cb9401fc47194d97851787942c77aa61c3a6dd46.tar.gz gdb-cb9401fc47194d97851787942c77aa61c3a6dd46.tar.bz2 |
* config/tc-i386.c (md_assemble): Handle Pentium4 branch hints.
<JumpByte, JumpDword insn output>: Remove dead code.
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 30 |
2 files changed, 24 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index b7e0b11..a7510d0 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2001-06-06 Alan Modra <amodra@bigpond.net.au> + + * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints. + <JumpByte, JumpDword insn output>: Remove dead code. + 2001-06-06 Tracy Kuhrt <Tracy.Kuhrt@microchip.com> * as.c (parse_args): Correct option name "listing-lhs-width2". diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 2a13bd9..c235413 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2720,6 +2720,13 @@ md_assemble (line) i.prefixes -= 1; code16 ^= CODE16; } + /* Pentium4 branch hints. */ + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */ + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */) + { + prefix++; + i.prefixes--; + } if (i.prefix[REX_PREFIX]) { prefix++; @@ -2739,6 +2746,9 @@ md_assemble (line) p = frag_more (prefix + 1); if (i.prefix[DATA_PREFIX]) *p++ = DATA_PREFIX_OPCODE; + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE) + *p++ = i.prefix[SEG_PREFIX]; if (i.prefix[REX_PREFIX]) *p++ = i.prefix[REX_PREFIX]; *p = i.tm.base_opcode; @@ -2769,6 +2779,13 @@ md_assemble (line) FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE); i.prefixes -= 1; } + /* Pentium4 branch hints. */ + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */ + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */) + { + FRAG_APPEND_1_CHAR (i.prefix[SEG_PREFIX]); + i.prefixes--; + } } else { @@ -2799,17 +2816,8 @@ md_assemble (line) if (i.prefixes != 0 && !intel_syntax) as_warn (_("skipping prefixes on this instruction")); - if (fits_in_unsigned_byte (i.tm.base_opcode)) - { - p = frag_more (1 + size); - } - else - { - /* Opcode can be at most two bytes. */ - p = frag_more (2 + size); - *p++ = (i.tm.base_opcode >> 8) & 0xff; - } - *p++ = i.tm.base_opcode & 0xff; + p = frag_more (1 + size); + *p++ = i.tm.base_opcode; fix_new_exp (frag_now, p - frag_now->fr_literal, size, i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0])); |