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>,
	 "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, GCC/ARM, stage4] Set mode for success result of atomic compare and swap
Date: Wed, 19 Apr 2017 14:01:00 -0000	[thread overview]
Message-ID: <58F7674C.6050006@foss.arm.com> (raw)
In-Reply-To: <b2c3d30d-7b2b-6b6d-32f4-55c2df02bdbf@foss.arm.com>

Hi Thomas,

On 12/04/17 09:59, Thomas Preudhomme wrote:
> Hi,
>
> Currently atomic_compare_and_swap<mode>_1 define_insn do not have a mode
> set for the destination of the set indicating the success result of the
> instruction. This is because the operand can be either a CC_Z register
> (for 32-bit targets) or a SI register (for 16-bit Thumb targets). This
> result in lack of checking for the mode.
>
> This commit use a new CCSI iterator to solve this issue while avoiding
> duplication of the patterns. The insn name are kept unique by using
> attributes tied to the iterator (SIDI:mode and CCSI:arch) instead of
> usign the builtin mode attribute. Expander arm_expand_compare_and_swap
> is also adapted accordingly.
>
> ChangeLog entry is as follows:
>
> *** gcc/ChangeLog ***
>
> 2017-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>
>     * config/arm/iterators.md (CCSI): New mode iterator.
>     (arch): New mode attribute.
>     * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
>     (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
>     (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
>     code iterator for success result mode.
>     * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
>     the corresponding new insn generators.
>
> Testing: arm-none-eabi cross-compiler built successfully for ARMv8-M
> Mainline and Baseline without the lack of destination mode warning in
> sync.md. Testsuite show no regression.
>

Thanks for fixing these warnings.
The code looks ok to me but
I'd like to make sure that the rest of the arm atomic targets are not adversely affected,
so please also do a test run for ARMv7-A and ARMv8-A targets.
Also, a bootstrap is required as always.

Ok with that testing.

Thanks,
Kyrill

> Is this ok for stage4?
>
> Best regards,
>
> Thomas

  parent reply	other threads:[~2017-04-19 13:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12  8:59 Thomas Preudhomme
2017-04-19  9:33 ` Thomas Preudhomme
2017-04-19 14:01 ` Kyrill Tkachov [this message]
2017-05-03  9:40   ` Thomas Preudhomme
2017-05-03  9:45     ` Kyrill Tkachov
2017-06-01 16:03       ` [arm-embedded] [PATCH, GCC, ARM/embedded-6/7-branch] " Thomas Preudhomme

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=58F7674C.6050006@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).