nasmlib.h: Introduce ALIGN helpers
[nasm/sigaren-mirror.git] / test / immwarn.asm
blob8bffbfae821fbd0e155e9355c802d0aac4394d90
1 ;Testname=onowarn; Arguments=-Ox -DOPT=1 -DWARN=0 -fbin -oimmwarn.bin; Files=stdout stderr immwarn.bin
2 ;Testname=owarn; Arguments=-Ox -DOPT=1 -DWARN=1 -fbin -oimmwarn.bin; Files=stdout stderr immwarn.bin
3 ;Testname=nowarn; Arguments=-O0 -DOPT=0 -DWARN=0 -fbin -oimmwarn.bin; Files=stdout stderr immwarn.bin
4 ;Testname=warn; Arguments=-O0 -DOPT=1 -DWARN=1 -fbin -oimmwarn.bin; Files=stdout stderr immwarn.bin
6 %ifndef WARN
7 %define WARN 1
8 %endif
10 bits 16
11 push 1
12 %if WARN
13 push 0ffffffffh
14 %endif
15 push -1
16 push 0ffffh
17 push byte 0FFFFh
19 add ax,0FFFFh
20 %if WARN
21 add ax,0FFFFFFFFh
22 %endif
23 add ax,-1
24 add ax,byte 0FFFFh
25 %if WARN
26 add ax,byte 0FFFFFFFFh
27 %endif
28 add ax,-1
30 add cx,0FFFFh
31 %if WARN
32 add cx,0FFFFFFFFh
33 %endif
34 add cx,-1
35 add cx,byte 0FFFFh
36 %if WARN
37 add cx,byte 0FFFFFFFFh
38 %endif
39 add cx,-1
41 bits 32
42 push 1
43 push 0ffffffffh
44 push -1
45 push 0ffffh
47 push byte 1
48 %if WARN
49 push byte 0ffffh
50 %endif
51 push byte -1
53 push word 1
54 push word 0ffffh
55 push word -1
57 push dword 1
58 push dword 0ffffffffh
59 push dword -1
61 add eax,0FFFFh
62 add eax,0FFFFFFFFh
63 add eax,-1
65 add ecx,0FFFFh
66 add ecx,0FFFFFFFFh
67 add ecx,-1
69 bits 64
70 mov eax,7fffffffh
71 mov eax,80000000h
72 mov rax,7fffffffh
73 mov rax,80000000h
74 %if WARN
75 mov rax,dword 80000000h
76 %endif
77 add rcx,0FFFFh
78 %if WARN
79 add rcx,0FFFFFFFFh
80 %endif
81 add rcx,-1
83 add ecx,0FFFFh
84 add ecx,0FFFFFFFFh
85 add ecx,-1
87 push byte 1
88 %if WARN
89 push byte 0ffffffffh
90 %endif
91 push byte -1