2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id: execstubs.s 21502 2004-04-09 00:29:38Z falemagn $
5 Desc: Stubs to call C functions while preserving all registers
8 #include "aros/x86_64/asm.h"
12 PUSH - Save all registers on the stack
13 POP - Restore all registers from the stack
15 STUB_ARG0(name) - Call a function preserving all registers
16 which gets no arguments
17 STUB_ARG1(name) - Call a function preserving all registers
18 which gets a single argument
19 STUB_ARG2(name) - Call a function preserving all registers
20 which gets two arguments
24 #define STUB_ARG0(name) \
31 #define STUB_ARG1(name) \
38 #define STUB_ARG2(name) \
45 /* To save typing work */
46 #define STUB0(cname,name) \
52 #define STUB1(cname,name) \
59 #define STUB2(cname,name) \
68 /* Call functions and preserve registers */
70 STUB1
(AROS_SLIB_ENTRY
(Forbid
,Exec
),AROS_CSYMNAME
(_Exec_Forbid
))
71 STUB1
(AROS_SLIB_ENTRY
(Permit
,Exec
),AROS_CSYMNAME
(_Exec_Permit
))
72 STUB1
(AROS_SLIB_ENTRY
(Disable
,Exec
),AROS_CSYMNAME
(_Exec_Disable
))
73 STUB1
(AROS_SLIB_ENTRY
(Enable
,Exec
),AROS_CSYMNAME
(_Exec_Enable
))
75 STUB2
(AROS_SLIB_ENTRY
(ObtainSemaphore
,Exec
),AROS_CSYMNAME
(_Exec_ObtainSemaphore
))
76 STUB2
(AROS_SLIB_ENTRY
(ReleaseSemaphore
,Exec
),AROS_CSYMNAME
(_Exec_ReleaseSemaphore
))
77 STUB2
(AROS_SLIB_ENTRY
(ObtainSemaphoreShared
,Exec
),AROS_CSYMNAME
(_Exec_ObtainSemaphoreShared
))