From patchwork Sat Oct 13 09:33:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chung-Lin Tang X-Patchwork-Id: 191289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 83C412C0090 for ; Sat, 13 Oct 2012 20:33:43 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1350725624; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC: Subject:References:In-Reply-To:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=KT7QcNrJiVHKX/gO1ChxdgcTj+o=; b=U13Qkcc09N9Ak8tUeCDDYM8O2wCECWSr7/P86amAKp5W91CFpd94mJ8jsK7Uv2 XeXo7pSX6X9FkX9FzhNNff7u0Ir85qDQl5+KSYfcVNYcX6f13aE/a06Vfd0gTnLK jR4UIvZYsw2jTK15tg/rTu42rEw3s3b+G6Y/aE+6uZark= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=CGtxx+HqaF5neKS29qDsVNabx5HUaCC2xF7rcr7nBSl3lJyjVlP4EaaBb+AG/6 RwxzE8ZG3966jY/1PebS7FalRsibxa+xLVeJPskazzcUrSx5Hx5N6kNL7N0tleH0 pFm9FJlQ7Tbv2lO8eLo+tO2anxVf64cJg1yFmQ2St3d3A=; Received: (qmail 25559 invoked by alias); 13 Oct 2012 09:33:41 -0000 Received: (qmail 25551 invoked by uid 22791); 13 Oct 2012 09:33:40 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Oct 2012 09:33:33 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TMy60-0006Pr-4X from ChungLin_Tang@mentor.com ; Sat, 13 Oct 2012 02:33:24 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 13 Oct 2012 02:33:23 -0700 Received: from [0.0.0.0] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Sat, 13 Oct 2012 02:33:23 -0700 Message-ID: <50793561.1000203@codesourcery.com> Date: Sat, 13 Oct 2012 17:33:21 +0800 From: Chung-Lin Tang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Oleg Endo CC: gcc-patches , Richard Henderson , Richard Sandiford , Ramana Radhakrishnan , Sterling Augustine , Andreas Krebbel Subject: Re: [PATCH 0/6] Thread pointer built-in functions / [SH] PR 54760 References: <4FFE740D.7060005@codesourcery.com> <5076E1BD.1090209@codesourcery.com> <1349996110.8747.44.camel@yam-132-YW-E178-FTW> In-Reply-To: <1349996110.8747.44.camel@yam-132-YW-E178-FTW> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 2012/10/12 06:55 AM, Oleg Endo wrote: > This broke the recently added thread pointer built-ins on SH, but I was > prepared for that, so no problem here. The attached patch is a straight > forward fix. > > However, with the patch applied I get an ICE on one of the SH thread > pointer tests: gcc/testsuite/gcc.target/sh/pr54760-3.c, function > test04: > > internal compiler error: in expand_insn, at optabs.c:8208 > __builtin_set_thread_pointer (xx[i]); Looks like I was supposed to use create_input_operand() there instead. I've committed the attached patch as obvious. This should be fixed now. Thanks, Chung-Lin * builtins.c (expand_builtin_set_thread_pointer): Use create_input_operand() instead of create_fixed_operand(). Index: builtins.c =================================================================== --- builtins.c (revision 192421) +++ builtins.c (revision 192422) @@ -5776,7 +5776,7 @@ struct expand_operand op; rtx val = expand_expr (CALL_EXPR_ARG (exp, 0), NULL_RTX, Pmode, EXPAND_NORMAL); - create_fixed_operand (&op, val); + create_input_operand (&op, val, Pmode); expand_insn (icode, 1, &op); return; }