[PATCH, ARM] Fix PR77904 testcase failure

Thomas Preudhomme thomas.preudhomme@linaro.org
Fri Dec 14 23:28:00 GMT 2018


Hi,

Commit r242693 forced fp to be saved/restored when needed due to an
instance of GCC using fp as a scratch register to save sp while it's
being clobbered by an inline asm. The normal path in
thumb1_compute_save_reg_mask saving callee-saved registers which are
live in the function does not work in that case because fp is chosen to
hold sp after that function is called.

Since clobbering sp is now errored out by the compiler and this was the
only case reported where fp was live but not marked as such when
thumb1_compute_save_reg_mask is called, I believe the whole commit
r242693 should be reverted.

ChangeLog entries are as follows:

*** gcc/ChangeLog ***

2018-12-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    Revert:
    2016-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    PR target/77904
    * config/arm/arm.c (thumb1_compute_save_reg_mask): Mark frame pointer
    in save register mask if it is needed.

*** gcc/testsuite/ChangeLog ***

2018-12-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    Revert:
    2016-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    PR target/77904
    * gcc.target/arm/pr77904.c: New test.

Testing: Built an arm-none-eabi GCC cross-compiler targeting Armv6S-M
and regression testsuite does not show any regression.

Ok for stage3?

Best regards,

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_pr77904_test_failure.patch
Type: text/x-patch
Size: 4579 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181214/527fd122/attachment.bin>


More information about the Gcc-patches mailing list