]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
msp430.md (zero_extendpsisi2): Use + constraint on operand 0 in order to prevent...
authorNick Clifton <nickc@redhat.com>
Tue, 20 May 2014 09:38:00 +0000 (09:38 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 20 May 2014 09:38:00 +0000 (09:38 +0000)
* config/msp430/msp430.md (zero_extendpsisi2): Use + constraint on
operand 0 in order to prevent confusion about the number of
registers involved.

From-SVN: r210636

gcc/ChangeLog
gcc/config/msp430/msp430.md

index 26142bad936ceb8ff5d7eec43de760ffac347dbc..3acd9637a28bcd275f470076d879051d70eee309 100644 (file)
@@ -1,3 +1,9 @@
+2014-05-20  Nick Clifton  <nickc@redhat.com>
+
+       * config/msp430/msp430.md (zero_extendpsisi2): Use + constraint on
+       operand 0 in order to prevent confusion about the number of
+       registers involved.
+
 2014-05-20  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/61221
index ceff537c31db7401fecd39f005ec7a6652eee265..ecdc49359bf8afaaf86fe3a9346d8604706e7330 100644 (file)
 ; when the PSI value is negative..
 ;
 ; Note: using PUSHM.A #1 is two bytes smaller than using PUSHX.A....
+;
+; Note: We use a + constraint on operand 0 as otherwise GCC gets confused
+; about extending a single PSI mode register into a pair of SImode registers
+; with the same starting register.  It thinks that the upper register of
+; the pair is unused and so it can clobber it.  Try compiling 20050826-2.c
+; at -O2 to see this.
 
 (define_insn "zero_extendpsisi2"
-  [(set (match_operand:SI                  0 "register_operand" "=r")
+  [(set (match_operand:SI                  0 "register_operand" "+r")
        (zero_extend:SI (match_operand:PSI 1 "register_operand" "r")))]
   ""
   "*