public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian
@ 2012-03-04 13:32 olegendo at gcc dot gnu.org
  2012-03-05  5:33 ` [Bug target/52480] " kkojima at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-03-04 13:32 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52480
           Summary: SH Target: SH4A movua.l does not work for big endian
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: olegendo@gcc.gnu.org
                CC: kkojima@gcc.gnu.org
            Target: sh4a-*-*


As of rev 184877 the following SH4A target test is failing:

gcc.target/sh/sh4a-bitmovua.c scan-assembler-times movua.l 6

The test checks the usage of SH4A's movua.l instruction for loading unaligned
SImode values.  While the movual.l instruction is generated for little endian,
it is not generated for big endian.

Using built-in specs.
COLLECT_GCC=sh-elf-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/sh-elf/4.8.0/lto-wrapper
Target: sh-elf
Configured with: ../gcc-trunk/configure --target=sh-elf --prefix=/usr/local
--enable-languages=c,c++ --enable-multilib --disable-libssp --disable-nls
--disable-werror --enable-lto --with-newlib --with-gnu-as --with-gnu-ld
--with-system-zlib
Thread model: single
gcc version 4.8.0 20120304 (experimental) (GCC)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
@ 2012-03-05  5:33 ` kkojima at gcc dot gnu.org
  2012-10-08 18:00 ` olegendo at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-03-05  5:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2012-03-05 05:30:18 UTC ---
Created attachment 26831
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26831
A possible patch

Looks to be a similar problem with PR52394.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
  2012-03-05  5:33 ` [Bug target/52480] " kkojima at gcc dot gnu.org
@ 2012-10-08 18:00 ` olegendo at gcc dot gnu.org
  2012-10-08 18:01 ` olegendo at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-10-08 18:00 UTC (permalink / raw)
  To: gcc-bugs


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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
  2012-03-05  5:33 ` [Bug target/52480] " kkojima at gcc dot gnu.org
  2012-10-08 18:00 ` olegendo at gcc dot gnu.org
@ 2012-10-08 18:01 ` olegendo at gcc dot gnu.org
  2012-10-08 18:04 ` olegendo at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-10-08 18:01 UTC (permalink / raw)
  To: gcc-bugs


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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-08
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-10-08 18:01 ` olegendo at gcc dot gnu.org
@ 2012-10-08 18:04 ` olegendo at gcc dot gnu.org
  2012-10-10  0:51 ` olegendo at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-10-08 18:04 UTC (permalink / raw)
  To: gcc-bugs


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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #28391|0                           |1
        is obsolete|                            |

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

Sorry, forgot to add -fno-inline to the compile options for the test.
I've only briefly tested the patch with

make -k check-gcc RUNTESTFLAGS="sh.exp=sh4a-bitmovua*
--target_board=sh-sim\{-m4a/-ml,-m4a/-mb}"


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-10-08 18:04 ` olegendo at gcc dot gnu.org
@ 2012-10-10  0:51 ` olegendo at gcc dot gnu.org
  2012-10-10  0:54 ` olegendo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-10-10  0:51 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-10-10 00:51:03 UTC ---
Author: olegendo
Date: Wed Oct 10 00:50:37 2012
New Revision: 192283

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192283
Log:
    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.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/sh.md
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-10-10  0:51 ` olegendo at gcc dot gnu.org
@ 2012-10-10  0:54 ` olegendo at gcc dot gnu.org
  2013-01-28 20:21 ` olegendo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-10-10  0:54 UTC (permalink / raw)
  To: gcc-bugs


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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-10-10 00:54:39 UTC ---
Fixed in 4.8.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-10-10  0:54 ` olegendo at gcc dot gnu.org
@ 2013-01-28 20:21 ` olegendo at gcc dot gnu.org
  2013-01-28 20:44 ` olegendo at gcc dot gnu.org
  2013-02-03 22:30 ` olegendo at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-01-28 20:21 UTC (permalink / raw)
  To: gcc-bugs


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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-01-28 20:21:00 UTC ---
As of rev 195493 the test case for this PR is failing again.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2013-01-28 20:21 ` olegendo at gcc dot gnu.org
@ 2013-01-28 20:44 ` olegendo at gcc dot gnu.org
  2013-02-03 22:30 ` olegendo at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-01-28 20:44 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-01-28 20:44:03 UTC ---
(In reply to comment #6)
> As of rev 195493 the test case for this PR is failing again.

In fact, now it doesn't work for little and big endian.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/52480] SH Target: SH4A movua.l does not work for big endian
  2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2013-01-28 20:44 ` olegendo at gcc dot gnu.org
@ 2013-02-03 22:30 ` olegendo at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2013-02-03 22:30 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Oleg Endo <olegendo at gcc dot gnu.org> 2013-02-03 22:29:46 UTC ---
(In reply to comment #7)
> (In reply to comment #6)
> > As of rev 195493 the test case for this PR is failing again.
> 
> In fact, now it doesn't work for little and big endian.

This is because the standard name patterns insv, extv, extzv got deprecated.
The new replacements are: extv<m>, extvmisalign<m>, extzv<m>, extzvmisalign<m>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-02-03 22:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-04 13:32 [Bug target/52480] New: SH Target: SH4A movua.l does not work for big endian olegendo at gcc dot gnu.org
2012-03-05  5:33 ` [Bug target/52480] " kkojima at gcc dot gnu.org
2012-10-08 18:00 ` olegendo at gcc dot gnu.org
2012-10-08 18:01 ` olegendo at gcc dot gnu.org
2012-10-08 18:04 ` olegendo at gcc dot gnu.org
2012-10-10  0:51 ` olegendo at gcc dot gnu.org
2012-10-10  0:54 ` olegendo at gcc dot gnu.org
2013-01-28 20:21 ` olegendo at gcc dot gnu.org
2013-01-28 20:44 ` olegendo at gcc dot gnu.org
2013-02-03 22:30 ` olegendo at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).