public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernd Schmidt <bernds@codesourcery.com>
To: Chen Gang <xili_gchen_5257@hotmail.com>, Jeff Law <law@redhat.com>
Cc: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] gcc/config/c6x/c6x.md: Remove "clobber (match_scratch ...)" in "movmisalign<mode>_store".
Date: Fri, 27 Mar 2015 13:04:00 -0000	[thread overview]
Message-ID: <5515553A.7080303@codesourcery.com> (raw)
In-Reply-To: <BLU436-SMTP54E724354B094F919100DB9090@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

On 03/27/2015 01:05 AM, Chen Gang wrote:
> For misalignment memory access, c6x gcc will cause issue, so need remove
> "clobber (match_scratch ...)" which will be symmetric with "movmisalign
> <mode>_load", then pass compiling and generate correct assembly code.
>

> 	* config/c6x/c6x.md (movmisalign<mode>_store): Remove "clobber
> 	(match_scratch ...)".

No, that just will make the compiler confuse loads and stores. I've 
committed the following to fix it (I thought I'd done so a year ago, but 
probably it was one of those commit against an out-of-date tree 
situations and it didn't go through).


Bernd


[-- Attachment #2: misalign.diff --]
[-- Type: text/x-patch, Size: 789 bytes --]

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8e4b6c1..d5535f9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
 2015-03-27  Bernd Schmidt  <bernds@codesourcery.com>
 
+	* config/c6x/c6x.md (movmisalign<mode>): Use MEM_P, not
+	memory_operand.
+
 	PR target/65052
         * config/c6x/constraints.md (S3): New constraint.
         * config/c6x/c6x.md (real_jump): Use it.
diff --git a/gcc/config/c6x/c6x.md b/gcc/config/c6x/c6x.md
index fafefa6..e957eca 100644
--- a/gcc/config/c6x/c6x.md
+++ b/gcc/config/c6x/c6x.md
@@ -775,7 +775,7 @@
 		       UNSPEC_MISALIGNED_ACCESS))]
   "TARGET_INSNS_64"
 {
-  if (memory_operand (operands[0], <MODE>mode))
+  if (MEM_P (operands[0]))
     {
       emit_insn (gen_movmisalign<mode>_store (operands[0], operands[1]));
       DONE;

  parent reply	other threads:[~2015-03-27 13:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27  0:05 Chen Gang
2015-03-27  0:18 ` Chen Gang
2015-03-27 13:04 ` Bernd Schmidt [this message]
2015-03-28  1:32   ` Chen Gang
2015-03-28  6:24     ` Chen Gang

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=5515553A.7080303@codesourcery.com \
    --to=bernds@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=xili_gchen_5257@hotmail.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).