Wanderer/Info: fix compilation
[AROS.git] / arch / .unmaintained / m68k-linux / exec / execstubs.s
bloba0deafc6e346adfc3695536553b44dbc3f725bb1
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 movem.l %d0-%d1/%a0-%a1,-(%sp)
25 move.l %a6,-(%sp)
26 move.l %a0,-(%sp)
27 #ifdef __PIC__
28 bsr.l AROS_CSYMNAME(_Exec_ObtainSemaphore)@PLTPC
29 #else
30 jbsr AROS_CSYMNAME(_Exec_ObtainSemaphore)
31 #endif
32 addq.w #8,%sp
33 movem.l (%sp)+,%d0-%d1/%a0-%a1
34 rts
36 .globl AROS_SLIB_ENTRY(ReleaseSemaphore,Exec)
37 .type AROS_SLIB_ENTRY(ReleaseSemaphore,Exec),@function
38 AROS_SLIB_ENTRY(ReleaseSemaphore,Exec):
39 movem.l %d0-%d1/%a0-%a1,-(%sp)
40 move.l %a6,-(%sp)
41 move.l %a0,-(%sp)
42 #ifdef __PIC__
43 bsr.l AROS_CSYMNAME(_Exec_ReleaseSemaphore)@PLTPC
44 #else
45 jbsr AROS_CSYMNAME(_Exec_ReleaseSemaphore)
46 #endif
47 addq.w #8,%sp
48 movem.l (%sp)+,%d0-%d1/%a0-%a1
49 rts
51 .globl AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec)
52 .type AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec),@function
53 AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec):
54 movem.l %d0-%d1/%a0-%a1,-(%sp)
55 move.l %a6,-(%sp)
56 move.l %a0,-(%sp)
57 #ifdef __PIC__
58 bsr.l AROS_CSYMNAME(_Exec_ObtainSemaphoreShared)@PLTPC
59 #else
60 jbsr AROS_CSYMNAME(_Exec_ObtainSemaphoreShared)
61 #endif
62 addq.w #8,%sp
63 movem.l (%sp)+,%d0-%d1/%a0-%a1
64 rts
66 .globl AROS_SLIB_ENTRY(Disable,Exec)
67 .type AROS_SLIB_ENTRY(Disable,Exec),@function
68 AROS_SLIB_ENTRY(Disable,Exec):
69 movem.l %d0-%d1/%a0-%a1,-(%sp)
70 move.l %a6,-(%sp)
71 #ifdef __PIC__
72 bsr.l AROS_CSYMNAME(_Exec_Disable)@PLTPC
73 #else
74 jbsr AROS_CSYMNAME(_Exec_Disable)
75 #endif
76 addq.w #4,%sp
77 movem.l (%sp)+,%d0-%d1/%a0-%a1
78 rts
80 .globl AROS_SLIB_ENTRY(Enable,Exec)
81 .type AROS_SLIB_ENTRY(Enable,Exec),@function
82 AROS_SLIB_ENTRY(Enable,Exec):
83 movem.l %d0-%d1/%a0-%a1,-(%sp)
84 move.l %a6,-(%sp)
85 #ifdef __PIC__
86 bsr.l AROS_CSYMNAME(_Exec_Enable)@PLTPC
87 #else
88 jbsr AROS_CSYMNAME(_Exec_Enable)
89 #endif
90 addq.w #4,%sp
91 movem.l (%sp)+,%d0-%d1/%a0-%a1
92 rts
94 .globl AROS_SLIB_ENTRY(Forbid,Exec)
95 .type AROS_SLIB_ENTRY(Forbid,Exec),@function
96 AROS_SLIB_ENTRY(Forbid,Exec):
97 movem.l %d0-%d1/%a0-%a1,-(%sp)
98 move.l %a6,-(%sp)
99 #ifdef __PIC__
100 bsr.l AROS_CSYMNAME(_Exec_Forbid)@PLTPC
101 #else
102 jbsr AROS_CSYMNAME(_Exec_Forbid)
103 #endif
104 addq.w #4,%sp
105 movem.l (%sp)+,%d0-%d1/%a0-%a1
108 .globl AROS_SLIB_ENTRY(Permit,Exec)
109 .type AROS_SLIB_ENTRY(Permit,Exec),@function
110 AROS_SLIB_ENTRY(Permit,Exec):
111 movem.l %d0-%d1/%a0-%a1,-(%sp)
112 move.l %a6,-(%sp)
113 #ifdef __PIC__
114 bsr.l AROS_CSYMNAME(_Exec_Permit)@PLTPC
115 #else
116 jbsr AROS_CSYMNAME(_Exec_Permit)
117 #endif
118 addq.w #4,%sp
119 movem.l (%sp)+,%d0-%d1/%a0-%a1
123 #endif