-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <sysdep.h>
ENTRY (syscall)
/* Save registers and setup stack. */
stmg %r6,%r15,48(%r15) /* Save registers. */
+ cfi_offset (%r15,-40)
+ cfi_offset (%r14,-48)
+ cfi_offset (%r13,-56)
+ cfi_offset (%r12,-64)
+ cfi_offset (%r11,-72)
+ cfi_offset (%r10,-80)
+ cfi_offset (%r9,-88)
+ cfi_offset (%r8,-96)
+ cfi_offset (%r7,-104)
+ cfi_offset (%r6,-112)
lgr %r1,%r15
lg %r0,8(%r15) /* Load eos. */
aghi %r15,-160 /* Buy stack space. */
+ cfi_adjust_cfa_offset (160)
stg %r1,0(%r15) /* Store back chain. */
stg %r0,8(%r15) /* Store eos. */
-
+
lgr %r1,%r2 /* Move syscall number. */
lgr %r2,%r3 /* First parameter. */
lgr %r3,%r4 /* Second parameter. */
lgr %r4,%r5 /* Third parameter. */
lgr %r5,%r6 /* Fourth parameter. */
lg %r6,320(%r15) /* Fifth parameter. */
- basr %r7,0
-.L0: ex %r1,.L1-.L0(%r7) /* Lsb of R1 is subsituted as SVC number. */
+ lg %r7,328(%r15) /* Sixth parameter. */
- lg %r15,0(%r15) /* Load back chain. */
+ basr %r8,0
+0: clg %r1,4f-0b(%r8) /* svc number < 256? */
+ jl 2f
+1: svc 0
+ j 3f
+2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */
+3: lg %r15,0(%r15) /* load back chain */
+ cfi_adjust_cfa_offset (-160)
lmg %r6,15,48(%r15) /* Load registers. */
lghi %r0,-4095
clgr %r2,%r0 /* Check R2 for error. */
jgnl SYSCALL_ERROR_LABEL
br %r14 /* Return to caller. */
-.L1: .word 0x0A00 /* Opcode for SVC 0. */
+4: .quad 256
PSEUDO_END (syscall)