summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386
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/i386
parentbc5bc0e51096cff719eaad4d227ce450a87ee79c (diff)
downloadglibc-348363b2c3ee93252a971ead851085739d8d04fb.tar.gz
Remove __ASSUME_MMAP2_SYSCALL.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386')
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap.S23
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap64.S44
2 files changed, 0 insertions, 67 deletions
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))