revert between 56095 -> 55830 in arch
[AROS.git] / arch / armeb-all / exec / execstubs.s
blob1a061fae6456e17edb740537c74018918efd774d
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Stubs to call C functions while preserving all registers, ARM version
6 Lang: english
7 */
9 #include "aros/armeb/asm.h"
12 * Up to 4 arguments can be handled in this way.
13 * Our stubbed functions use only up to two.
15 #define STUB(cname,name) \
16 .globl cname ; \
17 .type cname, %function ; \
18 cname: ; \
19 push {fp, lr} ; \
20 add fp, sp, #4 ; \
21 push {r0, r1, r2, r3, r9, r12} ; \
22 ldr r12, 1f ; \
23 blx r12 ; \
24 pop {r0, r1, r2, r3, r9, r12} ; \
25 sub sp, fp, #4 ; \
26 pop {fp, lr} ; \
27 bx lr ; \
28 1: .word name
30 .text
32 /* Call functions and preserve registers */
33 #ifdef UseExecstubs
34 STUB(AROS_SLIB_ENTRY(Disable,Exec,20),AROS_CSYMNAME(_Exec_20_Disable))
35 STUB(AROS_SLIB_ENTRY(Enable,Exec,21),AROS_CSYMNAME(_Exec_21_Enable))
36 STUB(AROS_SLIB_ENTRY(Forbid,Exec,22),AROS_CSYMNAME(_Exec_22_Forbid))
37 STUB(AROS_SLIB_ENTRY(Permit,Exec,23),AROS_CSYMNAME(_Exec_23_Permit))
39 STUB(AROS_SLIB_ENTRY(ObtainSemaphore,Exec,94),AROS_CSYMNAME(_Exec_94_ObtainSemaphore))
40 STUB(AROS_SLIB_ENTRY(ReleaseSemaphore,Exec,95),AROS_CSYMNAME(_Exec_95_ReleaseSemaphore))
41 STUB(AROS_SLIB_ENTRY(ObtainSemaphoreShared,Exec,113),AROS_CSYMNAME(_Exec_113_ObtainSemaphoreShared))
42 #endif