[nvptx] Address genrecog warnings
authorJakub Jelinek <jakub@redhat.com>
Fri, 19 Jun 2015 07:41:49 +0000 (09:41 +0200)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Fri, 19 Jun 2015 07:41:49 +0000 (09:41 +0200)
    build/genrecog [...]/source-gcc/gcc/common.md [...]/source-gcc/gcc/config/nvptx/nvptx.md \
              insn-conditions.md > tmp-recog.c
    [...]/source-gcc/gcc/config/nvptx/nvptx.md:1206: warning: operand 0 missing mode?
    [...]/source-gcc/gcc/config/nvptx/nvptx.md:1206: warning: operand 1 missing mode?

gcc/
* config/nvptx/nvptx.md (allocate_stack): Rename to...
(allocate_stack_<mode>): ... this, and add :P on both
match_operand and unspec.
(allocate_stack): New expander.

From-SVN: r224641

gcc/ChangeLog
gcc/config/nvptx/nvptx.md

index 28494ffebaa48dd6284618455a58d341bea4c86a..eb37d086aee44c8c1462f0b5a32d9fa0dcc205ab 100644 (file)
@@ -1,3 +1,10 @@
+2015-06-19  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/nvptx/nvptx.md (allocate_stack): Rename to...
+       (allocate_stack_<mode>): ... this, and add :P on both
+       match_operand and unspec.
+       (allocate_stack): New expander.
+
 2015-06-19  Christian Bruel  <christian.bruel@st.com>
 
        PR target/66541
index c30de36034f0c8b979347e158a83b2eae0a961bb..a49786cb00bde39b4896ee12fa674f084d60b6cd 100644 (file)
   sorry ("target cannot support nonlocal goto.");
 })
 
-(define_insn "allocate_stack"
-  [(set (match_operand 0 "nvptx_register_operand" "=R")
-       (unspec [(match_operand 1 "nvptx_register_operand" "R")]
-                 UNSPEC_ALLOCA))]
+(define_expand "allocate_stack"
+  [(match_operand 0 "nvptx_register_operand")
+   (match_operand 1 "nvptx_register_operand")]
+  ""
+{
+  if (TARGET_ABI64)
+    emit_insn (gen_allocate_stack_di (operands[0], operands[1]));
+  else
+    emit_insn (gen_allocate_stack_si (operands[0], operands[1]));
+  DONE;
+})
+
+(define_insn "allocate_stack_<mode>"
+  [(set (match_operand:P 0 "nvptx_register_operand" "=R")
+        (unspec:P [(match_operand:P 1 "nvptx_register_operand" "R")]
+                   UNSPEC_ALLOCA))]
   ""
   "%.\\tcall (%0), %%alloca, (%1);")