Commit 2c62c8ec by Oleg Endo

re PR target/52480 (SH Target: SH4A movua.l does not work for big endian)

	PR target/52480
	* config/sh/sh.md (extv, extzv): Check that operands[3] is zero,
	regardless of the endianness.

	PR target/52480
	* gcc.target/sh/sh4a-bitmovua.c: Compact skip-if list.
	Add runtime tests.

From-SVN: r192283
parent 73b043cd
2012-10-10 Oleg Endo <olegendo@gcc.gnu.org>
PR target/52480
* config/sh/sh.md (extv, extzv): Check that operands[3] is zero,
regardless of the endianness.
2012-10-09 Lawrence Crowl <crowl@google.com> 2012-10-09 Lawrence Crowl <crowl@google.com>
* Makefile.in (fold-const.o): Add depencence on hash-table.h. * Makefile.in (fold-const.o): Add depencence on hash-table.h.
......
...@@ -12706,7 +12706,7 @@ label: ...@@ -12706,7 +12706,7 @@ label:
} }
if (TARGET_SH4A_ARCH if (TARGET_SH4A_ARCH
&& INTVAL (operands[2]) == 32 && INTVAL (operands[2]) == 32
&& INTVAL (operands[3]) == -24 * (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN) && INTVAL (operands[3]) == 0
&& MEM_P (operands[1]) && MEM_ALIGN (operands[1]) < 32) && MEM_P (operands[1]) && MEM_ALIGN (operands[1]) < 32)
{ {
rtx src = adjust_address (operands[1], BLKmode, 0); rtx src = adjust_address (operands[1], BLKmode, 0);
...@@ -12738,7 +12738,7 @@ label: ...@@ -12738,7 +12738,7 @@ label:
} }
if (TARGET_SH4A_ARCH if (TARGET_SH4A_ARCH
&& INTVAL (operands[2]) == 32 && INTVAL (operands[2]) == 32
&& INTVAL (operands[3]) == -24 * (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN) && INTVAL (operands[3]) == 0
&& MEM_P (operands[1]) && MEM_ALIGN (operands[1]) < 32) && MEM_P (operands[1]) && MEM_ALIGN (operands[1]) < 32)
{ {
rtx src = adjust_address (operands[1], BLKmode, 0); rtx src = adjust_address (operands[1], BLKmode, 0);
......
2012-10-10 Oleg Endo <olegendo@gcc.gnu.org>
PR target/52480
* gcc.target/sh/sh4a-bitmovua.c: Compact skip-if list.
Add runtime tests.
2012-10-10 Paolo Carlini <paolo.carlini@oracle.com> 2012-10-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53307 PR c++/53307
......
/* Verify that we generate movua to load unaligned 32-bit values on SH4A. */ /* Verify that we generate movua to load unaligned 32-bit values on SH4A. */
/* { dg-do compile { target "sh*-*-*" } } */ /* { dg-do run { target "sh*-*-*" } } */
/* { dg-options "-O" } */ /* { dg-options "-O1 -save-temps -fno-inline" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" "-m4a-nofpu" } } */ /* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a*" } } */
/* { dg-final { scan-assembler-times "movua.l" 6 } } */ /* { dg-final { scan-assembler-times "movua.l" 6 } } */
/* Aligned. */ /* Aligned. */
...@@ -64,4 +64,28 @@ unsigned long long g4() { ...@@ -64,4 +64,28 @@ unsigned long long g4() {
return y4.d; return y4.d;
} }
#include <assert.h>
int
main (void)
{
x1.d = 0x12345678;
assert (f1 () == 0x12345678);
x2.d = 0x12345678;
assert (f2 () == 0x12345678);
x3.d = 0x12345678;
assert (f3 () == 0x12345678);
y_1.d = 0x12345678;
assert (g1 () == 0x12345678);
y2.d = 0x12345678;
assert (g2 () == 0x12345678);
y3.d = 0x12345678;
assert (g3 () == 0x12345678);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment