aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-08-26 16:33:34 +0000
committerIan Lance Taylor <ian@airs.com>1997-08-26 16:33:34 +0000
commit625ea5db8082b4f2229bdd48c7e064a6a4334223 (patch)
treec5036f5a0eb04cffde0ffb00f8fb2520624d8f49 /gas/config
parent051a96ff10e679497fb256765639426ae1281ee7 (diff)
downloadgdb-625ea5db8082b4f2229bdd48c7e064a6a4334223.zip
gdb-625ea5db8082b4f2229bdd48c7e064a6a4334223.tar.gz
gdb-625ea5db8082b4f2229bdd48c7e064a6a4334223.tar.bz2
Use address size prefix for loopw as for jcxz.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 20a4f4e..3bd5398 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1737,11 +1737,17 @@ md_assemble (line)
ADDR_PREFIX_OPCODE. This is a hack, but, then, so
is the instruction itself.
+ If an explicit suffix is used for the loop
+ instruction, that actually controls whether we use
+ cx vs. ecx. This is also controlled by
+ ADDR_PREFIX_OPCODE.
+
I don't know if there is any valid case in which we
want to emit WORD_PREFIX_OPCODE, but I am keeping
the old behaviour for safety. */
- if (IS_JUMP_ON_CX_ZERO (t->base_opcode))
+ if (IS_JUMP_ON_CX_ZERO (t->base_opcode)
+ || IS_LOOP_ECX_TIMES (t->base_opcode))
FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE);
else
FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE);