This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 6/6] i386: Remove syscall assembly codes with 6 arguments
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 14 Sep 2015 07:39:32 -0700
- Subject: Re: [PATCH 6/6] i386: Remove syscall assembly codes with 6 arguments
- Authentication-results: sourceware.org; auth=none
- References: <20150914142005 dot GF26042 at gmail dot com> <mvmlhc9f4yt dot fsf at hawking dot suse dot de>
On Mon, Sep 14, 2015 at 7:30 AM, Andreas Schwab <schwab@suse.de> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> 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
>
> What happens if the compiler didn't succeed in eliminating the frame
> pointer?
>
For those functions, its won't be a problem with GCC older than
GCC 5 since EBP is saved/restored when making system calls
in asm statement. For GCC 5, you will get
../sysdeps/unix/sysv/linux/i386/mmap.c:34:1: error: bp cannot be used
in asm here
}
when -fno-omit-frame-pointer is used.
--
H.J.