Browse Source
We should check suffix in instruction mnemonic when matching instruction. In Intel syntax, normally we check for memory operand size. But the same mnemonic with 2 different encodings can have the same memory operand size and i.suffix is set to LONG_DOUBLE_MNEM_SUFFIX from memory operand size in Intel syntax to distinguish them. When there is no suffix in mnemonic, we check LONG_DOUBLE_MNEM_SUFFIX in i.suffix for mnemonic suffix. gas/ PR gas/25167 * config/tc-i386.c (match_template): Don't check instruction suffix set from operand. * testsuite/gas/i386/code16.d: New file. * testsuite/gas/i386/code16.s: Likewise. * testsuite/gas/i386/i386.exp: Run code16. * testsuite/gas/i386/x86-64-branch-4.l: Updated. opcodes/ PR gas/25167 * i386-opc.tbl: Remove IgnoreSize from cmpsd and movsd. * i386-tbl.h: Regenerated.gdb-9-branch
9 changed files with 79 additions and 48 deletions
@ -0,0 +1,15 @@ |
|||
#objdump: -drw -mi8086 |
|||
#name: i386 with .code16 |
|||
|
|||
.*: +file format .* |
|||
|
|||
Disassembly of section .text: |
|||
|
|||
0+ <.text>: |
|||
+[a-f0-9]+: f3 66 a5 rep movsl %ds:\(%si\),%es:\(%di\) |
|||
+[a-f0-9]+: f3 66 a7 repz cmpsl %es:\(%di\),%ds:\(%si\) |
|||
+[a-f0-9]+: 66 f3 a5 rep movsl %ds:\(%si\),%es:\(%di\) |
|||
+[a-f0-9]+: 66 f3 a7 repz cmpsl %es:\(%di\),%ds:\(%si\) |
|||
+[a-f0-9]+: 66 f3 a5 rep movsl %ds:\(%si\),%es:\(%di\) |
|||
+[a-f0-9]+: 66 f3 a7 repz cmpsl %es:\(%di\),%ds:\(%si\) |
|||
#pass |
|||
@ -0,0 +1,9 @@ |
|||
.text |
|||
.code16 |
|||
rep; movsd |
|||
rep; cmpsd |
|||
rep movsd %ds:(%si),%es:(%di) |
|||
rep cmpsd %es:(%di),%ds:(%si) |
|||
.intel_syntax noprefix |
|||
rep movsd dword ptr es:[di], dword ptr ds:[si] |
|||
rep cmpsd dword ptr ds:[si], dword ptr es:[di] |
|||
Loading…
Reference in new issue