2014-07-16 Yvan Roux <yvan.roux@linaro.org>
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Jul 2014 16:31:56 +0000 (16:31 +0000)
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Jul 2014 16:31:56 +0000 (16:31 +0000)
Backport from trunk r210996.
2014-05-27  Andrew Pinski  <apinski@cavium.com>

* config/aarch64/aarch64.md (stack_protect_set_<mode>):
Use <w> for the register in assembly template.
(stack_protect_test): Use the mode of operands[0] for the
result.
(stack_protect_test_<mode>): Use <w> for the register
in assembly template.

git-svn-id: svn://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@212681 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 60eda07..d5a04b2 100644 (file)
@@ -1,5 +1,17 @@
 2014-07-16  Yvan Roux  <yvan.roux@linaro.org>
 
+       Backport from trunk r210996.
+       2014-05-27  Andrew Pinski  <apinski@cavium.com>
+
+       * config/aarch64/aarch64.md (stack_protect_set_<mode>):
+       Use <w> for the register in assembly template.
+       (stack_protect_test): Use the mode of operands[0] for the
+       result.
+       (stack_protect_test_<mode>): Use <w> for the register
+       in assembly template.
+
+2014-07-16  Yvan Roux  <yvan.roux@linaro.org>
+
        Backport from trunk r210967.
        2014-05-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
index c86dd5f..bbae247 100644 (file)
         UNSPEC_SP_SET))
    (set (match_scratch:PTR 2 "=&r") (const_int 0))]
   ""
-  "ldr\\t%x2, %1\;str\\t%x2, %0\;mov\t%x2,0"
+  "ldr\\t%<w>2, %1\;str\\t%<w>2, %0\;mov\t%<w>2,0"
   [(set_attr "length" "12")
    (set_attr "type" "multiple")])
 
    (match_operand 2)]
   ""
 {
-
-  rtx result = gen_reg_rtx (Pmode);
-
+  rtx result;
   enum machine_mode mode = GET_MODE (operands[0]);
 
+  result = gen_reg_rtx(mode);
+
   emit_insn ((mode == DImode
              ? gen_stack_protect_test_di
              : gen_stack_protect_test_si) (result,
         UNSPEC_SP_TEST))
    (clobber (match_scratch:PTR 3 "=&r"))]
   ""
-  "ldr\t%x3, %x1\;ldr\t%x0, %x2\;eor\t%x0, %x3, %x0"
+  "ldr\t%<w>3, %x1\;ldr\t%<w>0, %x2\;eor\t%<w>0, %<w>3, %<w>0"
   [(set_attr "length" "12")
    (set_attr "type" "multiple")])