From: Thomas Preudhomme <thomas.preudhomme@foss.arm.com>
To: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>,
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
Richard Earnshaw <richard.earnshaw@arm.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, GCC/ARM] Fix PR77904: callee-saved register trashed when clobbering sp
Date: Tue, 22 Nov 2016 10:45:00 -0000 [thread overview]
Message-ID: <f3c35e7a-41d1-c2b8-120a-408ee91cb15a@foss.arm.com> (raw)
In-Reply-To: <582D7435.9090502@foss.arm.com>
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.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.
>>>>
>>>
>>> s/mark/Mark/
>>>
>>>>
>>>> *** gcc/testsuite/ChangeLog ***
>>>>
>>>> 2016-11-02 Thomas Preud'homme <thomas.preudhomme@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
next prev parent reply other threads:[~2016-11-22 10:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 16:52 Thomas Preudhomme
2016-11-08 13:37 ` [PATCH, GCC/ARM, ping] " Thomas Preudhomme
2016-11-22 11:52 ` [arm-embedded] " Thomas Preudhomme
2016-11-16 10:30 ` [PATCH, GCC/ARM] " Kyrill Tkachov
2016-11-17 8:56 ` Thomas Preudhomme
2016-11-17 9:11 ` Kyrill Tkachov
2016-11-22 10:45 ` Thomas Preudhomme [this message]
2016-11-30 10:42 ` Thomas Preudhomme
2016-11-30 10:44 ` Thomas Preudhomme
2016-12-06 11:38 ` [PATCH, GCC/ARM, gcc-5/6-branch, ping] " Thomas Preudhomme
2016-12-12 10:44 ` Thomas Preudhomme
2016-12-12 10:46 ` Kyrill Tkachov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3c35e7a-41d1-c2b8-120a-408ee91cb15a@foss.arm.com \
--to=thomas.preudhomme@foss.arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@foss.arm.com \
--cc=ramana.radhakrishnan@arm.com \
--cc=richard.earnshaw@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).