public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
To: Thomas Preudhomme <thomas.preudhomme@foss.arm.com>,
	 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
	Richard Earnshaw <richard.earnshaw@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, GCC/ARM, gcc-5/6-branch, ping] Fix PR77904: callee-saved register trashed when clobbering sp
Date: Mon, 12 Dec 2016 10:46:00 -0000	[thread overview]
Message-ID: <584E7FFD.9090101@foss.arm.com> (raw)
In-Reply-To: <51cb2ae9-71c1-540a-6c7c-dc960adcbabf@foss.arm.com>


On 12/12/16 10:44, Thomas Preudhomme wrote:
> Same as for PR77933, I'm trying to get this in for the next GCC 6 release.
>
> I've successfully done a Thumb-1 bootstrap of the backport and testsuite shows no regression when run with an arm-none-eabi GCC cross-compiler targeting ARM Cortex-M0.
>
> Is this ok for gcc-6-branch?
>

Given this has been in trunk for some time, is specific to Thumb-1 and fixes a wrong-code issue this is ok.
Thanks,
Kyrill

> Best regards,
>
> Thomas
>
> On 06/12/16 11:38, Thomas Preudhomme wrote:
>> Ping?
>>
>> Best regards,
>>
>> Thomas
>>
>> On 30/11/16 10:44, Thomas Preudhomme wrote:
>>> 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.preudhomme@arm.com>
>>>>
>>>>     Backport from mainline
>>>>     2016-11-22  Thomas Preud'homme <thomas.preudhomme@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.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

      reply	other threads:[~2016-12-12 10:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03 16:52 [PATCH, GCC/ARM] " 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
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 [this message]

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=584E7FFD.9090101@foss.arm.com \
    --to=kyrylo.tkachov@foss.arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ramana.radhakrishnan@arm.com \
    --cc=richard.earnshaw@arm.com \
    --cc=thomas.preudhomme@foss.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).