[BACK]Return to sie64a.S CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / arch / s390 / kvm

File: [Development] / linux-2.6-xfs / arch / s390 / kvm / sie64a.S (download)

Revision 1.1, Mon Aug 4 17:03:13 2008 UTC (9 years, 2 months ago) by lachlan.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD

Merge up to 2.6.26
Merge of 2.6.x-xfs-melb:linux:31804b by kenmcd.

/*
 * sie64a.S - low level sie call
 *
 * Copyright IBM Corp. 2008
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License (version 2 only)
 * as published by the Free Software Foundation.
 *
 *    Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
 */

#include <linux/errno.h>
#include <asm/asm-offsets.h>

SP_R5 =	5 * 8	# offset into stackframe
SP_R6 =	6 * 8

/*
 * sie64a calling convention:
 * %r2 pointer to sie control block
 * %r3 guest register save area
 */
	.globl	sie64a
sie64a:
	lgr	%r5,%r3
	stmg	%r5,%r14,SP_R5(%r15)	# save register on entry
	lgr	%r14,%r2		# pointer to sie control block
	lmg	%r0,%r13,0(%r3)		# load guest gprs 0-13
sie_inst:
	sie	0(%r14)
	lg	%r14,SP_R5(%r15)
	stmg	%r0,%r13,0(%r14)	# save guest gprs 0-13
	lghi	%r2,0
	lmg	%r6,%r14,SP_R6(%r15)
	br	%r14

sie_err:
	lg	%r14,SP_R5(%r15)
	stmg	%r0,%r13,0(%r14)	# save guest gprs 0-13
	lghi	%r2,-EFAULT
	lmg	%r6,%r14,SP_R6(%r15)
	br	%r14

	.section __ex_table,"a"
	.quad	sie_inst,sie_err
	.previous