From patchwork Fri Aug 14 17:34:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 507541 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B9CDC140295 for ; Sat, 15 Aug 2015 03:34:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=b4xNz84z; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; q=dns; s=default; b=tf 2lcFnY1yYbAIPchERq2oyPENw3VdnnLqWMu6y1X9+X4KpKG6AuiKlQJaQkMjs+0a IagSU88aKKtXOdRMEIxp2exgAi2OvtqiZQJ1FgJKNqv1yQ74piwzpsXIa6bfzTBb fhbDBoSp2jpiXSpomBcBpwXELmU1FxEq7P3L1SEU8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; s=default; bh=4LmbgztZ xvftoiV/0dwHU258NO4=; b=b4xNz84zbLYUiqsR1cvM5yAbQwX4F/qi27aGwOPB hGSWpEzZR7JlQic9vcwgtDG4e8p5sSVgOrxb4heCptZqmZ9G4lOo2jxPBB8BBx5R hssz7EWkdzbxER6CZM6CCnmFpcR8h+tvIVw8C1f3lFK1mcIwRjzG5Ry/SQuPqlEY GbI= Received: (qmail 57281 invoked by alias); 14 Aug 2015 17:34:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 57272 invoked by uid 89); 14 Aug 2015 17:34:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f179.google.com MIME-Version: 1.0 X-Received: by 10.60.178.33 with SMTP id cv1mr40051835oec.11.1439573686214; Fri, 14 Aug 2015 10:34:46 -0700 (PDT) In-Reply-To: <20150814121724.GC28610@gmail.com> References: <20150814121724.GC28610@gmail.com> Date: Fri, 14 Aug 2015 10:34:46 -0700 Message-ID: Subject: Re: [PATCH 3/6] i386: Remove syscall assembly codes with 6 arguments From: "H.J. Lu" To: GNU C Library On Fri, Aug 14, 2015 at 5:17 AM, H.J. Lu wrote: > OK for master? > > H.J. > --- > This patch removes i386 assembly implementation for epoll_wait, mmap, > mmap64, semtimeop now that i386 have 6 argument syscall support from > C code and GCC 5 can inline syscalls with 6 argument. We also compile > epoll_pwait.c, mmap.c, mmap64.c and semtimedop.c with -fomit-frame-pointer > since %ebp may be used to pass the 6th argument to syscall. > > Fo sysdeps/unix/sysv/linux/i386/mmap.c, with -O2 -march=i686 > -mtune=generic, GCC 5.2 now generates: > > <__mmap>: > 0: sub $0x10,%esp > 3: mov 0x28(%esp),%eax > 7: mov %ebx,(%esp) > a: mov 0x18(%esp),%ecx > e: mov %esi,0x4(%esp) > 12: mov 0x14(%esp),%ebx > 16: mov %edi,0x8(%esp) > 1a: mov 0x1c(%esp),%edx > 1e: test $0xfff,%eax > 23: mov 0x20(%esp),%esi > 27: mov %ebp,0xc(%esp) > 2b: mov 0x24(%esp),%edi > 2f: jne 60 <__mmap+0x60> > 31: sar $0xc,%eax > 34: mov %eax,%ebp > 36: mov $0xc0,%eax > 3b: call *%gs:0x10 > 42: cmp $0xfffff000,%eax > 47: ja 65 <__mmap+0x65> > 49: mov (%esp),%ebx > 4c: mov 0x4(%esp),%esi > 50: mov 0x8(%esp),%edi > 54: mov 0xc(%esp),%ebp > 58: add $0x10,%esp > 5b: ret > 5c: lea 0x0(%esi,%eiz,1),%esi > 60: mov $0xffffffea,%eax > 65: mov (%esp),%ebx > 68: mov 0x4(%esp),%esi > 6c: mov 0x8(%esp),%edi > 70: mov 0xc(%esp),%ebp > 74: add $0x10,%esp > 77: jmp 78 <__mmap+0x78> 78: R_386_PC32 __syscall_error > > vs sysdeps/unix/sysv/linux/i386/mmap.S: > > <__mmap>: > 0: push %ebp > 1: push %ebx > 2: push %esi > 3: push %edi > 4: mov 0x14(%esp),%ebx > 8: mov 0x18(%esp),%ecx > c: mov 0x1c(%esp),%edx > 10: mov 0x20(%esp),%esi > 14: mov 0x24(%esp),%edi > 18: mov 0x28(%esp),%ebp > 1c: test $0xfff,%ebp > 22: mov $0xffffffea,%eax > 27: jne 38 <__mmap+0x38> > 29: shr $0xc,%ebp > 2c: mov $0xc0,%eax > 31: call *%gs:0x10 > 38: pop %edi > 39: pop %esi > 3a: pop %ebx > 3b: pop %ebp > 3c: cmp $0xfffff000,%eax > 41: ja 44 <__mmap+0x44> > 43: ret > 44: call 45 <__mmap+0x45> 45: R_386_PC32 __x86.get_pc_thunk.cx > 49: add $0x2,%ecx 4b: R_386_GOTPC _GLOBAL_OFFSET_TABLE_ > 4f: mov 0x0(%ecx),%ecx 51: R_386_TLS_GOTIE __libc_errno > 55: neg %eax > 57: mov %eax,%gs:(%ecx) > 5a: or $0xffffffff,%eax > 5d: ret > > The C version has: > > 3: mov 0x28(%esp),%eax > ... > 1e: test $0xfff,%eax > ... > 31: sar $0xc,%eax > 34: mov %eax,%ebp > > is due to missing $ebx register constraint for inline asm. We have > to use "r" constraint with > > register unsigned int _a6 asm ("ebp") = (unsigned int) (arg6); > > and compiler chose %eax for offset (arg6) in > > if (offset & ((1 << MMAP_PAGE_SHIFT) - 1)) > > * sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-epoll_pwait.c): > Add -fomit-frame-pointer. > (CFLAGS-mmap.c): Likewise. > (CFLAGS-mmap64.c): Likewise. > (CFLAGS-semtimedop.c): Likewise. > * sysdeps/unix/sysv/linux/i386/mmap.c: New file. > * sysdeps/unix/sysv/linux/i386/epoll_pwait.S: Remove file. > * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. > * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. > * sysdeps/unix/sysv/linux/i386/semtimedop.S: Likewise. Here is the patch for updated INLINE_SYSCALL_RETURN and INLINE_SYSCALL_ERROR_RETURN. OK for master? From 5bfb25df6df91473cab73fac265b7d6b0e224746 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 12 Aug 2015 12:10:06 -0700 Subject: [PATCH 3/6] i386: Remove syscall assembly codes with 6 arguments This patch removes i386 assembly implementation for epoll_wait, mmap, mmap64, semtimeop now that i386 have 6 argument syscall support from C code and GCC 5 can inline syscalls with 6 argument. We also compile epoll_pwait.c, mmap.c, mmap64.c and semtimedop.c with -fomit-frame-pointer since %ebp may be used to pass the 6th argument to syscall. Fo sysdeps/unix/sysv/linux/i386/mmap.c, with -O2 -march=i686 -mtune=generic, GCC 5.2 now generates: <__mmap>: 0: sub $0x10,%esp 3: mov 0x28(%esp),%eax 7: mov %ebx,(%esp) a: mov 0x18(%esp),%ecx e: mov %esi,0x4(%esp) 12: mov 0x14(%esp),%ebx 16: mov %edi,0x8(%esp) 1a: mov 0x1c(%esp),%edx 1e: test $0xfff,%eax 23: mov 0x20(%esp),%esi 27: mov %ebp,0xc(%esp) 2b: mov 0x24(%esp),%edi 2f: jne 60 <__mmap+0x60> 31: sar $0xc,%eax 34: mov %eax,%ebp 36: mov $0xc0,%eax 3b: call *%gs:0x10 42: cmp $0xfffff000,%eax 47: ja 65 <__mmap+0x65> 49: mov (%esp),%ebx 4c: mov 0x4(%esp),%esi 50: mov 0x8(%esp),%edi 54: mov 0xc(%esp),%ebp 58: add $0x10,%esp 5b: ret 5c: lea 0x0(%esi,%eiz,1),%esi 60: mov $0xffffffea,%eax 65: mov (%esp),%ebx 68: mov 0x4(%esp),%esi 6c: mov 0x8(%esp),%edi 70: mov 0xc(%esp),%ebp 74: add $0x10,%esp 77: jmp 78 <__mmap+0x78> 78: R_386_PC32 __syscall_error vs sysdeps/unix/sysv/linux/i386/mmap.S: <__mmap>: 0: push %ebp 1: push %ebx 2: push %esi 3: push %edi 4: mov 0x14(%esp),%ebx 8: mov 0x18(%esp),%ecx c: mov 0x1c(%esp),%edx 10: mov 0x20(%esp),%esi 14: mov 0x24(%esp),%edi 18: mov 0x28(%esp),%ebp 1c: test $0xfff,%ebp 22: mov $0xffffffea,%eax 27: jne 38 <__mmap+0x38> 29: shr $0xc,%ebp 2c: mov $0xc0,%eax 31: call *%gs:0x10 38: pop %edi 39: pop %esi 3a: pop %ebx 3b: pop %ebp 3c: cmp $0xfffff000,%eax 41: ja 44 <__mmap+0x44> 43: ret 44: call 45 <__mmap+0x45> 45: R_386_PC32 __x86.get_pc_thunk.cx 49: add $0x2,%ecx 4b: R_386_GOTPC _GLOBAL_OFFSET_TABLE_ 4f: mov 0x0(%ecx),%ecx 51: R_386_TLS_GOTIE __libc_errno 55: neg %eax 57: mov %eax,%gs:(%ecx) 5a: or $0xffffffff,%eax 5d: ret The C version has: 3: mov 0x28(%esp),%eax ... 1e: test $0xfff,%eax ... 31: sar $0xc,%eax 34: mov %eax,%ebp is due to missing $ebx register constraint for inline asm. We have to use "r" constraint with register unsigned int _a6 asm ("ebp") = (unsigned int) (arg6); and compiler chose %eax for offset (arg6) in if (offset & ((1 << MMAP_PAGE_SHIFT) - 1)) * sysdeps/unix/sysv/linux/i386/Makefile (CFLAGS-epoll_pwait.c): Add -fomit-frame-pointer. (CFLAGS-mmap.c): Likewise. (CFLAGS-mmap64.c): Likewise. (CFLAGS-semtimedop.c): Likewise. * sysdeps/unix/sysv/linux/i386/mmap.c: New file. * sysdeps/unix/sysv/linux/i386/epoll_pwait.S: Remove file. * sysdeps/unix/sysv/linux/i386/mmap.S: Likewise. * sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise. * sysdeps/unix/sysv/linux/i386/semtimedop.S: Likewise. --- sysdeps/unix/sysv/linux/i386/Makefile | 9 +++ sysdeps/unix/sysv/linux/i386/epoll_pwait.S | 78 ------------------- sysdeps/unix/sysv/linux/i386/mmap.S | 79 -------------------- sysdeps/unix/sysv/linux/i386/mmap.c | 37 +++++++++ sysdeps/unix/sysv/linux/i386/mmap64.S | 116 ----------------------------- sysdeps/unix/sysv/linux/i386/semtimedop.S | 73 ------------------ 6 files changed, 46 insertions(+), 346 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/i386/epoll_pwait.S delete mode 100644 sysdeps/unix/sysv/linux/i386/mmap.S create mode 100644 sysdeps/unix/sysv/linux/i386/mmap.c delete mode 100644 sysdeps/unix/sysv/linux/i386/mmap64.S delete mode 100644 sysdeps/unix/sysv/linux/i386/semtimedop.S diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile index e10d133..b484217 100644 --- a/sysdeps/unix/sysv/linux/i386/Makefile +++ b/sysdeps/unix/sysv/linux/i386/Makefile @@ -3,6 +3,15 @@ default-abi := 32 ifeq ($(subdir),misc) sysdep_routines += ioperm iopl vm86 +# %ebp may be used to pass the 6th argument to syscall. +CFLAGS-epoll_pwait.c += -fomit-frame-pointer +CFLAGS-mmap.c += -fomit-frame-pointer +CFLAGS-mmap64.c += -fomit-frame-pointer +endif + +ifeq ($(subdir),sysvipc) +# %ebp may be used to pass the 6th argument to syscall. +CFLAGS-semtimedop.c += -fomit-frame-pointer endif ifeq ($(subdir),elf) diff --git a/sysdeps/unix/sysv/linux/i386/epoll_pwait.S b/sysdeps/unix/sysv/linux/i386/epoll_pwait.S deleted file mode 100644 index 65cfb98..0000000 --- a/sysdeps/unix/sysv/linux/i386/epoll_pwait.S +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (C) 2007-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - 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, see - . */ - -#include -#define _ERRNO_H -#include -#define _SIGNAL_H -#include - - - .text -ENTRY (epoll_pwait) - -#ifdef __NR_epoll_pwait - - /* Save registers. */ - pushl %ebp - cfi_adjust_cfa_offset (4) - pushl %ebx - cfi_adjust_cfa_offset (4) - pushl %esi - cfi_adjust_cfa_offset (4) - pushl %edi - cfi_adjust_cfa_offset (4) - cfi_rel_offset (edi, 0) - cfi_rel_offset (esi, 4) - cfi_rel_offset (ebx, 8) - cfi_rel_offset (ebp, 12) - - movl 20(%esp), %ebx - movl 24(%esp), %ecx - movl 28(%esp), %edx - movl 32(%esp), %esi - movl 36(%esp), %edi - movl $_NSIG/8, %ebp - movl $__NR_epoll_pwait, %eax - - ENTER_KERNEL - - /* Restore registers. */ - popl %edi - cfi_adjust_cfa_offset (-4) - cfi_restore (edi) - popl %esi - cfi_adjust_cfa_offset (-4) - cfi_restore (esi) - popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - popl %ebp - cfi_adjust_cfa_offset (-4) - cfi_restore (ebp) - - /* If 0 > %eax > -4096 there was an error. */ - cmpl $-4096, %eax - ja SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ -#else - movl $-ENOSYS, %eax - jmp SYSCALL_ERROR_LABEL -#endif - ret -PSEUDO_END (epoll_pwait) diff --git a/sysdeps/unix/sysv/linux/i386/mmap.S b/sysdeps/unix/sysv/linux/i386/mmap.S deleted file mode 100644 index daf807a..0000000 --- a/sysdeps/unix/sysv/linux/i386/mmap.S +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - 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, see - . */ - -#include - -#define EINVAL 22 - - .text - -ENTRY (__mmap) - - /* Save registers. */ - pushl %ebp - cfi_adjust_cfa_offset (4) - pushl %ebx - cfi_adjust_cfa_offset (4) - pushl %esi - cfi_adjust_cfa_offset (4) - pushl %edi - cfi_adjust_cfa_offset (4) - - movl 20(%esp), %ebx - cfi_rel_offset (ebx, 8) - movl 24(%esp), %ecx - movl 28(%esp), %edx - movl 32(%esp), %esi - cfi_rel_offset (esi, 4) - movl 36(%esp), %edi - cfi_rel_offset (edi, 0) - movl 40(%esp), %ebp - cfi_rel_offset (ebp, 12) - testl $0xfff, %ebp - movl $-EINVAL, %eax - jne L(skip) - shrl $12, %ebp /* mmap2 takes the offset in pages. */ - - movl $SYS_ify(mmap2), %eax /* System call number in %eax. */ - - /* Do the system call trap. */ - ENTER_KERNEL -L(skip): - /* Restore registers. */ - popl %edi - cfi_adjust_cfa_offset (-4) - cfi_restore (edi) - popl %esi - cfi_adjust_cfa_offset (-4) - cfi_restore (esi) - popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - popl %ebp - cfi_adjust_cfa_offset (-4) - cfi_restore (ebp) - - /* If 0 > %eax > -4096 there was an error. */ - cmpl $-4096, %eax - ja SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ - ret - -PSEUDO_END (__mmap) - -weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/i386/mmap.c b/sysdeps/unix/sysv/linux/i386/mmap.c new file mode 100644 index 0000000..2839ac3 --- /dev/null +++ b/sysdeps/unix/sysv/linux/i386/mmap.c @@ -0,0 +1,37 @@ +/* Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + 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, see + . */ + +#include +#include +#include +#include + +#ifndef MMAP_PAGE_SHIFT +#define MMAP_PAGE_SHIFT 12 +#endif + +__ptr_t +__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) +{ + if (offset & ((1 << MMAP_PAGE_SHIFT) - 1)) + INLINE_SYSCALL_ERROR_RETURN (-EINVAL, __ptr_t, ); + + INLINE_SYSCALL_RETURN (mmap2, 6, __ptr_t, addr, len, prot, flags, fd, + offset >> MMAP_PAGE_SHIFT); +} + +weak_alias (__mmap, mmap) diff --git a/sysdeps/unix/sysv/linux/i386/mmap64.S b/sysdeps/unix/sysv/linux/i386/mmap64.S deleted file mode 100644 index 3cf6eb9..0000000 --- a/sysdeps/unix/sysv/linux/i386/mmap64.S +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (C) 1995-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - 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, see - . */ - -#include - -#define EINVAL 22 -#define ENOSYS 38 - -#define SVRSP 16 /* saved register space */ -#define PARMS 4+SVRSP /* space for 4 saved regs */ -#define ADDR PARMS -#define LEN ADDR+4 -#define PROT LEN+4 -#define FLAGS PROT+4 -#define FD FLAGS+4 -#define OFFLO FD+4 -#define OFFHI OFFLO+4 - - .text -ENTRY (__mmap64) - - /* Save registers. */ - pushl %ebp - cfi_adjust_cfa_offset (4) - pushl %ebx - cfi_adjust_cfa_offset (4) - pushl %esi - cfi_adjust_cfa_offset (4) - pushl %edi - cfi_adjust_cfa_offset (4) - - movl OFFLO(%esp), %edx - movl OFFHI(%esp), %ecx - testl $0xfff, %edx - jne L(einval) - shrdl $12, %ecx, %edx /* mmap2 takes the offset in pages. */ - shrl $12, %ecx - jne L(einval) - movl %edx, %ebp - cfi_rel_offset (ebp, 12) - - movl ADDR(%esp), %ebx - cfi_rel_offset (ebx, 8) - movl LEN(%esp), %ecx - movl PROT(%esp), %edx - movl FLAGS(%esp), %esi - cfi_rel_offset (esi, 4) - movl FD(%esp), %edi - cfi_rel_offset (edi, 0) - - movl $SYS_ify(mmap2), %eax /* System call number in %eax. */ - - /* Do the system call trap. */ -L(do_syscall): - ENTER_KERNEL - - /* Restore registers. */ - popl %edi - cfi_adjust_cfa_offset (-4) - cfi_restore (edi) - popl %esi - cfi_adjust_cfa_offset (-4) - cfi_restore (esi) - popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - popl %ebp - cfi_adjust_cfa_offset (-4) - cfi_restore (ebp) - - /* If 0 > %eax > -4096 there was an error. */ - cmpl $-4096, %eax - ja SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ - ret - - cfi_adjust_cfa_offset (16) - cfi_rel_offset (ebp, 12) - cfi_rel_offset (ebx, 8) - cfi_rel_offset (esi, 4) - cfi_rel_offset (edi, 0) - /* This means the offset value is too large. */ -L(einval): - popl %edi - cfi_adjust_cfa_offset (-4) - cfi_restore (edi) - popl %esi - cfi_adjust_cfa_offset (-4) - cfi_restore (esi) - popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - popl %ebp - cfi_adjust_cfa_offset (-4) - cfi_restore (ebp) - movl $-EINVAL, %eax - jmp SYSCALL_ERROR_LABEL - -PSEUDO_END (__mmap64) - -weak_alias (__mmap64, mmap64) diff --git a/sysdeps/unix/sysv/linux/i386/semtimedop.S b/sysdeps/unix/sysv/linux/i386/semtimedop.S deleted file mode 100644 index 80477b7..0000000 --- a/sysdeps/unix/sysv/linux/i386/semtimedop.S +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (C) 2003-2015 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper , 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - 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, see - . */ - -#include - -#define SYSOP_semtimedop 4 - -#define SVRSP 12 /* saved register space */ -#define PARMS 4+SVRSP /* space for 3 saved regs */ -#define SEMID PARMS -#define SOPS SEMID+4 -#define NSOPS SOPS+4 -#define TIMEOUT NSOPS+4 - - .text -ENTRY (semtimedop) - - pushl %ebp - cfi_adjust_cfa_offset (4) - pushl %ebx - cfi_adjust_cfa_offset (4) - pushl %edi - cfi_adjust_cfa_offset (4) - - movl $SYSOP_semtimedop, %ebx - cfi_rel_offset (ebx, 4) - movl SEMID(%esp), %ecx - movl NSOPS(%esp), %edx - movl SOPS(%esp), %edi - cfi_rel_offset (edi, 0) - movl TIMEOUT(%esp), %ebp - cfi_rel_offset (ebp, 8) - movl $__NR_ipc, %eax - - ENTER_KERNEL - - /* Restore registers. */ - popl %edi - cfi_adjust_cfa_offset (-4) - cfi_restore (edi) - popl %ebx - cfi_adjust_cfa_offset (-4) - cfi_restore (ebx) - popl %ebp - cfi_adjust_cfa_offset (-4) - cfi_restore (ebp) - - /* If 0 > %eax > -4096 there was an error. */ - cmpl $-4096, %eax - ja SYSCALL_ERROR_LABEL - - /* Successful; return the syscall's value. */ - ret - -#ifdef PIC - .align 4 -#endif -PSEUDO_END (semtimedop) -- 2.4.3