Mercurial > sos > sos
view arch/svcint.S @ 84:5f3618fbf9ae
arch: fix SVC interrupt handler
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Wed, 27 Apr 2011 13:00:16 -0400 |
parents | ca308c8ca41e |
children | cabcdc3727e3 |
line wrap: on
line source
#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,0(%r15) # call into C... f(svc, arg0, arg1, arg2, arg3) larl %r14,_SVC_HANDLER lg %r14,0(%r14) basr %r14,%r14 stmg %r2,%r3,_PSA_GPRS+16 # store the return value lmg %r0,%r15,_PSA_GPRS lpswe _PSA_OLD_SVC_PSW