view arch/svcint.S @ 150:e72f984619c7

Consolidated a lot of the defines which relate to the memory layout There is a new file (include/os/memLayout.h) which now includes just about all the #defines
author Jonathan Pevarnek <pevarnj@gmail.com>
date Wed, 02 Nov 2011 09:55:09 -0400
parents cabcdc3727e3
children
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

	sr	%r1,%r1
	sr	%r3,%r3
	sigp	%r1,%r3,0x05

	.byte 0x00, 0x00, 0x00, 0x00