From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30631 invoked by alias); 21 Feb 2015 22:43:04 -0000 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 Received: (qmail 30583 invoked by uid 48); 21 Feb 2015 22:42:59 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65151] [SH][4.9 Regression] Internal compiler error when trying to build libav 11.2 on sh4 Date: Sat, 21 Feb 2015 23:26: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.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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: 2015-02/txt/msg02404.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 --- Comment #7 from Oleg Endo --- The following fixes the problem: Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (revision 220889) +++ gcc/config/sh/sh.c (working copy) @@ -12049,6 +12049,9 @@ bool sh_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode) { + if (regno == T_REG) + return mode == SImode || mode == HImode || mode == QImode; + if (SPECIAL_REGISTER_P (regno)) return mode == SImode; Index: gcc/config/sh/sh.md =================================================================== --- gcc/config/sh/sh.md (revision 220889) +++ gcc/config/sh/sh.md (working copy) @@ -11224,6 +11224,13 @@ "movt %0" [(set_attr "type" "arith")]) +(define_insn "*movt" + [(set (match_operand:QIHI 0 "arith_reg_dest" "=r") + (match_operand:QIHI 1 "t_reg_operand"))] + "TARGET_SH1" + "movt %0" + [(set_attr "type" "arith")]) + (define_insn "movrt" [(set (match_operand:SI 0 "arith_reg_dest" "=r") (xor:SI (match_operand:SI 1 "t_reg_operand" "") (const_int 1)))] However, I've not tested it for any further side effects.