config: fix build with external compiler by passing the sysroot where needed
[AROS.git] / arch / m68k-all / stdc / jmptests.s
blobfd1c0a5128e72cf1af5c9a1a48c2577e50cedebf
2 .macro CMP value,reg
3 cmp.l \value,\reg
4 beq 0f
5 trap #1
6 0:
7 .endm
9 .macro CMPS slot,reg
10 cmp.l %sp@(4 * \slot),\reg
11 beq 0f
12 trap #1
14 .endm
16 .section ".aros.startup"
17 .global _main
18 _main:
19 move.l #0xd20000d2,%d2
20 move.l #0xd30000d2,%d3
21 move.l #0xd40000d2,%d4
22 move.l #0xd50000d2,%d5
23 move.l #0xd60000d2,%d6
24 move.l #0xd70000d2,%d7
25 move.l #0xa20000d2,%a2
26 move.l #0xa30000d2,%a3
27 move.l #0xa40000d2,%a4
28 move.l #0xa50000d2,%a5
29 move.l #0xa60000d2,%a6
30 move.l #0xa7a7a7a7,%sp@-
32 jsr vfork
33 CMP #0xdead0001,%d0
34 CMP #0xd20000d2,%d2
35 CMP #0xd30000d2,%d3
36 CMP #0xd40000d2,%d4
37 CMP #0xd50000d2,%d5
38 CMP #0xd60000d2,%d6
39 CMP #0xd70000d2,%d7
40 CMP #0xa20000d2,%a2
41 CMP #0xa30000d2,%a3
42 CMP #0xa40000d2,%a4
43 CMP #0xa50000d2,%a5
44 CMP #0xa60000d2,%a6
45 move.l %sp@,%d0
46 CMP #0xa7a7a7a7,%d0
48 move.l #0xd2000022,%d2
49 jsr vfork
50 CMP #0xdead0001,%d0
51 CMP #0xd2000022,%d2
52 CMP #0xd30000d2,%d3
53 CMP #0xd40000d2,%d4
54 CMP #0xd50000d2,%d5
55 CMP #0xd60000d2,%d6
56 CMP #0xd70000d2,%d7
57 CMP #0xa20000d2,%a2
58 CMP #0xa30000d2,%a3
59 CMP #0xa40000d2,%a4
60 CMP #0xa50000d2,%a5
61 CMP #0xa60000d2,%a6
62 move.l %sp@,%d0
63 CMP #0xa7a7a7a7,%d0
66 lea.l %sp@(-4 * 16),%sp
67 move.l %sp,%sp@-
68 jsr setjmp
69 addq.l #4, %sp
70 cmp.l #0,%d0
71 bne 0f
72 move.l %sp,%a0
73 move.l #0,%sp@-
74 move.l %a0,%sp@-
75 jsr longjmp
76 move.l #0xdeadbad,%d0
77 0:
78 CMPS 1,%d2
79 CMPS 2,%d3
80 CMPS 3,%d4
81 CMPS 4,%d5
82 CMPS 5,%d6
83 CMPS 6,%d7
84 CMPS 7,%a2
85 CMPS 8,%a3
86 CMPS 9,%a4
87 CMPS 10,%a5
88 CMPS 11,%a6
90 cmp.l #2,%d0
91 beq 1f
93 CMP #0x1,%d0
94 move.l %sp,%a0
95 move.l #2,%sp@-
96 move.l %a0,%sp@-
97 jsr vfork_longjmp
100 lea.l %sp@(4 * 16),%sp
101 move.l %sp@+,%d0
102 CMP #0xa7a7a7a7,%d0
103 moveq.l #0,%d0
106 .global __vfork
107 __vfork:
108 move.l %sp@(4),%a0
109 move.l #0xdead0001,%sp@-
110 move.l %a0,%sp@-
111 cmp.l #0xd2000022,%a0@(4)
112 beq 0f
113 jsr vfork_longjmp
115 jsr longjmp