[Bug target/52480] SH Target: SH4A movua.l does not work for big endian

olegendo at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 8 18:00:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52480

--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-10-08 18:00:25 UTC ---
Created attachment 28391
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28391
Proposed patch

Hm, the line

&& INTVAL (operands[3]) == -24 * (BITS_BIG_ENDIAN != BYTES_BIG_ENDIAN)

in the "extv" and "extzv" expanders looks wrong.  operands[3] is always zero,
regardless of the endianess, for the cases in
gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c.

Changing the check to == 0 seems to be a simple fix for this.  Although I
didn't dig any further.  It might be that there are some more missed
unaligned-load opportunities.

I've queued up the attached patch for full testing.



More information about the Gcc-bugs mailing list