KVM: Request setting of nmi_pending and sipi_vector
[qemu.git] / tests / cris / testutils.inc
blobaa1641b2e6b4abccad673a7b3cbfeb5ee287f28a
1         .syntax no_register_prefix
3         .macro  start
4         .text
5         .global main
6 main:
7         .endm
9         .macro  quit
10         jump    pass
11         nop
12         .endm
14         .macro  pass
15         jump    pass
16         nop
17         .endm
19         .macro  startnostack
20         start
21         .endm
23         .macro  fail
24         .data
25 99:
26         .asciz " checkr3 failed\n"
27         .text
28         move.d  99b, $r10
29         jsr     _fail
30         nop
31         .endm
33         .macro  checkr3 val
34         cmp.d   0x\val, $r3
35         beq     100f
36         nop
37         .data
38 99:
39         .asciz "checkr3 failed\n"
40         .text
41         move.d  99b, $r10
42         jsr     _fail
43         nop
44 100:
45         .endm
47 ; Test the condition codes
48         .macro test_cc N Z V C
49         .if \N
50         bpl 9f
51         nop
52         .else
53         bmi 9f
54         nop
55         .endif
56         .if \Z
57         bne 9f
58         nop
59         .else
60         beq 9f
61         nop
62         .endif
63         .if \V
64         bvc 9f
65         nop
66         .else
67         bvs 9f
68         nop
69         .endif
70         .if \C
71         bcc 9f
72         nop
73         .else
74         bcs 9f
75         nop
76         .endif
77         ba 8f
78         nop
80         .data
81 99:
82         .asciz "test_move_cc failed\n"
83         .text
84         move.d  99b, $r10
85         jsr     _fail
86         nop
88         .endm
91         .macro test_move_cc N Z V C
92         .if \N
93         bpl 9f
94         nop
95         .else
96         bmi 9f
97         nop
98         .endif
99         .if \Z
100         bne 9f
101         nop
102         .else
103         beq 9f
104         nop
105         .endif
106         ba 8f
107         nop
109         .data
111         .asciz "test_move_cc failed\n"
112         .text
113         move.d  99b, $r10
114         jsr     _fail
115         nop
117         .endm