From: Joern Rennecke Date: Thu, 28 Apr 2016 19:08:28 +0000 (+0000) Subject: arc.c (arc_print_operand): Print integer 'H' / 'L' X-Git-Tag: basepoints/gcc-8~7321 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ad9df624ca4e4b36a46d117628ff788fdcd03b5;p=thirdparty%2Fgcc.git arc.c (arc_print_operand): Print integer 'H' / 'L' 2016-04-28 Joern Rennecke Andrew Burgess 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 From-SVN: r235600 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b52544cfc22..e65e0eaf46ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-04-28 Joern Rennecke + Andrew Burgess + + * config/arc/arc.c (arc_print_operand): Print integer 'H' / 'L' + operands as 32-bits. + 2016-04-28 Jason Merrill * gdbinit.in: Skip line-map.h. diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index b7dfab1e0d86..dfaea7b92412 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6c44ee953b9c..36de779b0a20 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-04-28 Joern Rennecke + Andrew Burgess + + * gcc.target/arc/movh_cl-1.c: New file. + 2016-04-28 Joern Rennecke Andrew Burgess 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 index 000000000000..220cd9d72b94 --- /dev/null +++ b/gcc/testsuite/gcc.target/arc/movh_cl-1.c @@ -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" } } */