Mercurial > sos > sos
diff arch/svcint.S @ 83:ca308c8ca41e
beginning of svc support code
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Wed, 27 Apr 2011 12:16:35 -0400 |
parents | |
children | 5f3618fbf9ae |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/arch/svcint.S Wed Apr 27 12:16:35 2011 -0400 @@ -0,0 +1,26 @@ +#include "svcint.h" + +.text + .align 4 +.globl SVCINT + .type SVCINT, @function +SVCINT: + stmg %r0,%r15,_PSA_GPRS + + xgr %r2,%r2 + ic %r2,_PSA_SVC_ID+3 # r2 = SVC + lmg %r3,%r6,_PSA_GPRS+16 # shift all the args + xgr %r7,%r7 # just to make sure accesses to more + # than 4 args fail + larl %r15,_SVC_STACK + lg %r15,%r15 + + # call into C... f(svc, arg0, arg1, arg2, arg3) + larl %r14,_SVC_HANDLER + lg %r14,%r14 + basr %r14,%r14 + + stmg %r2,%r3,_PSA_GPRS+16 # store the return value + + lmg %r0,%r15,_PSA_GPRS + lpswe _PSA_OLD_SVC_PSW