final.c (final_scan_insn): Clear current_insn_predicate before outputting inline...
authorPaul Brook <pbrook@gcc.gnu.org>
Thu, 10 Aug 2006 16:31:40 +0000 (16:31 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Thu, 10 Aug 2006 16:31:40 +0000 (16:31 +0000)
2006-08-10  Paul Brook  <paul@codesourcery.com>

gcc/
* final.c (final_scan_insn): Clear current_insn_predicate before
outputting inline asm.

gcc/testsuite/
* gcc.target/arm/cond-asm.c: New test.

From-SVN: r116064

gcc/ChangeLog
gcc/final.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/cond-asm.c [new file with mode: 0644]

index ddd2e67edce0b73898c50a31664490b3c534f8d2..5d6f9d5255a4a5c49a9294acf022f2c75a00f7e1 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-10  Paul Brook  <paul@codesourcery.com>
+
+       * final.c (final_scan_insn): Clear current_insn_predicate before
+       outputting inline asm.
+
 2006-08-10  Dorit Nuzman  <dorit@il.ibm.com>
 
        PR tree-optimization/26197
index 13f724ace8ea4e1769ad08ed13f901d834565850..80b3913cbf40e339820cda42e50ea73fee2181e1 100644 (file)
@@ -1953,6 +1953,10 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
        int insn_code_number;
        const char *template;
 
+#ifdef HAVE_conditional_execution
+       /* Reset this early so it is correct for ASM statements.  */
+       current_insn_predicate = NULL_RTX;
+#endif
        /* An INSN, JUMP_INSN or CALL_INSN.
           First check for special kinds that recog doesn't recognize.  */
 
@@ -2388,8 +2392,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
 #ifdef HAVE_conditional_execution
        if (GET_CODE (PATTERN (insn)) == COND_EXEC)
          current_insn_predicate = COND_EXEC_TEST (PATTERN (insn));
-       else
-         current_insn_predicate = NULL_RTX;
 #endif
 
 #ifdef HAVE_cc0
index 55c187cad32af35bf4988e379e234f1bd76aec1f..f08c34c63efc5f2deb9a2a89995cfdd77f23bb88 100644 (file)
@@ -1,19 +1,24 @@
+2006-08-10  Paul Brook  <paul@codesourcery.com>
+
+       * gcc.target/arm/cond-asm.c: New test.
+
 2006-08-10  Dorit Nuzman  <dorit@il.ibm.com>
 
        PR tree-optimization/26197
        * g++.dg/vect/param-max-aliased-pr26197.cc: New test.
-       * g++.dg/vect/vect.exp: Compile the new testxs with --param max-aliased-vops=0.
+       * g++.dg/vect/vect.exp: Compile the new tests with
+       --param max-aliased-vops=0.
 
 2006-08-09  Lee Millward  <lee.millward@codesourcery.com>
 
-       PR c++/28637
-       * g++.dg/template/void3.C: New test.
+       PR c++/28637
+       * g++.dg/template/void3.C: New test.
 
-       PR c++/28638
-       * g++.dg/template/void4.C: New test.
+       PR c++/28638
+       * g++.dg/template/void4.C: New test.
 
-`       PR c++/28640
-       * g++.dg/template/void5.C: New test.
+       PR c++/28640
+       * g++.dg/template/void5.C: New test.
        
 2006-08-07  Danny Smith  <dannysmith@users.sourceforge.net>
 
@@ -23,9 +28,9 @@
 2006-08-07  Victor Kaplansky <victork@il.ibm.com>
 
        PR tree-optimizations/26969
-        * gcc.dg/vect/vect.exp: Compile tests prefixed with
+       * gcc.dg/vect/vect.exp: Compile tests prefixed with
        "unswitch-loops" with -funswitch-loops.
-        * gcc.dg/vect/unswitch-loops-pr26969.c: New test.
+       * gcc.dg/vect/unswitch-loops-pr26969.c: New test.
 
 2006-08-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
diff --git a/gcc/testsuite/gcc.target/arm/cond-asm.c b/gcc/testsuite/gcc.target/arm/cond-asm.c
new file mode 100644 (file)
index 0000000..450bd9d
--- /dev/null
@@ -0,0 +1,13 @@
+/* Check that %? in inline asm expands to nothing.  */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm32 } */
+int b;
+int foo(int a)
+{
+  if (a)
+    b = 42;
+  asm ("test%?me":"=r"(a):"0"(a));
+  return a;
+}
+/* { dg-final { scan-assembler "testme" } } */