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