aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-03-21 20:45:14 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-03-21 20:45:14 +0000
commit8b38ad713b4d7d3cf34d59efcdeb562cad46b364 (patch)
tree5dbe615ac85a15bd01cc0c6cacf1c3933e3f3571 /gas/config
parentffa8bd48e33d601fc4fccc3ad14449c80483daa2 (diff)
downloadgdb-8b38ad713b4d7d3cf34d59efcdeb562cad46b364.zip
gdb-8b38ad713b4d7d3cf34d59efcdeb562cad46b364.tar.gz
gdb-8b38ad713b4d7d3cf34d59efcdeb562cad46b364.tar.bz2
gas/
2003-03-21 H.J. Lu <hongjiu.lu@intel.com> PR binutils/4218 * config/tc-i386.c (match_template): Properly handle 64bit mode "xchg %eax, %eax". gas/testsuite/ 2003-03-21 H.J. Lu <hongjiu.lu@intel.com> PR binutils/4218 * gas/i386/nops.s: Add testcases for nop r/m. * gas/i386/x86-64-nops.s: Likewise. * gas/i386/x86-64-opcode.s: Add testcases for xchg with %ax, %eax and %rax. * gas/i386/nops.d: Updated. * gas/i386/x86-64-nops.d: Likewise. * gas/i386/x86-64-opcode.d: Likewise. opcodes/ 2003-03-21 H.J. Lu <hongjiu.lu@intel.com> PR binutils/4218 * i386-dis.c (PREGRP38): New. (dis386): Use PREGRP38 for 0x90. (prefix_user_table): Add PREGRP38. (print_insn): Set uses_REPZ_prefix to 1 for pause. (NOP_Fixup1): Properly handle REX bits. (NOP_Fixup2): Likewise. * i386-opc.c (i386_optab): Allow %eax with xchg in 64bit. Allow register with nop.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 63d95fa..c3da74a 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2621,6 +2621,15 @@ match_template (void)
continue;
break;
case 2:
+ /* xchg %eax, %eax is a special case. It is an aliase for nop
+ only in 32bit mode and we can use opcode 0x90. In 64bit
+ mode, we can't use 0x90 for xchg %eax, %eax since it should
+ zero-extend %eax to %rax. */
+ if (flag_code == CODE_64BIT
+ && t->base_opcode == 0x90
+ && i.types [0] == (Acc | Reg32)
+ && i.types [1] == (Acc | Reg32))
+ continue;
case 3:
case 4:
overlap1 = i.types[1] & operand_types[1];