about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-08-20 14:37:27 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-08-20 14:37:27 +0000
commit348363b2c3ee93252a971ead851085739d8d04fb (patch)
treeb3fbc181c228ad71cbbb0a21e98a9fd6e6966d78 /sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
parentbc5bc0e51096cff719eaad4d227ce450a87ee79c (diff)
downloadglibc-348363b2c3ee93252a971ead851085739d8d04fb.tar.gz
glibc-348363b2c3ee93252a971ead851085739d8d04fb.tar.xz
glibc-348363b2c3ee93252a971ead851085739d8d04fb.zip
Remove __ASSUME_MMAP2_SYSCALL.
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S')
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S37
1 files changed, 3 insertions, 34 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S b/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
index ad6d254db1..8b4bd4556f 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -41,15 +41,14 @@ ENTRY(__mmap64)
 	cfi_adjust_cfa_offset (120)
 	st	%r1,0(%r15)		/* Store back chain.  */
 
-	/* Store parameters on stack, because mmap2 and old_mmap
-	 * take only one parameter: a pointer to the parameter area.  */
+	/* Store parameters on stack, because mmap2
+	 * takes only one parameter: a pointer to the parameter area.  */
 	st	%r6,0x70(%r15)		/* Store 'fd'.	    */
 	st	%r5,0x6C(%r15)		/* Store 'flags'.   */
 	st	%r4,0x68(%r15)		/* Store 'prot'.    */
 	st	%r3,0x64(%r15)		/* Store 'length'.  */
 	st	%r2,0x60(%r15)		/* Store 'start'.   */
 
-#ifdef __NR_mmap2
 	lm	%r0,%r1,216(%r15)	/* Load 64 bit offset.	*/
 	tml	%r1,0x0fff		/* Offset page aligned ?  */
 	jnz	2f			/* No -> EINVAL.  */
@@ -61,11 +60,6 @@ ENTRY(__mmap64)
 	la	%r2,0x60(%r15)		/* Load address of parameter list.  */
 	svc	SYS_ify(mmap2)		/* Do the system call trap.  */
 
-#ifndef __ASSUME_MMAP2_SYSCALL
-	chi	%r2,-ENOSYS
-	je	1f
-#endif
-
 	l	%r15,0(%r15)		/* Load back chain.  */
 	cfi_adjust_cfa_offset (-120)
 	lm	%r6,%r15,24(%r15)	/* Load registers.  */
@@ -78,31 +72,6 @@ ENTRY(__mmap64)
 	/* Successful; return the syscall's value.  */
 	br	%r14
 
-#endif
-
-#if !defined __ASSUME_MMAP2_SYSCALL || !defined __NR_mmap2
-1:	lm	%r0,%r1,216(%r15)	/* Load 64 bit offset.	*/
-	st	%r1,0x74(%r15)		/* Store lower word of offset.	*/
-	ltr	%r0,%r0			/* Offset > 2^32 ?  */
-	jnz	2f
-	alr	%r1,%r3			/* Add length to offset.  */
-	brc	3,2f			/* Carry -> EINVAL.  */
-
-	la	%r2,0x60(%r15)		/* Load address of parameter list.  */
-	svc	SYS_ify(mmap)	/* Do the system call trap.  */
-
-	l	%r15,0(%r15)		/* Load back chain.  */
-	lm	%r6,%r15,24(%r15)	/* Load registers.  */
-
-	/* Check gpr 2 for error.  */
-	lhi	%r0,-4096
-	clr	%r2,%r0
-	jnl	SYSCALL_ERROR_LABEL
-
-	/* Successful; return the syscall's value.  */
-	br	%r14
-#endif
-
 2:	lhi	%r2,-EINVAL
 	l	%r15,0(%r15)		/* Load back chain.  */
 	lm	%r6,%r15,24(%r15)	/* Load registers.  */