Sorry, the bug cannot be reproduced on gcc-5-branch so it's probably better to only do a backport to gcc-6-branch.

Ok for a backport to gcc-6-branch?

Best regards,

Thomas

On 30/11/16 10:42, Thomas Preudhomme wrote:
Hi,

Is this ok to backport to gcc-5-branch and gcc-6-branch? Patch applies cleanly
(patches attached for reference).


2016-11-30 Thomas Preud'homme <thomas.preudho...@arm.com>

    Backport from mainline
    2016-11-22  Thomas Preud'homme  <thomas.preudho...@arm.com>

    gcc/
    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/
    PR target/77904
    * gcc.target/arm/pr77904.c: New test.


Best regards,

Thomas


On 22/11/16 10:45, Thomas Preudhomme wrote:
On 17/11/16 09:11, Kyrill Tkachov wrote:

On 17/11/16 08:56, Thomas Preudhomme wrote:
On 16/11/16 10:30, Kyrill Tkachov wrote:
Hi Thomas,

On 03/11/16 16:52, Thomas Preudhomme wrote:
Hi,

When using a callee-saved register to save the frame pointer the Thumb-1
prologue fails to save the callee-saved register before that. For ARM and
Thumb-2 targets the frame pointer is handled as a special case but nothing is
done for Thumb-1 targets. This patch adds the same logic for Thumb-1 targets.

ChangeLog entries are as follow:

*** gcc/ChangeLog ***

2016-11-02  Thomas Preud'homme <thomas.preudho...@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.


s/mark/Mark/


*** gcc/testsuite/ChangeLog ***

2016-11-02  Thomas Preud'homme <thomas.preudho...@arm.com>

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


Testing: Testsuite shows no regression when run with arm-none-eabi GCC
cross-compiler for Cortex-M0 target.

Is this ok for trunk?


I'd ask for a bootstrap, but this code is Thumb-1 only so it wouldn't affect
anything.

I can bootstrap for armv4t with --with-mode=thumb which would at least
exercise the path. I'll try such a bootstrap on qemu.


If you can get it to work, then yes please.

Bootstrap came back clean so I've committed the patch (r242693). Thanks!

Best regards,

Thomas

Reply via email to