[PATCH] x86: Properly check register CFA offset

H.J. Lu hjl.tools@gmail.com
Wed Jul 26 19:15:00 GMT 2017


On Wed, Jul 26, 2017 at 12:04 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Wed, Jul 26, 2017 at 6:14 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>>
>> X86 epilogue saves register at CFA offset.  Since its location on stack
>> is computed as CFA - its CFA_OFFSET, CFA_OFFSET points the end of the
>> saved register location on stack.  This patch updates sp_valid_at and
>> fp_valid_at to properly check register CFA offset.
>>
>> Tested on x86-64.  OK for trunk if there are no regressions on i686?
>>
>> Thanks.
>>
>> H.J.
>> --
>> gcc/
>>
>>         PR target/81563
>>         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
>>         (fp_valid_at): Likewise.
>>
>> gcc/testsuite/
>>
>>         PR target/81563
>>         * gcc.target/i386/pr81563.c: New test
>
> OK.
>

This is what I checked in with the updated commit log.

Thanks.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Properly-check-saved-register-CFA-offset.patch
Type: text/x-patch
Size: 2922 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170726/97835fc2/attachment.bin>


More information about the Gcc-patches mailing list