This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Rework -fno-omit-frame-pointer support on i386
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 17 Feb 2017 15:08:32 -0200
- Subject: Re: [PATCH] Rework -fno-omit-frame-pointer support on i386
- Authentication-results: sourceware.org; auth=none
- References: <1483966550-21038-1-git-send-email-adhemerval.zanella@linaro.org> <CAMe9rOpsn6_y3MY6X=j-L7FncmWdkoQkQazvxRQUz=W_msRCeQ@mail.gmail.com> <0e80c379-4c5b-9d00-7331-6c4035fac5e2@linaro.org> <CAMe9rOpj4wh=ZGNBr47==hT=EaNavveFvbF5RQJsuMbFqF7eBA@mail.gmail.com>
>> -#if __GNUC_PREREQ (5,0) && !defined PROF
>> + profiling or when -fno-omit-frame-pointer is used since asm ("ebp")
>> + can't be used to put the 6th argument in %ebp for syscall. */
>> +#if __GNUC_PREREQ (5,0) && !defined PROF && CAN_USE_REGISTER_ASM_EBP
>
> Should it be "defined CAN_USE_REGISTER_ASM_EBP"
> since CAN_USE_REGISTER_ASM_EBP may not be defined.
In fact since it is defined in config.h.in as default being 0, it will
always be defined (also I check with -O2 and -Os without --disable-werror
to confirm it.
>
>> # define OPTIMIZE_FOR_GCC_5
>> #endif
>>
>> @@ -611,7 +611,8 @@ struct libc_do_syscall_args
>> #endif
>>
>> /* Consistency check for position-independent code. */
>> -#if defined __PIC__ && !defined OPTIMIZE_FOR_GCC_5
>> +#if defined __PIC__ && !defined OPTIMIZE_FOR_GCC_5 \
>> + && !CAN_USE_REGISTER_ASM_EBP
>
> No need for this. If CAN_USE_REGISTER_ASM_EBP
> isn't defined, OPTIMIZE_FOR_GCC_5 won't be defined.
>
>> # define check_consistency() \
>> ({ int __res; \
>> __asm__ __volatile__ \
>> --
>> 2.7.4
>>
Right, I will remove it. I presume with this fix it is ok to commit.