aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-01-20 20:53:50 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-01-20 20:53:50 +0000
commita501d77eeba717f6d54dce44f286f9e3aad83144 (patch)
treef43d8ee355afd45a51c5198c90b73035471a3adf /gas/testsuite
parente825046fcf0193aad44b1f3d1a8514190278b85d (diff)
downloadgdb-a501d77eeba717f6d54dce44f286f9e3aad83144.zip
gdb-a501d77eeba717f6d54dce44f286f9e3aad83144.tar.gz
gdb-a501d77eeba717f6d54dce44f286f9e3aad83144.tar.bz2
Add .d8 suffix support to x86 assembler
gas/ 2012-01-20 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (_i386_insn): Replace disp32_encoding with disp_encoding. (md_assemble): Updated. (output_branch): Likewise. (parse_insn): Support .d8 suffix. (build_modrm_byte): Fake zero displacement for .d8 and .d32 suffixes. * doc/c-i386.texi: Document .d8 suffix. gas/testsuite/ 2012-01-20 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/disp32.s: Add tests for .d8 suffix. * gas/i386/x86-64-disp32.s: Likewise. * gas/i386/disp32.d: Updated. * gas/i386/x86-64-disp32.d: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/i386/disp32.d19
-rw-r--r--gas/testsuite/gas/i386/disp32.s15
-rw-r--r--gas/testsuite/gas/i386/x86-64-disp32.d19
-rw-r--r--gas/testsuite/gas/i386/x86-64-disp32.s15
5 files changed, 68 insertions, 8 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index b217aa5..80bf81b 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2012-01-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/disp32.s: Add tests for .d8 suffix.
+ * gas/i386/x86-64-disp32.s: Likewise.
+
+ * gas/i386/disp32.d: Updated.
+ * gas/i386/x86-64-disp32.d: Likewise.
+
2012-01-17 Andreas Schwab <schwab@linux-m68k.org>
* gas/m68k/pmove.s, gas/m68k/pmove.d: New test.
diff --git a/gas/testsuite/gas/i386/disp32.d b/gas/testsuite/gas/i386/disp32.d
index 68fd3e8..37629f6 100644
--- a/gas/testsuite/gas/i386/disp32.d
+++ b/gas/testsuite/gas/i386/disp32.d
@@ -7,13 +7,24 @@
Disassembly of section .text:
-0+ <.*>:
+0+ <foo-0x26>:
+[ ]*[a-f0-9]+: 8b 18 mov \(%eax\),%ebx
[ ]*[a-f0-9]+: 8b 58 03 mov 0x3\(%eax\),%ebx
+[ ]*[a-f0-9]+: 8b 58 00 mov 0x0\(%eax\),%ebx
+[ ]*[a-f0-9]+: 8b 58 03 mov 0x3\(%eax\),%ebx
+[ ]*[a-f0-9]+: 8b 98 ff 0f 00 00 mov 0xfff\(%eax\),%ebx
+[ ]*[a-f0-9]+: 8b 98 00 00 00 00 mov 0x0\(%eax\),%ebx
[ ]*[a-f0-9]+: 8b 98 03 00 00 00 mov 0x3\(%eax\),%ebx
-[ ]*[a-f0-9]+: eb 05 jmp 10 <foo>
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmp 10 <foo>
+[ ]*[a-f0-9]+: eb 07 jmp 26 <foo>
+[ ]*[a-f0-9]+: eb 05 jmp 26 <foo>
+[ ]*[a-f0-9]+: e9 00 00 00 00 jmp 26 <foo>
-0+10 <foo>:
+0+26 <foo>:
+[ ]*[a-f0-9]+: 89 18 mov %ebx,\(%eax\)
+[ ]*[a-f0-9]+: 89 58 03 mov %ebx,0x3\(%eax\)
+[ ]*[a-f0-9]+: 89 98 ff 0f 00 00 mov %ebx,0xfff\(%eax\)
+[ ]*[a-f0-9]+: 89 58 00 mov %ebx,0x0\(%eax\)
[ ]*[a-f0-9]+: 89 58 03 mov %ebx,0x3\(%eax\)
+[ ]*[a-f0-9]+: 89 98 00 00 00 00 mov %ebx,0x0\(%eax\)
[ ]*[a-f0-9]+: 89 98 03 00 00 00 mov %ebx,0x3\(%eax\)
#pass
diff --git a/gas/testsuite/gas/i386/disp32.s b/gas/testsuite/gas/i386/disp32.s
index de34f41..c3bec3a 100644
--- a/gas/testsuite/gas/i386/disp32.s
+++ b/gas/testsuite/gas/i386/disp32.s
@@ -1,11 +1,26 @@
.text
+ mov (%eax),%ebx
mov 3(%eax),%ebx
+
+ mov.d8 (%eax),%ebx
+ mov.d8 3(%eax),%ebx
+ mov.d8 0xfff(%eax),%ebx
+
+ mov.d32 (%eax),%ebx
mov.d32 3(%eax),%ebx
jmp foo
+ jmp.d8 foo
jmp.d32 foo
foo:
.intel_syntax noprefix
+ mov DWORD PTR [eax], ebx
mov DWORD PTR [eax+3], ebx
+ mov DWORD PTR [eax+0xfff], ebx
+
+ mov.d8 DWORD PTR [eax], ebx
+ mov.d8 DWORD PTR [eax+3], ebx
+
+ mov.d32 DWORD PTR [eax], ebx
mov.d32 DWORD PTR [eax+3], ebx
diff --git a/gas/testsuite/gas/i386/x86-64-disp32.d b/gas/testsuite/gas/i386/x86-64-disp32.d
index c3d70a1..76d4647 100644
--- a/gas/testsuite/gas/i386/x86-64-disp32.d
+++ b/gas/testsuite/gas/i386/x86-64-disp32.d
@@ -7,13 +7,24 @@
Disassembly of section .text:
-0+ <.*>:
+0+ <foo-0x26>:
+[ ]*[a-f0-9]+: 8b 18 mov \(%rax\),%ebx
[ ]*[a-f0-9]+: 8b 58 03 mov 0x3\(%rax\),%ebx
+[ ]*[a-f0-9]+: 8b 58 00 mov 0x0\(%rax\),%ebx
+[ ]*[a-f0-9]+: 8b 58 03 mov 0x3\(%rax\),%ebx
+[ ]*[a-f0-9]+: 8b 98 ff 0f 00 00 mov 0xfff\(%rax\),%ebx
+[ ]*[a-f0-9]+: 8b 98 00 00 00 00 mov 0x0\(%rax\),%ebx
[ ]*[a-f0-9]+: 8b 98 03 00 00 00 mov 0x3\(%rax\),%ebx
-[ ]*[a-f0-9]+: eb 05 jmp 10 <foo>
-[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 10 <foo>
+[ ]*[a-f0-9]+: eb 07 jmp 26 <foo>
+[ ]*[a-f0-9]+: eb 05 jmp 26 <foo>
+[ ]*[a-f0-9]+: e9 00 00 00 00 jmpq 26 <foo>
-0+10 <foo>:
+0+26 <foo>:
+[ ]*[a-f0-9]+: 89 18 mov %ebx,\(%rax\)
+[ ]*[a-f0-9]+: 89 58 03 mov %ebx,0x3\(%rax\)
+[ ]*[a-f0-9]+: 89 98 ff 0f 00 00 mov %ebx,0xfff\(%rax\)
+[ ]*[a-f0-9]+: 89 58 00 mov %ebx,0x0\(%rax\)
[ ]*[a-f0-9]+: 89 58 03 mov %ebx,0x3\(%rax\)
+[ ]*[a-f0-9]+: 89 98 00 00 00 00 mov %ebx,0x0\(%rax\)
[ ]*[a-f0-9]+: 89 98 03 00 00 00 mov %ebx,0x3\(%rax\)
#pass
diff --git a/gas/testsuite/gas/i386/x86-64-disp32.s b/gas/testsuite/gas/i386/x86-64-disp32.s
index b0e83e1..0856339 100644
--- a/gas/testsuite/gas/i386/x86-64-disp32.s
+++ b/gas/testsuite/gas/i386/x86-64-disp32.s
@@ -1,11 +1,26 @@
.text
+ mov (%rax),%ebx
mov 3(%rax),%ebx
+
+ mov.d8 (%rax),%ebx
+ mov.d8 3(%rax),%ebx
+ mov.d8 0xfff(%rax),%ebx
+
+ mov.d32 (%rax),%ebx
mov.d32 3(%rax),%ebx
jmp foo
+ jmp.d8 foo
jmp.d32 foo
foo:
.intel_syntax noprefix
+ mov DWORD PTR [rax], ebx
mov DWORD PTR [rax+3], ebx
+ mov DWORD PTR [rax+0xfff], ebx
+
+ mov.d8 DWORD PTR [rax], ebx
+ mov.d8 DWORD PTR [rax+3], ebx
+
+ mov.d32 DWORD PTR [rax], ebx
mov.d32 DWORD PTR [rax+3], ebx