From patchwork Mon Oct 27 22:23:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 403998 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E7FEA140082 for ; Tue, 28 Oct 2014 09:24:04 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=oXU8f E3v6POPdmyy1FGIh5+6aMzdT8+8qbdtjy+m6hP82/NaJN+dVN75erTsympd1yy92 qMDBitC9S28XpTXuEZMKIJe4cg+RH/FWMnHhn4E9rLrTIg0UoGnSClkDN2W3JrqM 2L3c/rn8HaF8+jxCtvYevahLecY5cc5XhcrDw4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=UAYa+/RJWnj QVbXl7mhlmUiIn70=; b=IB1FZxn0JL5gV1euNn1Hq+vkf1b9MPg4WA1unkrkOcq FMeUwDRjIpaV7euo0JX2d688VBspmTbhpnAWrZQU6XiGI1tFnrxza4DS0AuW62+m kYUBwfvFj7WGQXCHM2VmKRvwpXoC0YBWhhk0G4+fmvkrI2H9pPY3J60r9ypi+kZ0 = Received: (qmail 22797 invoked by alias); 27 Oct 2014 22:23:58 -0000 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 Received: (qmail 22788 invoked by uid 89); 27 Oct 2014 22:23:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 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.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 27 Oct 2014 22:23:54 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 59E412347A6F; Mon, 27 Oct 2014 22:23:47 +0000 (GMT) Received: from KLMAIL02.kl.imgtec.org (10.40.60.222) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 27 Oct 2014 22:23:51 +0000 Received: from hhmail02.hh.imgtec.org (10.100.10.20) by klmail02.kl.imgtec.org (10.40.60.222) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 27 Oct 2014 22:23:50 +0000 Received: from BAMAIL02.ba.imgtec.org (10.20.40.28) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 27 Oct 2014 22:23:50 +0000 Received: from ubuntu-sellcey.mips.com (192.168.65.53) by bamail02.ba.imgtec.org (10.20.40.28) with Microsoft SMTP Server id 14.3.174.1; Mon, 27 Oct 2014 15:23:46 -0700 Received: by ubuntu-sellcey.mips.com (sSMTP sendmail emulation); Mon, 27 Oct 2014 15:23:45 -0700 From: "Steve Ellcey " Date: Mon, 27 Oct 2014 15:23:45 -0700 To: , , Subject: [Patch] Add MIPS flag to avoid use of ldc1/sdc1/ldxc1/sdxc1 User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: <4f0faaab-5dd4-40c8-b66d-feb9bb515c0d@BAMAIL02.ba.imgtec.org> There are some MIPS patches that have been applied to the Google Android GCC tree but not been submitted to FSF GCC. I would like to get those patches checked in if possible. The first one is to add a new MIPS flag to turn off the use of ldc1/sdc1/ldxc1/sdxc1. Google Earth has a custom allocator that does not guarantee 8 byte alignment of the allocated memory, therefore using these instructions (that require 8 byte alignment) could cause runtime failures. By default, these instructions will continue to be used, the flag is there to allow their use to be turned off if desired. Tested on mips-mti-linux-gnu. OK to checkin? Steve Ellcey sellcey@imgtec.com 2014-10-27 Steve Ellcey * config/mips/mips.h (ISA_HAS_LDC1_SDC1): Check TARGET_LDC1_SDC1. * config/mips/mips.md (*__mode == SFmode || TARGET_LDC1_SDC1)" "\t%0,%1(%2)" [(set_attr "type" "fpidxload") (set_attr "mode" "")]) @@ -4582,7 +4582,7 @@ [(set (mem:ANYF (plus:P (match_operand:P 1 "register_operand" "d") (match_operand:P 2 "register_operand" "d"))) (match_operand:ANYF 0 "register_operand" "f"))] - "ISA_HAS_LXC1_SXC1" + "ISA_HAS_LXC1_SXC1 && (mode == SFmode || TARGET_LDC1_SDC1)" "\t%0,%1(%2)" [(set_attr "type" "fpidxstore") (set_attr "mode" "")]) diff --git a/gcc/config/mips/mips.opt b/gcc/config/mips/mips.opt index dca4f80..7b75fc9 100644 --- a/gcc/config/mips/mips.opt +++ b/gcc/config/mips/mips.opt @@ -267,6 +267,10 @@ mips3d Target Report RejectNegative Var(TARGET_MIPS3D) Use MIPS-3D instructions +mldc1-sdc1 +Target Report Var(TARGET_LDC1_SDC1) Init(1) +Use ldc1/ldxc1 and sdc1/sdxc1 instruction + mllsc Target Report Mask(LLSC) Use ll, sc and sync instructions