From patchwork Thu Oct 29 13:16:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kumar, Venkataramanan" X-Patchwork-Id: 537837 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 7A891140D5F for ; Fri, 30 Oct 2015 00:16:37 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=F4fP10Qw; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type:mime-version; q=dns; s= default; b=uSmlqfk7rJdln39QqBcJd6iwor5EpaTxCvTvUJIMyogobzJuPxE2F Wyndw/usu0w1N5cC4OtUTfPAwK9Gr7hU1Yh3wsKWgBs7Rxr2lcW4HsBd74KyzQxd QqxY+h1QZuHQV80JHkDjGzC9gz1rruDm3rvxfIu5DFM3LsqG1MR2vg= 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 :to:subject:date:message-id:content-type:mime-version; s= default; bh=sg9k0b1ORfMXWIhA9kZk3McH17I=; b=F4fP10QwqXgLypUXkvmc XlrDdVpfeXehR6u4X5cg0MTfBFvBloS1eUSeDQx/9rc4zJ0OGMIYbkitIrcnxv0g 2pZRGZcAUTs49Wh+Kf7nIGD4gvzcyK30YnTLBElox/NtdwbbfEY9yQSsG5B2Be2x CIqg40UdyhzFLOoIwBvnT48= Received: (qmail 77443 invoked by alias); 29 Oct 2015 13:16:31 -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 77433 invoked by uid 89); 29 Oct 2015 13:16:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.8 required=5.0 tests=BAYES_50, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Received: from mail-bn1on0065.outbound.protection.outlook.com (HELO na01-bn1-obe.outbound.protection.outlook.com) (157.56.110.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Thu, 29 Oct 2015 13:16:29 +0000 Received: from CY1PR1201MB1098.namprd12.prod.outlook.com (10.169.19.14) by CY1PR1201MB1097.namprd12.prod.outlook.com (10.169.19.13) with Microsoft SMTP Server (TLS) id 15.1.312.18; Thu, 29 Oct 2015 13:16:26 +0000 Received: from CY1PR1201MB1098.namprd12.prod.outlook.com ([10.169.19.14]) by CY1PR1201MB1098.namprd12.prod.outlook.com ([10.169.19.14]) with mapi id 15.01.0312.014; Thu, 29 Oct 2015 13:16:26 +0000 From: "Kumar, Venkataramanan" To: "Uros Bizjak (ubizjak@gmail.com)" , "gcc-patches@gcc.gnu.org" Subject: [Patch] [x86_64] libgcc changes to add znver1 Date: Thu, 29 Oct 2015 13:16:25 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Venkataramanan.Kumar@amd.com; x-microsoft-exchange-diagnostics: 1; CY1PR1201MB1097; 5:N8XA6lMpbqD3ihFcnd73/Oj1qe2Ytb8/q7LLGXO0LxtE5bgVWLr8e52a9TR78s/6lBhGKR97XT/4kSvftSjRMoHggWZzCLpMvh/XEII6KJS7cQuYGZH1KF6js3BVCrz97tl1c6A7xNe6xUqUp8VLbw==; 24:Dj5Okxi+OWDm4cC6lXGnQOJKJULwdzQwAdeq07ge9WhDetOJJ1aFHlBxl1b3KMGEEQN1rGRUoc2iZOTpH0zPe/iv/CiiveKxSIdFhZp2r+M=; 20:l5i8Gs6NV+sb49KPZrB2+oBmOt5nDkUViE0Xeai2++gdXVCXhQepmZ7Xvbc9lhMJHcqhm3aUVeRmkb0Xqufvioqxc+YCjQT69yLUlG7BUoKv/kQ2leB8Q4Emp4AP18e3hwa6jPYMnB0YGckvptM63VcnLUBTSp4wDeJUfFJWFskhexznwLtds97ZiZ0oE0jALbLMYePWvAPqHU0CFpZ30rwir2HVGkYN1bOKYXigLjEAkvecXoHMSmid0gUZmUpU x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR1201MB1097; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001)(102215026); SRVR:CY1PR1201MB1097; BCL:0; PCL:0; RULEID:; SRVR:CY1PR1201MB1097; x-forefront-prvs: 0744CFB5E8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(54534003)(377424004)(189002)(199003)(5002640100001)(5001960100002)(33656002)(107886002)(54356999)(50986999)(92566002)(87936001)(99286002)(189998001)(101416001)(106356001)(105586002)(229853001)(40100003)(122556002)(86362001)(5007970100001)(66066001)(15975445007)(19580395003)(99936001)(4001150100001)(102836002)(5001920100001)(2900100001)(5001770100001)(77096005)(19580405001)(5004730100002)(81156007)(97736004)(2501003)(11100500001)(5003600100002)(76576001)(74316001)(10400500002)(5008740100001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR1201MB1097; H:CY1PR1201MB1098.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2015 13:16:25.6382 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR1201MB1097 X-IsSubscribed: yes Hi Uros, As per your comments in https://gcc.gnu.org/ml/gcc-patches/2015-09/msg02326.html please find the patch that also adds changes to libgcc. It was bootstrapped and regressed tested on x86_64. Ok for trunk? Change logs gcc/ChangeLog 2015-10-29 Venkataramanan Kumar * config/i386/i386.c (get_builtin_code_for_version): Set priority for PROCESSOR_ZNVER1. (enum processor_model): Add M_AMDFAM17H_znver1. (struct arch_names_table): Likewise. * doc/extend.texi: ADD znver1. libgcc/ChangeLog 2015-10-12 Venkataramanan kumar * config/i386/cpuinfo.c (enum processor_types): Add AMDFAM17H. (processor_subtypes): Add znver1. (get_amd_cpu): Detect znver1. Regards, Venkat. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 82fd054..a52b313 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -35898,6 +35898,10 @@ get_builtin_code_for_version (tree decl, tree *predicate_list) arg_str = "bdver4"; priority = P_PROC_AVX2; break; + case PROCESSOR_ZNVER1: + arg_str = "znver1"; + priority = P_PROC_AVX2; + break; } } @@ -36808,6 +36812,7 @@ fold_builtin_cpu (tree fndecl, tree *args) M_AMDFAM15H_BDVER2, M_AMDFAM15H_BDVER3, M_AMDFAM15H_BDVER4, + M_AMDFAM17H_ZNVER1, M_INTEL_COREI7_IVYBRIDGE, M_INTEL_COREI7_HASWELL, M_INTEL_COREI7_BROADWELL, @@ -36850,6 +36855,7 @@ fold_builtin_cpu (tree fndecl, tree *args) {"bdver3", M_AMDFAM15H_BDVER3}, {"bdver4", M_AMDFAM15H_BDVER4}, {"btver2", M_AMD_BTVER2}, + {"znver1", M_AMDFAM17H_ZNVER1}, }; static struct _isa_names_table diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index fdb1547..7a05c27 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -16995,6 +16995,9 @@ AMD Family 15h Bulldozer version 4. @item btver2 AMD Family 16h CPU. + +@item znver1 +AMD Family 17h CPU. @end table Here is an example: diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c index 1313ca3..b0ebfcf 100644 --- a/libgcc/config/i386/cpuinfo.c +++ b/libgcc/config/i386/cpuinfo.c @@ -59,6 +59,7 @@ enum processor_types INTEL_KNL, AMD_BTVER1, AMD_BTVER2, + AMDFAM17H, CPU_TYPE_MAX }; @@ -74,6 +75,7 @@ enum processor_subtypes AMDFAM15H_BDVER2, AMDFAM15H_BDVER3, AMDFAM15H_BDVER4, + AMDFAM17H_ZNVER1, INTEL_COREI7_IVYBRIDGE, INTEL_COREI7_HASWELL, INTEL_COREI7_BROADWELL, @@ -177,6 +179,12 @@ get_amd_cpu (unsigned int family, unsigned int model) case 0x16: __cpu_model.__cpu_type = AMD_BTVER2; break; + case 0x17: + __cpu_model.__cpu_type = AMDFAM17H; + /* AMD family 17h version 1. */ + if (model <= 0x1f) + __cpu_model.__cpu_subtype = AMDFAM17H_ZNVER1; + break; default: break; }