New i386 tests for naked register syntax, ie. "eax" instead of "%eax"

This commit is contained in:
Alan Modra 1999-08-30 14:09:43 +00:00
parent af6bdddf8c
commit 3f9ed93baf
4 changed files with 64 additions and 0 deletions

View File

@ -1,3 +1,9 @@
1999-08-30 Alan Modra <alan@spri.levels.unisa.edu.au>
* gas/i386/naked.s, gas/i386/naked.d: Test-suite addition for
allow_naked_reg parsing.
* gas/i386/i386.exp: Call it.
1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au>
* gas/i386/white.s, gas/i386/white.l: Add space in FP reg tests.

View File

@ -21,6 +21,7 @@ if [istarget "i*86-*-*"] then {
run_list_test "general" "-al --listing-lhs-width=2"
run_list_test "inval" "-al"
run_list_test "modrm" "-al --listing-lhs-width=2"
run_dump_test "naked"
run_dump_test "opcode"
run_dump_test "prefix"
run_dump_test "amd"

View File

@ -0,0 +1,32 @@
#objdump: -drw
#name: i386 naked reg
.*: +file format .*i386.*
Disassembly of section .text:
0+000 <foo>:
0: 66 26 ff 23 [ ]*jmpw \*%es:\(%ebx\)
4: 8a 25 50 00 00 00 [ ]*mov 0x50,%ah
a: b2 20 [ ]*mov \$0x20,%dl
c: bb 00 00 00 00 [ ]*mov \$0x0,%ebx d: (R_386_)?32 .text
11: d9 c9 [ ]*fxch %st\(1\)
13: 36 8c a4 81 d2 04 00 00 [ ]*movl %fs,%ss:0x4d2\(%ecx,%eax,4\)
1b: 8c 2c ed 00 00 00 00 [ ]*movl %gs,0x0\(,%ebp,8\)
22: 26 88 25 00 00 00 00 [ ]*mov %ah,%es:0x0
29: 2e 8b 74 14 80 [ ]*mov %cs:0xffffff80\(%esp,%edx,1\),%esi
2e: f3 65 a5 [ ]*repz movsl %gs:\(%esi\),%es:\(%edi\)
31: ec [ ]*in \(%dx\),%al
32: 66 ef [ ]*out %ax,\(%dx\)
34: 67 d2 14 [ ]*addr16 rclb %cl,\(%si\)
37: 0f 20 d0 [ ]*mov %cr2,%eax
3a: 0f 72 d0 04 [ ]*psrld \$0x4,%mm0
3e: 66 47 [ ]*inc %di
40: 66 51 [ ]*push %cx
42: 66 58 [ ]*pop %ax
44: 66 87 dd [ ]*xchg %bx,%bp
47: 6a 02 [ ]*push \$0x2
49: 00 00 [ ]*add %al,\(%eax\)
4b: 00 00 [ ]*add %al,\(%eax\)
4d: 00 00 [ ]*add %al,\(%eax\)
...

View File

@ -0,0 +1,25 @@
.att_syntax noprefix
foo: jmpw es:*(ebx)
mov (0x8*0xa),ah
mov $(8*4),dl
mov $foo,ebx
fxch st(1)
mov fs,ss:1234(ecx,eax,4)
mov gs,ds:(,ebp,8)
mov ah,es:0
mov cs:-128(esp,edx),esi
rep movsl gs:(esi),es:(edi)
in dx,al
outw (dx)
addr16 rclb cl,(si)
mov cr2,eax
psrld $4,mm0
inc di
push cx
pop ax
xchg bx,bp
pushl $2
# Force a good alignment.
.p2align 4,0