This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Rework -fno-omit-frame-pointer support on i386


On Fri, Feb 17, 2017 at 9:08 AM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
>>> -#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.

Yes, it is OK with this change.

Thanks for working on this.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]