This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]