This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52480] SH Target: SH4A movua.l does not work for big endian
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Oct 2012 18:00:25 +0000
- Subject: [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
- Auto-submitted: auto-generated
- References: <bug-52480-4@http.gcc.gnu.org/bugzilla/>
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.