aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2005-04-12 17:12:33 +0000
committerMark Kettenis <kettenis@gnu.org>2005-04-12 17:12:33 +0000
commitbc4bd9abb2ea8274c9acc51221ba1dd7696c639d (patch)
treeb3abc939db403091bd5d38ceb3be3d849bc2898f /gas
parent41c953f989487663bea96657b1945ed034f5c1c5 (diff)
downloadgdb-bc4bd9abb2ea8274c9acc51221ba1dd7696c639d.zip
gdb-bc4bd9abb2ea8274c9acc51221ba1dd7696c639d.tar.gz
gdb-bc4bd9abb2ea8274c9acc51221ba1dd7696c639d.tar.bz2
include/opcode/ChangeLog:
* i386.h (i386_optab): Mark VIA PadLock instructions as ImmExt and adjust them accordingly. gas/ChangeLog: * config/tc-i386.c (output_insn): Handle VIA PadLock instructions similar to other instructions now that they're marked as ImmExt.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c40
2 files changed, 22 insertions, 23 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d79bea3..d756de3 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-12 Mark Kettenis <kettenis@gnu.org>
+
+ * config/tc-i386.c (output_insn): Handle VIA PadLock instructions
+ similar to other instructions now that they're marked as ImmExt.
+
2005-04-12 Nick Clifton <nickc@redhat.com>
* hash.c (DEFAULT_SIZE): Delete. Replace with:
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 83e2567..6aeb827 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -3320,23 +3320,23 @@ output_insn ()
char *p;
unsigned char *q;
- /* All opcodes on i386 have either 1 or 2 bytes, PadLock instructions
- have 3 bytes. We may use one more higher byte to specify a prefix
- the instruction requires. */
- if ((i.tm.cpu_flags & CpuPadLock) != 0
- && (i.tm.base_opcode & 0xff000000) != 0)
- {
- unsigned int prefix;
- prefix = (i.tm.base_opcode >> 24) & 0xff;
-
- if (prefix != REPE_PREFIX_OPCODE
- || i.prefix[LOCKREP_PREFIX] != REPE_PREFIX_OPCODE)
- add_prefix (prefix);
+ /* All opcodes on i386 have either 1 or 2 bytes. We may use one
+ more higher byte to specify a prefix the instruction
+ requires. */
+ if ((i.tm.base_opcode & 0xff0000) != 0)
+ {
+ if ((i.tm.cpu_flags & CpuPadLock) != 0)
+ {
+ unsigned int prefix;
+ prefix = (i.tm.base_opcode >> 16) & 0xff;
+
+ if (prefix != REPE_PREFIX_OPCODE
+ || i.prefix[LOCKREP_PREFIX] != REPE_PREFIX_OPCODE)
+ add_prefix (prefix);
+ }
+ else
+ add_prefix ((i.tm.base_opcode >> 16) & 0xff);
}
- else
- if ((i.tm.cpu_flags & CpuPadLock) == 0
- && (i.tm.base_opcode & 0xff0000) != 0)
- add_prefix ((i.tm.base_opcode >> 16) & 0xff);
/* The prefix bytes. */
for (q = i.prefix;
@@ -3357,13 +3357,7 @@ output_insn ()
}
else
{
- if ((i.tm.cpu_flags & CpuPadLock) != 0)
- {
- p = frag_more (3);
- *p++ = (i.tm.base_opcode >> 16) & 0xff;
- }
- else
- p = frag_more (2);
+ p = frag_more (2);
/* Put out high byte first: can't use md_number_to_chars! */
*p++ = (i.tm.base_opcode >> 8) & 0xff;