From: Alan Modra Date: Wed, 6 Jun 2001 10:23:39 +0000 (+0000) Subject: * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints. X-Git-Tag: dberlin-typesystem-branchpoint~362 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb9401fc47194d97851787942c77aa61c3a6dd46;p=platform%2Fupstream%2Fbinutils.git * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints. : Remove dead code. --- 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 + + * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints. + : Remove dead code. + 2001-06-06 Tracy Kuhrt * 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]));