From 348363b2c3ee93252a971ead851085739d8d04fb Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 20 Aug 2012 14:37:27 +0000 Subject: Remove __ASSUME_MMAP2_SYSCALL. --- sysdeps/unix/sysv/linux/i386/mmap.S | 23 ------------------ sysdeps/unix/sysv/linux/i386/mmap64.S | 44 ----------------------------------- 2 files changed, 67 deletions(-) (limited to 'sysdeps/unix/sysv/linux/i386') diff --git a/sysdeps/unix/sysv/linux/i386/mmap.S b/sysdeps/unix/sysv/linux/i386/mmap.S index c8bf3e1087..1f79bde285 100644 --- a/sysdeps/unix/sysv/linux/i386/mmap.S +++ b/sysdeps/unix/sysv/linux/i386/mmap.S @@ -25,10 +25,6 @@ ENTRY (__mmap) -/* I don't think it is worthwhile trying to use mmap2 whenever it - is available. Only use it when we are sure the syscall exists. */ -#ifdef __ASSUME_MMAP2_SYSCALL - /* Save registers. */ pushl %ebp cfi_adjust_cfa_offset (4) @@ -73,25 +69,6 @@ L(skip): cfi_adjust_cfa_offset (-4) cfi_restore (ebp) -#else - - /* Save registers. */ - movl %ebx, %edx - cfi_register (ebx, edx) - - movl $SYS_ify(mmap), %eax /* System call number in %eax. */ - - lea 4(%esp), %ebx /* Address of args is 1st arg. */ - - /* Do the system call trap. */ - int $0x80 - - /* Restore registers. */ - movl %edx, %ebx - cfi_restore (ebx) - -#endif - /* If 0 > %eax > -4096 there was an error. */ cmpl $-4096, %eax ja SYSCALL_ERROR_LABEL diff --git a/sysdeps/unix/sysv/linux/i386/mmap64.S b/sysdeps/unix/sysv/linux/i386/mmap64.S index 7599b85443..8855109ff9 100644 --- a/sysdeps/unix/sysv/linux/i386/mmap64.S +++ b/sysdeps/unix/sysv/linux/i386/mmap64.S @@ -37,8 +37,6 @@ .text ENTRY (BP_SYM (__mmap64)) -#ifdef __NR_mmap2 - /* Save registers. */ pushl %ebp cfi_adjust_cfa_offset (4) @@ -88,12 +86,6 @@ L(do_syscall): cfi_adjust_cfa_offset (-4) cfi_restore (ebp) -#ifndef __ASSUME_MMAP2_SYSCALL -2: - cmp $-ENOSYS, %eax - je 3f -#endif - /* If 0 > %eax > -4096 there was an error. */ cmpl $-4096, %eax ja SYSCALL_ERROR_LABEL @@ -122,42 +114,6 @@ L(einval): cfi_restore (ebp) movl $-EINVAL, %eax jmp SYSCALL_ERROR_LABEL -#endif - -#if !defined __ASSUME_MMAP2_SYSCALL || !defined __NR_mmap2 -3: - /* Save registers. */ - movl %ebx, %edx - cfi_register (ebx, edx) - - cmpl $0, OFFHI-SVRSP(%esp) - jne L(einval2) - - movl $SYS_ify(mmap), %eax /* System call number in %eax. */ - - lea ADDR-SVRSP(%esp), %ebx /* Address of args is 1st arg. */ - - /* Do the system call trap. */ - ENTER_KERNEL - - /* Restore registers. */ - movl %edx, %ebx - cfi_restore (ebx) - - /* If 0 > %eax > -4096 there was an error. */ - cmpl $-4096, %eax - ja SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ - ret - - cfi_register (ebx, edx) -L(einval2): - movl %edx, %ebx - cfi_restore (ebx) - movl $-EINVAL, %eax - jmp SYSCALL_ERROR_LABEL -#endif PSEUDO_END (BP_SYM (__mmap64)) -- cgit 1.4.1