From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28513 invoked by alias); 31 Jul 2014 11:28:20 -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 28499 invoked by uid 89); 31 Jul 2014 11:28:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Received: from mail-bn1blp0181.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (207.46.163.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 31 Jul 2014 11:28:17 +0000 Received: from BLUPR02CA039.namprd02.prod.outlook.com (25.160.23.157) by BN1PR02MB040.namprd02.prod.outlook.com (10.242.210.155) with Microsoft SMTP Server (TLS) id 15.0.995.14; Thu, 31 Jul 2014 11:28:13 +0000 Received: from BY2FFO11FD045.protection.gbl (2a01:111:f400:7c0c::127) by BLUPR02CA039.outlook.office365.com (2a01:111:e400:8ad::29) with Microsoft SMTP Server (TLS) id 15.0.995.14 via Frontend Transport; Thu, 31 Jul 2014 11:28:13 +0000 Received: from atltwp01.amd.com (165.204.84.221) by BY2FFO11FD045.mail.protection.outlook.com (10.1.15.177) with Microsoft SMTP Server id 15.0.990.10 via Frontend Transport; Thu, 31 Jul 2014 11:28:12 +0000 X-M-MSG: Received: from satlvexedge01.amd.com (satlvexedge01.amd.com [10.177.96.28]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2CAA9CAE659; Thu, 31 Jul 2014 06:28:10 -0500 (CDT) Received: from SATLEXDAG04.amd.com (10.181.40.9) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.2.328.9; Thu, 31 Jul 2014 06:28:35 -0500 Received: from SATLEXDAG02.amd.com ([fe80::9be:3efa:c185:761d]) by satlexdag04.amd.com ([fe80::75a7:6e1c:3fca:9723%23]) with mapi id 14.02.0328.009; Thu, 31 Jul 2014 07:28:10 -0400 From: "Gopalasubramanian, Ganesh" To: "gcc-patches@gcc.gnu.org" CC: "Uros Bizjak (ubizjak@gmail.com)" Subject: [PATCH, i386] Handle extended family cpuid info for AMD Date: Thu, 31 Jul 2014 11:37:00 -0000 Message-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221;CTRY:US;IPV:NLI;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(6009001)(428002)(377424004)(189002)(54534003)(199002)(83322001)(92726001)(87936001)(2656002)(85852003)(23726002)(46406003)(86362001)(105586002)(106466001)(101416001)(53416004)(74662001)(50986999)(85306003)(92566001)(19580395003)(107046002)(33656002)(54356999)(19580405001)(44976005)(95666004)(55846006)(77096002)(2351001)(4396001)(31966008)(76482001)(97736001)(97756001)(50466002)(77982001)(84676001)(20776003)(46102001)(83072002)(81542001)(47776003)(74502001)(21056001)(68736004)(229853001)(575784001)(79102001)(80022001)(81342001)(64706001)(110136001);DIR:OUT;SFP:;SCL:1;SRVR:BN1PR02MB040;H:atltwp01.amd.com;FPR:;MLV:sfv;PTR:InfoDomainNonexistent;MX:1;LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 0289B6431E Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=Ganesh.Gopalasubramanian@amd.com; X-OriginatorOrg: amd4.onmicrosoft.com X-SW-Source: 2014-07/txt/msg02187.txt.bz2 Hi, The below patch handles the AMD's cpuid family information. With the information from cpuid, BTVER2 cpu for -march=3Dnative flag is han= dled. Bootstrap passes. Is it OK for trunk and branches? Regards Ganesh=20 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6223bd6..3f8bb2c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-07-31 Ganesh Gopalasubramanian + + * tree-sra.c (host_detect_local_cpu): Handle AMD's extended family + information. Handle BTVER2 cpu with cpuid family value.=20=20 + 2014-07-30 Martin Jambor =20 * tree-sra.c (sra_ipa_modify_assign): Change type of the first diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 1c6385f..21ae1f3 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -432,7 +432,8 @@ const char *host_detect_local_cpu (int argc, const char= **argv) =20 model =3D (eax >> 4) & 0x0f; family =3D (eax >> 8) & 0x0f; - if (vendor =3D=3D signature_INTEL_ebx) + if ((vendor =3D=3D signature_INTEL_ebx) || + (vendor =3D=3D signature_AMD_ebx)) { unsigned int extended_model, extended_family; =20 @@ -576,7 +577,7 @@ const char *host_detect_local_cpu (int argc, const char= **argv) =20 if (name =3D=3D signature_NSC_ebx) processor =3D PROCESSOR_GEODE; - else if (has_movbe) + else if (has_movbe && family =3D=3D 22) processor =3D PROCESSOR_BTVER2; else if (has_avx2) processor =3D PROCESSOR_BDVER4;