revert between 56095 -> 55830 in arch
[AROS.git] / arch / arm-native / exec / superstate.c
bloba949b28a97e0be319d5d8eac10c08ad79765381d
1 /*
2 Copyright © 2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: SuperState() - Switch the processor into a higher plane.
6 Lang: english
7 */
9 #include <proto/exec.h>
11 /* See rom/exec/superstate.c for documentation */
13 AROS_LH0(APTR, SuperState,
14 struct ExecBase *, SysBase, 25, Exec)
16 AROS_LIBFUNC_INIT
18 register unsigned int superSP;
20 asm volatile (
21 " stmfd sp!, {lr} \n"
22 " mov r1, sp \n"
23 " swi %[swi_no] \n"
24 " mov %[superSP], sp \n"
25 " mov sp, r1 \n"
26 " ldmfd sp!, {lr} \n"
27 : [superSP] "=r" (superSP)
28 : [swi_no] "I" (6 /*SC_SUPERSTATE*/) : "r1"
31 return (APTR)superSP;
33 AROS_LIBFUNC_EXIT
34 } /* SuperState() */