From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13942 invoked by alias); 7 May 2014 15:52:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 13931 invoked by uid 89); 7 May 2014 15:52:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.89.28.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 May 2014 15:52:24 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id B9993957C7D35; Wed, 7 May 2014 16:52:18 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 7 May 2014 16:52:21 +0100 Received: from LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9]) by LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9%17]) with mapi id 14.03.0174.001; Wed, 7 May 2014 16:52:21 +0100 From: Matthew Fortune To: "'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org)" CC: Richard Sandiford , Rich Fuhler Subject: [PATCH] copyprop_hardreg_forward needs to check HARD_REGNO_CALL_PART_CLOBBERED Date: Wed, 07 May 2014 15:52:00 -0000 Message-ID: <6D39441BF12EF246A7ABCE6654B02353523563@LEMAIL01.le.imgtec.org> Content-Type: multipart/mixed; boundary="_002_6D39441BF12EF246A7ABCE6654B02353523563LEMAIL01leimgteco_" MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00408.txt.bz2 --_002_6D39441BF12EF246A7ABCE6654B02353523563LEMAIL01leimgteco_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-length: 848 The MIPS O32 FPXX ABI exposes a bug in regcprop where call part clobbered information is not checked when calculating clobbered registers. This is only one of many places that=20 regs_invalidated_by_call is used without also checking=20 HARD_REGNO_CALL_PART_CLOBBERED. This patch ensures that a part=20 clobbered register is treated as if fully clobbered. Other places where this same issue occurs are not so easily fixed as they do not always have mode information available when calculating clobbered registers. A solution to the larger problem will be significantly more involved. Exposed in a testcase as part of: http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00401.html Regards, Matthew 2014-05-07 Matthew Fortune gcc/ * regcprop.c (copyprop_hardreg_forward_1): Account for HARD_REGNO_CALL_PART_CLOBBERED. --_002_6D39441BF12EF246A7ABCE6654B02353523563LEMAIL01leimgteco_ Content-Type: application/octet-stream; name="0001-copyprop-part-clobbered.patch" Content-Description: 0001-copyprop-part-clobbered.patch Content-Disposition: attachment; filename="0001-copyprop-part-clobbered.patch"; size=1328; creation-date="Wed, 07 May 2014 15:39:13 GMT"; modification-date="Wed, 07 May 2014 14:58:02 GMT" Content-Transfer-Encoding: base64 Content-length: 1802 RnJvbSA0ODQ5MjExYzA4M2UyZWU2ZmM5OGFjNDA2OTk4M2Y5ODUzNzI0ZDA0 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBtZm9ydHVuZSA8bWF0 dGhldy5mb3J0dW5lQGltZ3RlYy5jb20+CkRhdGU6IFdlZCwgMiBBcHIgMjAx NCAyMTo1NTowNSArMDEwMApTdWJqZWN0OiBbUEFUQ0ggMi8yXSBVc2UgcGFy dCBjbG9iYmVyZWQgaW5mb3JtYXRpb24gd2hlbiBjYWxjdWxhdGluZyBjbG9i YmVyZWQgcmVncwoKLS0tCiBnY2MvcmVnY3Byb3AuYyB8ICAgIDcgKysrKy0t LQogMSBmaWxlcyBjaGFuZ2Vk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