[patch][rtl-optimization][i386][pr97777] Fix a reg-stack df maintenance bug triggered by zero-call-used-regs pass.
Qing Zhao
QING.ZHAO@ORACLE.COM
Wed Dec 2 19:14:44 GMT 2020
Thanks a lot for your review.
I will commit the patch soon.
Qing
> On Dec 2, 2020, at 12:27 PM, Jeff Law <law@redhat.com> wrote:
>
>
>
> On 12/2/20 9:32 AM, Qing Zhao wrote:
>>
>>> So we are clearing the x87 registers with that option. Hence the change
>>> in reg-stack behavior. I'm a bit surprised by this as I don't see
>>> clearing the x87 registers as particularly helpful from a security
>>> standpoint. But I haven't followed that discussion closely.
>> Even with the option -fzero-call-used-regs=used-gpr (without clearing any x87 registers),
>> We have the same compiler time error.
>>
>> The first thing that the new pass “zero_call_used_regs” does is:
>>
>> df_analyze();
> OK. So that's the key issue, until now nothing has really cared about
> the DF state after reg-stack, but the pass to zero registers does. I
> had the order backwards in my head with register clearing happening
> before regstack. Hence my significant confusion about why things were
> suddenly going wrong.
>
> The patch is OK. Thanks for patiently walking me through this.
>
> jeff
>
More information about the Gcc-patches
mailing list