From patchwork Wed May 9 10:26:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gopalasubramanian, Ganesh" X-Patchwork-Id: 157894 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 7B760B6FA5 for ; Wed, 9 May 2012 20:26:46 +1000 (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=1337164007; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:Received:Received:From:To: Subject:Date:Message-ID:Content-Type:Content-Transfer-Encoding: MIME-Version:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=MRMP640 ZFfjoahcsaeoBhZVWjfs=; b=YFbL1wxj0kVAh48usPLwrACaBEkQeycdLIMQPK4 lXxstNi8w+CkkTNOBrsjPjBQ3+SiBV0LuPW0JTHQjF0a3lxNLjm6Il0wdAz7MOOf tAZPaT1YrahqA11C10IaSKseUCSzUCi8ceD3WpgJ3OPJxTUaOXVxvkakm4FhCaJQ wSFQ= 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:X-SpamScore:X-BigFish:X-Forefront-Antispam-Report:Received:Received:Received:X-M-MSG:Received:Received:Received:From:To:Subject:Date:Message-ID:Content-Type:Content-Transfer-Encoding:MIME-Version:X-OriginatorOrg:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=WKWMH+TmDoO2n5y5yi1aiIRr89wUrxoxniBRYqu15HIsUwaSnhHJUjSDVm58eW V9cdxnuxds5lze1hDI07MQ96Jaf2WiZ23GFrLiZQF1ju846ttcmYo5ddRo6EatN9 gxghFFUEVOrJ9TdTf+55wL2V7rERxF4Rt5Mgg3fib3gy8=; Received: (qmail 28324 invoked by alias); 9 May 2012 10:26:42 -0000 Received: (qmail 28315 invoked by uid 22791); 9 May 2012 10:26:41 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RCVD_IN_HOSTKARMA_YE, TW_LZ, TW_TB, TW_ZC X-Spam-Check-By: sourceware.org Received: from ch1ehsobe003.messaging.microsoft.com (HELO ch1outboundpool.messaging.microsoft.com) (216.32.181.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 May 2012 10:26:26 +0000 Received: from mail55-ch1-R.bigfish.com (10.43.68.243) by CH1EHSOBE011.bigfish.com (10.43.70.61) with Microsoft SMTP Server id 14.1.225.23; Wed, 9 May 2012 10:26:10 +0000 Received: from mail55-ch1 (localhost [127.0.0.1]) by mail55-ch1-R.bigfish.com (Postfix) with ESMTP id F1D593A0772 for ; Wed, 9 May 2012 10:26:24 +0000 (UTC) X-SpamScore: 0 X-BigFish: VPS0(zzzz1202hzzz2dh668h839h944hd25h) X-Forefront-Antispam-Report: CIP:163.181.249.109; KIP:(null); UIP:(null); IPV:NLI; H:ausb3twp02.amd.com; RD:none; EFVD:NLI Received: from mail55-ch1 (localhost.localdomain [127.0.0.1]) by mail55-ch1 (MessageSwitch) id 1336559183280074_28629; Wed, 9 May 2012 10:26:23 +0000 (UTC) Received: from CH1EHSMHS030.bigfish.com (snatpool3.int.messaging.microsoft.com [10.43.68.228]) by mail55-ch1.bigfish.com (Postfix) with ESMTP id 3FCA31A015A for ; Wed, 9 May 2012 10:26:23 +0000 (UTC) Received: from ausb3twp02.amd.com (163.181.249.109) by CH1EHSMHS030.bigfish.com (10.43.70.30) with Microsoft SMTP Server id 14.1.225.23; Wed, 9 May 2012 10:26:22 +0000 X-M-MSG: Received: from sausexedgep02.amd.com (sausexedgep02-ext.amd.com [163.181.249.73]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Axway MailGate 3.8.1) with ESMTP id 25933C8004 for ; Wed, 9 May 2012 05:26:17 -0500 (CDT) Received: from SAUSEXDAG01.amd.com (163.181.55.1) by sausexedgep02.amd.com (163.181.36.59) with Microsoft SMTP Server (TLS) id 8.3.192.1; Wed, 9 May 2012 05:26:31 -0500 Received: from SAUSEXDAG04.amd.com ([fe80::9143:6575:e649:e862]) by sausexdag01.amd.com ([fe80::3103:1d40:fa1c:a1d1%22]) with mapi id 14.01.0323.003; Wed, 9 May 2012 05:26:20 -0500 From: "Gopalasubramanian, Ganesh" To: "gcc-patches@gcc.gnu.org" Subject: Backport: fma3 instruction generation for 'march=native' in AMD processors Date: Wed, 9 May 2012 10:26:19 +0000 Message-ID: MIME-Version: 1.0 X-OriginatorOrg: amd.com 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 Hello, Below is the patch that has been committed in trunk (Revision: 187075). We like to backport it to GCC 4.7 branch as couple of AMD processors require this change for fma3 instruction generation. Bootstrapping and testing are successful. Is it OK to commit in GCC 4.7 branch? Regards Ganesh PATCH ===== * config/i386/driver-i386.c (host_detect_local_cpu): Reset has_fma4 for AMD processors with both fma3 and fma4 support. Index: config/i386/driver-i386.c =================================================================== --- config/i386/driver-i386.c (revision 186897) +++ config/i386/driver-i386.c (working copy) @@ -472,6 +472,8 @@ has_abm = ecx & bit_ABM; has_lwp = ecx & bit_LWP; has_fma4 = ecx & bit_FMA4; + if (vendor == SIG_AMD && has_fma4 && has_fma) + has_fma4 = 0; has_xop = ecx & bit_XOP; has_tbm = ecx & bit_TBM; has_lzcnt = ecx & bit_LZCNT;