summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-03 01:22:20 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-03 01:22:20 +0000
commit56b6e214d5d3bfa72fb999b496999fab14937575 (patch)
treedabe0c3b454a32ff9f7a3556662319e96549d960 /sysdeps
parent29b3c4f2ad92ac2f4176b3cff5c33ef24d82aac1 (diff)
downloadglibc-56b6e214d5d3bfa72fb999b496999fab14937575.tar.gz
glibc-56b6e214d5d3bfa72fb999b496999fab14937575.tar.xz
glibc-56b6e214d5d3bfa72fb999b496999fab14937575.zip
Update.
	* posix/Makefile (tests): Add tst-mmap.
	* posix/tst-mmap.c: New file.

	* sysdeps/unix/sysv/linux/i386/mmap64.S: Pop registers after mmap2
	call before handling error.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap64.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/mmap64.S b/sysdeps/unix/sysv/linux/i386/mmap64.S
index 346bb52b5f..0785bce783 100644
--- a/sysdeps/unix/sysv/linux/i386/mmap64.S
+++ b/sysdeps/unix/sysv/linux/i386/mmap64.S
@@ -56,16 +56,16 @@ ENTRY (__mmap64)
 L(do_syscall):
 	int $0x80
 
-	/* If 0 > %eax > -4096 there was an error.  */
-	cmpl $-4096, %eax
-	ja SYSCALL_ERROR_LABEL
-
 	/* Restore registers.  */
 	popl %edi
 	popl %esi
 	popl %ebx
 	popl %ebp
 
+	/* If 0 > %eax > -4096 there was an error.  */
+	cmpl $-4096, %eax
+	ja SYSCALL_ERROR_LABEL
+
 	/* Successful; return the syscall's value.  */
 L(pseudo_end):
 	ret