Fix pci_add nic not to exit on bad model
[qemu-kvm/fedora.git] / tests / test-i386-code16.S
blob816c24b96f476187f978b95e76c5b679478d8815
1         .code16
2         .globl code16_start
3         .globl code16_end
5 CS_SEG = 0xf
7 code16_start:
9         .globl code16_func1
11         /* basic test */
12 code16_func1 = . - code16_start
13         mov $1, %eax
14         data32 lret
16 /* test push/pop in 16 bit mode */
17         .globl code16_func2
18 code16_func2 = . - code16_start
19         xor %eax, %eax
20         mov $0x12345678, %ebx
21         movl %esp, %ecx
22         push %bx
23         subl %esp, %ecx
24         pop %ax
25         data32 lret
27 /* test various jmp opcodes */
28         .globl code16_func3
29 code16_func3 = . - code16_start
30         jmp 1f
31         nop
33         mov $4, %eax
34         mov $0x12345678, %ebx
35         xor %bx, %bx
36         jz 2f
37         add $2, %ax
40         call myfunc
42         lcall $CS_SEG, $(myfunc2 - code16_start)
44         ljmp $CS_SEG, $(myjmp1 - code16_start)
45 myjmp1_next:
47         cs lcall *myfunc2_addr - code16_start
49         cs ljmp *myjmp2_addr - code16_start
50 myjmp2_next:
52         data32 lret
54 myfunc2_addr:
55         .short myfunc2 - code16_start
56         .short CS_SEG
58 myjmp2_addr:
59         .short myjmp2 - code16_start
60         .short CS_SEG
62 myjmp1:
63         add $8, %ax
64         jmp myjmp1_next
66 myjmp2:
67         add $16, %ax
68         jmp myjmp2_next
70 myfunc:
71         add $1, %ax
72         ret
74 myfunc2:
75         add $4, %ax
76         lret
79 code16_end: