From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6448 invoked by alias); 8 Oct 2012 18:00:50 -0000 Received: (qmail 6339 invoked by uid 48); 8 Oct 2012 18:00:27 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/52480] SH Target: SH4A movua.l does not work for big endian Date: Mon, 08 Oct 2012 18:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg00719.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52480 --- Comment #2 from Oleg Endo 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.