This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gcc/config/c6x/c6x.md: Remove "clobber (match_scratch ...)" in "movmisalign<mode>_store".


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

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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]