]> gcc.gnu.org Git - gcc.git/commitdiff
Some patterns are using '%w2' for immediate operands...
authorWilco Dijkstra <wdijkstr@arm.com>
Mon, 16 May 2016 12:52:22 +0000 (12:52 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Mon, 16 May 2016 12:52:22 +0000 (12:52 +0000)
Some patterns are using '%w2' for immediate operands, which means that a zero
immediate is actually emitted as 'wzr' or 'xzr'.  This not only changes an
immediate operand into a register operand but may emit illegal instructions
from legal RTL (eg. ORR x0, SP, xzr rather than ORR x0, SP, 0).

* config/aarch64/aarch64.md
(add<mode>3_compareC_cconly_imm): Remove use of %w.
(add<mode>3_compareC_imm): Likewise.
(<optab>si3_uxtw): Split into register and immediate variants.
(andsi3_compare0_uxtw): Likewise.
(and<mode>3_compare0): Likewise.
(and<mode>3nr_compare0): Likewise.
(stack_protect_test_<mode>): Don't use %x for memory operands.

From-SVN: r236285

gcc/ChangeLog
gcc/config/aarch64/aarch64.md

index 45076866e1e2ab93e81ce6864528deb88dbb9b41..ec7cf67a5222297e0c86af3f85a4c1d317a627d8 100644 (file)
@@ -1,3 +1,14 @@
+2016-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * config/aarch64/aarch64.md
+       (add<mode>3_compareC_cconly_imm): Remove use of %w.
+       (add<mode>3_compareC_imm): Likewise.
+       (<optab>si3_uxtw): Split into register and immediate variants.
+       (andsi3_compare0_uxtw): Likewise.
+       (and<mode>3_compare0): Likewise.
+       (and<mode>3nr_compare0): Likewise.
+       (stack_protect_test_<mode>): Don't use %x for memory operands.
+
 2016-05-16  Matthew Fortune  <matthew.fortune@imgtec.com>
 
        * config/mips/mips-cpus.def (p5600): Add multi-line brackets.
index f6bc12dd2efb5fcb104c92b23b9125caec7abf47..223a4cc6d31236865b79770b85fb48cb60383328 100644 (file)
   "aarch64_zero_extend_const_eq (<DWI>mode, operands[2],
                                 <MODE>mode, operands[1])"
   "@
-  cmn\\t%<w>0, %<w>1
+  cmn\\t%<w>0, %1
   cmp\\t%<w>0, #%n1"
   [(set_attr "type" "alus_imm")]
 )
   "aarch64_zero_extend_const_eq (<DWI>mode, operands[3],
                                  <MODE>mode, operands[2])"
   "@
-  adds\\t%<w>0, %<w>1, %<w>2
+  adds\\t%<w>0, %<w>1, %2
   subs\\t%<w>0, %<w>1, #%n2"
   [(set_attr "type" "alus_imm")]
 )
+
 (define_insn "add<mode>3_compareC"
   [(set (reg:CC_C CC_REGNUM)
        (ne:CC_C
          (LOGICAL:SI (match_operand:SI 1 "register_operand" "%r,r")
                     (match_operand:SI 2 "aarch64_logical_operand" "r,K"))))]
   ""
-  "<logical>\\t%w0, %w1, %w2"
+  "@
+   <logical>\\t%w0, %w1, %w2
+   <logical>\\t%w0, %w1, %2"
   [(set_attr "type" "logic_reg,logic_imm")]
 )
 
    (set (match_operand:GPI 0 "register_operand" "=r,r")
        (and:GPI (match_dup 1) (match_dup 2)))]
   ""
-  "ands\\t%<w>0, %<w>1, %<w>2"
+  "@
+   ands\\t%<w>0, %<w>1, %<w>2
+   ands\\t%<w>0, %<w>1, %2"
   [(set_attr "type" "logics_reg,logics_imm")]
 )
 
    (set (match_operand:DI 0 "register_operand" "=r,r")
        (zero_extend:DI (and:SI (match_dup 1) (match_dup 2))))]
   ""
-  "ands\\t%w0, %w1, %w2"
+  "@
+   ands\\t%w0, %w1, %w2
+   ands\\t%w0, %w1, %2"
   [(set_attr "type" "logics_reg,logics_imm")]
 )
 
                  (match_operand:GPI 1 "aarch64_logical_operand" "r,<lconst>"))
         (const_int 0)))]
   ""
-  "tst\\t%<w>0, %<w>1"
+  "@
+   tst\\t%<w>0, %<w>1
+   tst\\t%<w>0, %1"
   [(set_attr "type" "logics_reg,logics_imm")]
 )
 
         UNSPEC_SP_TEST))
    (clobber (match_scratch:PTR 3 "=&r"))]
   ""
-  "ldr\t%<w>3, %x1\;ldr\t%<w>0, %x2\;eor\t%<w>0, %<w>3, %<w>0"
+  "ldr\t%<w>3, %1\;ldr\t%<w>0, %2\;eor\t%<w>0, %<w>3, %<w>0"
   [(set_attr "length" "12")
    (set_attr "type" "multiple")])
 
This page took 0.096874 seconds and 5 git commands to generate.