public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/62218] New: gcc produces invalid SH instruction (stc r2,sr) when building libgcc
@ 2014-08-21 14:52 dhowells at redhat dot com
  2014-08-21 15:09 ` [Bug target/62218] " dhowells at redhat dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dhowells at redhat dot com @ 2014-08-21 14:52 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3512 bytes --]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62218

            Bug ID: 62218
           Summary: gcc produces invalid SH instruction (stc r2,sr) when
                    building libgcc
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dhowells at redhat dot com

Created attachment 33374
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33374&action=edit
Reduced test case

A gcc build for SH produces an invalid opcode when building libgcc.  It
produces "stc sr,rN" when it should produce "ldc sr,rN".

/data/fedora/cross-gcc/gcc-4.9.1-20140717/sh-linux-gnu/./gcc/xgcc
-B/data/fedora/cross-gcc/gcc-4.9.1-20140717/sh-linux-gnu/./gcc/
-B/usr/sh-linux-gnu/bin/ -O2 -mb -fpic -w -Wno-sync-nand -fbuilding-libgcc -o
/tmp/linux-atomic.o -c /tmp/linux-atomic.i
/tmp/ccHwXin4.s: Assembler messages:
/tmp/ccHwXin4.s:19: Error: invalid operands for opcode
/tmp/ccHwXin4.s:38: Error: invalid operands for opcode
/tmp/ccHwXin4.s:56: Error: invalid operands for opcode

Interestingly, if -Wno-sync-nand is removed, I see this:

/tmp/linux-atomic.i:7:2: note: ‘__sync_fetch_and_nand’ changed semantics in GCC
4.4
  return __sync_fetch_and_nand (x, y, z);

in addition.  I've attached /tmp/linux-atomic.i as a reduced test case.
>From gcc-bugs-return-458973-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Aug 21 14:53:59 2014
Return-Path: <gcc-bugs-return-458973-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16806 invoked by alias); 21 Aug 2014 14:53:59 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16788 invoked by uid 48); 21 Aug 2014 14:53:55 -0000
From: "dhowells at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/62218] gcc produces invalid SH instruction (stc r2,sr) when building libgcc
Date: Thu, 21 Aug 2014 14:53: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-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dhowells at redhat dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-62218-4-XSu8wAweak@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-62218-4@http.gcc.gnu.org/bugzilla/>
References: <bug-62218-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-08/txt/msg01470.txt.bz2
Content-length: 260

https://gcc.gnu.org/bugzilla/show_bug.cgi?idb218

--- Comment #1 from dhowells at redhat dot com <dhowells at redhat dot com> ---
Created attachment 33375
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3375&actioníit
Assembly output from test case


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

end of thread, other threads:[~2014-09-25 16:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 14:52 [Bug target/62218] New: gcc produces invalid SH instruction (stc r2,sr) when building libgcc dhowells at redhat dot com
2014-08-21 15:09 ` [Bug target/62218] " dhowells at redhat dot com
2014-08-21 15:11 ` dhowells at redhat dot com
2014-08-21 15:23 ` dhowells at redhat dot com
2014-08-21 15:25 ` dhowells at redhat dot com
2014-09-25 14:46 ` nickc at redhat dot com
2014-09-25 15:02 ` nickc at gcc dot gnu.org
2014-09-25 15:24 ` olegendo at gcc dot gnu.org
2014-09-25 15:51 ` olegendo at gcc dot gnu.org
2014-09-25 15:54 ` olegendo at gcc dot gnu.org
2014-09-25 16:01 ` olegendo at gcc dot gnu.org
2014-09-25 16:13 ` 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).