aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2000-10-25 01:39:11 +0000
committerDiego Novillo <dnovillo@google.com>2000-10-25 01:39:11 +0000
commit64a0c779785ae5f667aa04092cdb648ab58134a5 (patch)
treea321f849760a43c858940298f00c4d0905e1651f /gas/testsuite
parent44c75fb3683df7abd8d4042208e8279d1d84a404 (diff)
downloadgdb-64a0c779785ae5f667aa04092cdb648ab58134a5.zip
gdb-64a0c779785ae5f667aa04092cdb648ab58134a5.tar.gz
gdb-64a0c779785ae5f667aa04092cdb648ab58134a5.tar.bz2
2000-10-24 Diego Novillo <dnovillo@cygnus.com>
* tc-i386.c (i386_operand_modifier): Remove. (build_displacement_string): Remove. (i386_parse_seg): Remove. (i386_intel_memory_operand): Remove. (i386_intel_operand): Re-write using recursive descent parser based on MASM documentation. (struct intel_parser_s): New structure. (intel_parser): New static variable. (struct intel_token): New structure. (cur_token, prev_token): New static variables. (T_NIL): Define. (T_CONST): Define. (T_REG): Define. (T_BYTE): Define. (T_WORD): Define. (T_DWORD): Define. (T_QWORD): Define. (T_XWORD): Define. (T_SHORT): Define. (T_OFFSET): Define. (T_PTR): Define. (T_ID): Define. (intel_match_token): New function. (intel_get_token): New function. (intel_putback_token): New function. (intel_expr): New function. (intel_e05): New function. (intel_e05_1): New function. (intel_e06): New function. (intel_e06_1): New function. (intel_e09): New function. (intel_e09_1): New function. (intel_e10): New function. (intel_e10_1): New function. (intel_e11): New function. 2000-10-24 Diego Novillo <dnovillo@cygnus.com> * intel.s, intel.d: Add new tests for intel syntax.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog4
-rw-r--r--gas/testsuite/gas/i386/intel.d39
-rw-r--r--gas/testsuite/gas/i386/intel.s40
3 files changed, 83 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 4c345bc..ce07e4e 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2000-10-24 Diego Novillo <dnovillo@cygnus.com>
+
+ * intel.s, intel.d: Add new tests for intel syntax.
+
2000-10-19 Alan Modra <alan@linuxcare.com.au>
* gas/elf/section0.s: Ensure section sizes are multiples of 16.
diff --git a/gas/testsuite/gas/i386/intel.d b/gas/testsuite/gas/i386/intel.d
index ea7a884..030585e 100644
--- a/gas/testsuite/gas/i386/intel.d
+++ b/gas/testsuite/gas/i386/intel.d
@@ -582,3 +582,42 @@ Disassembly of section .text:
0+9d2 <bar>:
9d2: e8 f9 ff ff ff [ ]*call 9d0 <gs_foo>
9d7: e8 f5 ff ff ff [ ]*call 9d1 <short_foo>
+ 9dc: 8d 83 00 00 00 00 [ ]*lea 0x0\(%ebx\),%eax
+ 9e2: dd 1c d0 [ ]*fstpl \(%eax,%edx,8\)
+ 9e5: b9 00 00 00 00 [ ]*mov \$0x0,%ecx
+ 9ea: 88 04 16 [ ]*mov %al,\(%esi,%edx,1\)
+ 9ed: 88 04 32 [ ]*mov %al,\(%edx,%esi,1\)
+ 9f0: 88 04 56 [ ]*mov %al,\(%esi,%edx,2\)
+ 9f3: 88 04 56 [ ]*mov %al,\(%esi,%edx,2\)
+ 9f6: eb 0c [ ]*jmp a04 <rot5>
+ 9f8: 6c [ ]*insb \(%dx\),%es:\(%edi\)
+ 9f9: 66 0f c1 90 90 90 90 90 [ ]*xadd %dx,0x90909090\(%eax\)
+ a01: 83 e0 f8 [ ]*and \$0xfffffff8,%eax
+
+0+a04 <rot5>:
+ a04: 8b 44 ce 04 [ ]*mov 0x4\(%esi,%ecx,8\),%eax
+ a08: 6c [ ]*insb \(%dx\),%es:\(%edi\)
+ a09: 0c 90 [ ]*or \$0x90,%al
+ a0b: 0d 90 90 90 90 [ ]*or \$0x90909090,%eax
+ a10: 0e [ ]*push %cs
+ a11: 8b 04 5d 00 00 00 00 [ ]*mov 0x0\(,%ebx,2\),%eax
+ a18: 10 14 85 90 90 90 90 [ ]*adc %dl,0x90909090\(,%eax,4\)
+ a1f: 2f [ ]*das
+ a20: ea 90 90 90 90 90 90 [ ]*ljmp \$0x9090,\$0x90909090
+ a27: 66 a5 [ ]*movsw %ds:\(%esi\),%es:\(%edi\)
+ a29: 70 90 [ ]*jo 9bb <foo\+0x9bb>
+ a2b: 75 fe [ ]*jne a2b <rot5\+0x27>
+ a2d: 0f 6f 35 28 00 00 00 [ ]*movq 0x28,%mm6
+ a34: 03 3c c3 [ ]*add \(%ebx,%eax,8\),%edi
+ a37: 0f 6e 44 c3 04 [ ]*movd 0x4\(%ebx,%eax,8\),%mm0
+ a3c: 03 bc cb 00 80 00 00 [ ]*add 0x8000\(%ebx,%ecx,8\),%edi
+ a43: 0f 6e 8c cb 04 80 00 00 [ ]*movd 0x8004\(%ebx,%ecx,8\),%mm1
+ a4b: 0f 6e 94 c3 04 00 01 00 [ ]*movd 0x10004\(%ebx,%eax,8\),%mm2
+ a53: 03 bc c3 00 00 01 00 [ ]*add 0x10000\(%ebx,%eax,8\),%edi
+ a5a: 66 8b 04 43 [ ]*mov \(%ebx,%eax,2\),%ax
+ a5e: 66 8b 8c 4b 00 20 00 00 [ ]*mov 0x2000\(%ebx,%ecx,2\),%cx
+ a66: 66 8b 84 43 00 40 00 00 [ ]*mov 0x4000\(%ebx,%eax,2\),%ax
+ a6e: ff e0 [ ]*jmp \*%eax
+ a70: ff 20 [ ]*jmp \*\(%eax\)
+ a72: ff 25 d2 09 00 00 [ ]*jmp \*0x9d2
+ a78: e9 55 ff ff ff [ ]*jmp 9d2 <bar>
diff --git a/gas/testsuite/gas/i386/intel.s b/gas/testsuite/gas/i386/intel.s
index 99bcf47..4b6c541 100644
--- a/gas/testsuite/gas/i386/intel.s
+++ b/gas/testsuite/gas/i386/intel.s
@@ -576,3 +576,43 @@ short_foo:
bar:
call gs_foo
call short_foo
+ lea eax, .LC0@GOTOFF[ebx]
+ fstp QWORD PTR [eax+edx*8]
+ mov ecx, OFFSET FLAT:ss
+ mov BYTE PTR [esi+edx], al
+ mov BYTE PTR [edx+esi], al
+ mov BYTE PTR [edx*2+esi], al
+ mov BYTE PTR [esi+edx*2], al
+ jmp short rot5
+ ins byte ptr es:[edi], dx
+ xadd 0x90909090[eax], dx
+ and %eax, -8
+rot5:
+ mov %eax, DWORD PTR [%esi+4+%ecx*8]
+ ins BYTE PTR es:[edi], dx
+ or al, 0x90
+ or eax, 0x90909090
+ push cs
+ mov eax, [ebx*2]
+ adc BYTE PTR [eax*4+0x90909090], dl
+ das
+ jmp 0x9090,0x90909090
+ movs WORD PTR es:[edi], WORD PTR ds:[esi]
+ jo .+2-0x70
+
+1:
+ jne 1b
+ movq mm6, [DWORD PTR .LC5+40]
+ add edi, dword ptr [ebx+8*eax]
+ movd mm0, dword ptr [ebx+8*eax+4]
+ add edi, dword ptr [ebx+8*ecx+((4095+1)*8)]
+ movd mm1, dword ptr [ebx+8*ecx+((4095+1)*8)+4]
+ movd mm2, dword ptr [ebx+8*eax+(2*(4095+1)*8)+4]
+ add edi, dword ptr [ebx+8*eax+(2*(4095+1)*8)]
+ mov ax, word ptr [ebx+2*eax]
+ mov cx, word ptr [ebx+2*ecx+((4095+1)*2)]
+ mov ax, word ptr [ebx+2*eax+(2*(4095+1)*2)]
+ jmp eax
+ jmp [eax]
+ jmp [bar]
+ jmp bar