config: fix build with external compiler by passing the sysroot where needed
[AROS.git] / arch / .unmaintained / m68k-emul / exec / execstubs.s
blob66103c575f52b6d3fed3088dbdffe9913edfaffe
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: glue functions
6 Lang: english
7 */
9 #include "machine.i"
12 The following functions are guaranteed to preserve
13 all registers. But I don't want to write them completely
14 in assembly - C is generally more readable.
15 So I use those stubs to preserve the registers.
17 #ifdef UseExecstubs
19 .text
20 .balign 16
21 .globl AROS_SLIB_ENTRY(ObtainSemaphore,Exec)
22 .type AROS_SLIB_ENTRY(ObtainSemaphore,Exec),@function
23 AROS_SLIB_ENTRY(ObtainSemaphore,Exec):
24 jbra AmigaSWInitObtainSemaphore
25 jbra AROS_CSYMNAME(_Exec_ObtainSemaphore)
26 AmigaSWInitObtainSemaphore:
27 movem.l %d0-%d1/%a0-%a1,-(%sp)
28 move.l %a6,-(%sp)
29 move.l %a0,-(%sp)
30 jbsr AROS_CSYMNAME(_Exec_ObtainSemaphore)
31 addq.w #8,%sp
32 movem.l (%sp)+,%d0-%d1/%a0-%a1
33 rts
35 .globl AROS_SLIB_ENTRY(ReleaseSemaphore,Exec)
36 .type AROS_SLIB_ENTRY(ReleaseSemaphore,Exec),@function
37 AROS_SLIB_ENTRY(ReleaseSemaphore,Exec):
38 jbra AmigaSWInitReleaseSemaphore
39 jbra AROS_CSYMNAME(_Exec_ReleaseSemaphore)
40 AmigaSWInitReleaseSemaphore:
41 movem.l %d0-%d1/%a0-%a1,-(%sp)
42 move.l %a6,-(%sp)
43 move.l %a0,-(%sp)
44 jbsr AROS_CSYMNAME(_Exec_ReleaseSemaphore)
45 addq.w #8,%sp
46 movem.l (%sp)+,%d0-%d1/%a0-%a1
47 rts
49 .globl AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec)
50 .type AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec),@function
51 AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec):
52 jbra AmigaSWInitObtainSemaphoreShared
53 jbra AROS_CSYMNAME(_Exec_ObtainSemaphoreShared)
54 AmigaSWInitObtainSemaphoreShared:
55 movem.l %d0-%d1/%a0-%a1,-(%sp)
56 move.l %a6,-(%sp)
57 move.l %a0,-(%sp)
58 jbsr AROS_CSYMNAME(_Exec_ObtainSemaphoreShared)
59 addq.w #8,%sp
60 movem.l (%sp)+,%d0-%d1/%a0-%a1
61 rts
63 .globl AROS_SLIB_ENTRY(Disable,Exec)
64 .type AROS_SLIB_ENTRY(Disable,Exec),@function
65 AROS_SLIB_ENTRY(Disable,Exec):
66 jbra AmigaSWInitDisable
67 jbra AROS_CSYMNAME(_Exec_Disable)
68 AmigaSWInitDisable:
69 movem.l %d0-%d1/%a0-%a1,-(%sp)
70 move.l %a6,-(%sp)
71 jbsr AROS_CSYMNAME(_Exec_Disable)
72 addq.w #4,%sp
73 movem.l (%sp)+,%d0-%d1/%a0-%a1
74 rts
76 .globl AROS_SLIB_ENTRY(Enable,Exec)
77 .type AROS_SLIB_ENTRY(Enable,Exec),@function
78 AROS_SLIB_ENTRY(Enable,Exec):
79 jbra AmigaSWInitEnable
80 jbra AROS_CSYMNAME(_Exec_Enable)
81 AmigaSWInitEnable:
82 movem.l %d0-%d1/%a0-%a1,-(%sp)
83 move.l %a6,-(%sp)
84 jbsr AROS_CSYMNAME(_Exec_Enable)
85 addq.w #4,%sp
86 movem.l (%sp)+,%d0-%d1/%a0-%a1
87 rts
89 .globl AROS_SLIB_ENTRY(Forbid,Exec)
90 .type AROS_SLIB_ENTRY(Forbid,Exec),@function
91 AROS_SLIB_ENTRY(Forbid,Exec):
92 jbra AmigaSWInitForbid
93 jbra AROS_CSYMNAME(_Exec_Forbid)
94 AmigaSWInitForbid:
95 movem.l %d0-%d1/%a0-%a1,-(%sp)
96 move.l %a6,-(%sp)
97 jbsr AROS_CSYMNAME(_Exec_Forbid)
98 addq.w #4,%sp
99 movem.l (%sp)+,%d0-%d1/%a0-%a1
102 .globl AROS_SLIB_ENTRY(Permit,Exec)
103 .type AROS_SLIB_ENTRY(Permit,Exec),@function
104 AROS_SLIB_ENTRY(Permit,Exec):
105 jbra AmigaSWInitPermit
106 jbra AROS_CSYMNAME(_Exec_Permit)
107 AmigaSWInitPermit:
108 movem.l %d0-%d1/%a0-%a1,-(%sp)
109 move.l %a6,-(%sp)
110 jbsr AROS_CSYMNAME(_Exec_Permit)
111 addq.w #4,%sp
112 movem.l (%sp)+,%d0-%d1/%a0-%a1
116 #endif