]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arc.c (arc_print_operand): Print integer 'H' / 'L'
authorJoern Rennecke <joern.rennecke@embecosm.com>
Thu, 28 Apr 2016 19:08:28 +0000 (19:08 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 28 Apr 2016 19:08:28 +0000 (20:08 +0100)
2016-04-28  Joern Rennecke  <joern.rennecke@embecosm.com>
            Andrew Burgess  <andrew.burgess@embecosm.com>
gcc:
        * config/arc/arc.c (arc_print_operand): Print integer 'H' / 'L'
gcc/testsuite:
        * gcc.target/arc/movh_cl-1.c: New file.

Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>
From-SVN: r235600

gcc/ChangeLog
gcc/config/arc/arc.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arc/movh_cl-1.c [new file with mode: 0644]

index 9b52544cfc2289be9ceedb36408d8073926c2581..e65e0eaf46ba7e6a1e681d95dd821f7e4e3cf9a7 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-28  Joern Rennecke  <joern.rennecke@embecosm.com>
+           Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * config/arc/arc.c (arc_print_operand): Print integer 'H' / 'L'
+       operands as 32-bits.
+
 2016-04-28  Jason Merrill  <jason@redhat.com>
 
        * gdbinit.in: Skip line-map.h.
index b7dfab1e0d864aa0866cf04b4c24e0f72ff2a3cd..dfaea7b92412a5226df74959e885f393cf85821d 100644 (file)
@@ -3235,19 +3235,17 @@ arc_print_operand (FILE *file, rtx x, int code)
       else if (GET_CODE (x) == CONST_INT
               || GET_CODE (x) == CONST_DOUBLE)
        {
-         rtx first, second;
+         rtx first, second, word;
 
          split_double (x, &first, &second);
 
          if((WORDS_BIG_ENDIAN) == 0)
-             fprintf (file, "0x%08" PRIx64,
-                      code == 'L' ? INTVAL (first) : INTVAL (second));
+           word = (code == 'L' ? first : second);
          else
-             fprintf (file, "0x%08" PRIx64,
-                      code == 'L' ? INTVAL (second) : INTVAL (first));
+           word = (code == 'L' ? second : first);
 
-
-         }
+         fprintf (file, "0x%08" PRIx32, ((uint32_t) INTVAL (word)));
+       }
       else
        output_operand_lossage ("invalid operand to %%H/%%L code");
       return;
index 6c44ee953b9cb2f93fe4f57abfda90008b342a1e..36de779b0a2059ca212f2c2f6b30b029f8a8534b 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-28  Joern Rennecke  <joern.rennecke@embecosm.com>
+           Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * gcc.target/arc/movh_cl-1.c: New file.
+
 2016-04-28  Joern Rennecke  <joern.rennecke@embecosm.com>
            Andrew Burgess  <andrew.burgess@embecosm.com>
 
diff --git a/gcc/testsuite/gcc.target/arc/movh_cl-1.c b/gcc/testsuite/gcc.target/arc/movh_cl-1.c
new file mode 100644 (file)
index 0000000..220cd9d
--- /dev/null
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-mcpu=nps400 -O2 -mbitops" } */
+
+struct thing
+{
+  union
+  {
+    int raw;
+    struct
+    {
+      unsigned a : 1;
+      unsigned b : 1;
+    };
+  };
+};
+
+extern void func (int);
+
+void
+blah ()
+{
+  struct thing xx;
+  xx.a = xx.b = 1;
+  func (xx.raw);
+}
+
+/* { dg-final { scan-assembler "movh\.cl r\[0-9\]+,0xc0000000>>16" } } */