re PR target/68084 (Inverted conditions generated for x86 inline assembly "flag outpu...
authorUros Bizjak <ubizjak@gmail.com>
Sun, 25 Oct 2015 13:21:01 +0000 (14:21 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 25 Oct 2015 13:21:01 +0000 (14:21 +0100)
PR target/68084
* config/i386/i386.c (ix86_md_asm_adjust) [case 'a']: Use NE code
for =@ccae.

testsuite/ChangeLog:

PR target/68084
* gcc.target/i386/pr68084.c: New test.

From-SVN: r229296

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr68084.c [new file with mode: 0644]

index 4494d624f322475fbb433c3e3e86ccc0598ec1ea..02f71b941b093ca71aae9553b9e16ba0226b01ba 100644 (file)
@@ -1,10 +1,15 @@
+2015-10-25  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/68084
+       * config/i386/i386.c (ix86_md_asm_adjust) [case 'a']: Use NE code
+       for =@ccae.
+
 2015-10-23  Jan Hubicka  <hubicka@ucw.cz>
 
        PR ipa/pr67600
        * ipa-polymorphic-call.c
        (ipa_polymorphic_call_context::get_dynamic_type): Do not confuse
        instance offset with offset of outer type.
-       * g++.dg/torture/pr67600.C: New testcase.
 
 2015-10-23  Jan Hubicka  <hubicka@ucw.cz>
 
index 6fd4a564f1c8a71c9887b0ef5991ddc82228607e..1bc6ef9caf9aa9c00dbd76b5f00cb7b9c36ab737 100644 (file)
@@ -46934,7 +46934,7 @@ ix86_md_asm_adjust (vec<rtx> &outputs, vec<rtx> &/*inputs*/,
          if (con[1] == 0)
            mode = CCAmode, code = EQ;
          else if (con[1] == 'e' && con[2] == 0)
-           mode = CCCmode, code = EQ;
+           mode = CCCmode, code = NE;
          break;
        case 'b':
          if (con[1] == 0)
index ad895f038a625595f8f247128f77ac0baebacbdc..03f7f00e14976bba06c58d51d7dcd0e3fac1a97a 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-25  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/68084
+       * gcc.target/i386/pr68084.c: New test.
+
 2015-10-25  Andre Vehreschild  <vehre@gmx.de>
 
         PR fortran/66927
diff --git a/gcc/testsuite/gcc.target/i386/pr68084.c b/gcc/testsuite/gcc.target/i386/pr68084.c
new file mode 100644 (file)
index 0000000..d3fa3e6
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+int x;
+
+void foo (void)
+{
+  char r;
+
+  asm ("" : "=@ccae"(r));
+
+  if (!r)
+    x = 0;
+}
+
+/* { dg-final { scan-assembler "jnc" } } */