diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-01-07 11:58:53 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-01-07 11:58:53 -0800 |
commit | f322084c7c842fbfd8c3291ff3f8d114173b4674 (patch) | |
tree | 43d0859a32a401ae413e792d549a0a0f42e6461f /gas | |
parent | f6c714d65b7296b466089f7d0d0270a12d51742f (diff) | |
download | gdb-f322084c7c842fbfd8c3291ff3f8d114173b4674.zip gdb-f322084c7c842fbfd8c3291ff3f8d114173b4674.tar.gz gdb-f322084c7c842fbfd8c3291ff3f8d114173b4674.tar.bz2 |
i386: Correct adcx suffix in disassembler
Since 0x66 is the opcode prefix for adcx, it is wrong to use the 'S'
prefix:
'S' => print 'w', 'l' or 'q' if suffix_always is true
on adcx. Add
'L' => print 'l' or 'q' if suffix_always is true
replace S with L on adcx and adox.
gas/
PR binutils/31219
* testsuite/gas/i386/suffix.d: Updated.
* testsuite/gas/i386/x86-64-suffix.d: Likewise.
* testsuite/gas/i386/suffix.s: Add tests for adcx and adox.
* testsuite/gas/i386/x86-64-suffix.s: Likewise.
opcodes/
PR binutils/31219
* i386-dis.c: Add the 'L' suffix.
(prefix_table): Replace S with L on adcx and adox.
(putop): Handle the 'L' suffix.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/gas/i386/suffix.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/suffix.s | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-suffix.d | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-suffix.s | 6 |
4 files changed, 16 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/suffix.d b/gas/testsuite/gas/i386/suffix.d index d76dca3..3d0282a 100644 --- a/gas/testsuite/gas/i386/suffix.d +++ b/gas/testsuite/gas/i386/suffix.d @@ -22,4 +22,6 @@ Disassembly of section .text: [ ]*[a-f0-9]+: cf iretl [ ]*[a-f0-9]+: 0f 07 sysretl [ ]*[a-f0-9]+: 0f 07 sysretl +[ ]*[a-f0-9]+: 66 0f 38 f6 d1 adcxl %ecx,%edx +[ ]*[a-f0-9]+: f3 0f 38 f6 d1 adoxl %ecx,%edx #pass diff --git a/gas/testsuite/gas/i386/suffix.s b/gas/testsuite/gas/i386/suffix.s index 7f2864d..4cd85d5 100644 --- a/gas/testsuite/gas/i386/suffix.s +++ b/gas/testsuite/gas/i386/suffix.s @@ -22,3 +22,7 @@ foo: iret sysretd sysret + + .att_syntax prefix + adcxl %ecx, %edx + adoxl %ecx, %edx diff --git a/gas/testsuite/gas/i386/x86-64-suffix.d b/gas/testsuite/gas/i386/x86-64-suffix.d index e8edfa4..928f4bc 100644 --- a/gas/testsuite/gas/i386/x86-64-suffix.d +++ b/gas/testsuite/gas/i386/x86-64-suffix.d @@ -26,4 +26,8 @@ Disassembly of section .text: [ ]*[a-f0-9]+: 0f 07 sysretl [ ]*[a-f0-9]+: 48 89 e5 movq %rsp,%rbp [ ]*[a-f0-9]+: 48 0f 07 sysretq +[ ]*[a-f0-9]+: 66 0f 38 f6 d1 adcxl %ecx,%edx +[ ]*[a-f0-9]+: f3 0f 38 f6 d1 adoxl %ecx,%edx +[ ]*[a-f0-9]+: 66 48 0f 38 f6 d1 adcxq %rcx,%rdx +[ ]*[a-f0-9]+: f3 48 0f 38 f6 d1 adoxq %rcx,%rdx #pass diff --git a/gas/testsuite/gas/i386/x86-64-suffix.s b/gas/testsuite/gas/i386/x86-64-suffix.s index a226836..1f40cd6 100644 --- a/gas/testsuite/gas/i386/x86-64-suffix.s +++ b/gas/testsuite/gas/i386/x86-64-suffix.s @@ -25,3 +25,9 @@ foo: sysretd mov rbp,rsp sysretq + + .att_syntax prefix + adcxl %ecx, %edx + adoxl %ecx, %edx + adcxq %rcx, %rdx + adoxq %rcx, %rdx |