From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37066 invoked by alias); 9 Oct 2015 09:55:25 -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 37057 invoked by uid 89); 9 Oct 2015 09:55:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vk0-f52.google.com Received: from mail-vk0-f52.google.com (HELO mail-vk0-f52.google.com) (209.85.213.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 09 Oct 2015 09:55:23 +0000 Received: by vkgd64 with SMTP id d64so48422632vkg.0 for ; Fri, 09 Oct 2015 02:55:21 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.31.182.11 with SMTP id g11mr8369643vkf.21.1444384521228; Fri, 09 Oct 2015 02:55:21 -0700 (PDT) Received: by 10.103.40.68 with HTTP; Fri, 9 Oct 2015 02:55:21 -0700 (PDT) In-Reply-To: <7794A52CE4D579448B959EED7DD0A4723DD6E9EB@satlexdag06.amd.com> References: <7794A52CE4D579448B959EED7DD0A4723DD6E9EB@satlexdag06.amd.com> Date: Fri, 09 Oct 2015 09:55:00 -0000 Message-ID: Subject: Re: [Patch] [x86_64]: Add bdver4 for multi versioning and fix AMD cpu model detection. From: Uros Bizjak To: "Kumar, Venkataramanan" Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-10/txt/msg00947.txt.bz2 On Fri, Oct 9, 2015 at 11:50 AM, Kumar, Venkataramanan wrote: > Hi Uros, > > Please find below patch that adds bdver4 target for multi versioning. > Also I while computing model, the extended_model is incorrectly left shifted by 4. I have removed it now. > > Is below patch Ok for trunk ? > GCC bootstrap and regressions passed. OK for trunk and release branches, where applicable. IMO, model selection fix should be applied to all release branches. Thanks, Uros. > diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog > index bb3a722..8676747 100644 > --- a/libgcc/ChangeLog > +++ b/libgcc/ChangeLog > @@ -1,3 +1,8 @@ > +2015-10-09 Venkataramanan Kumar > + > + * config/i386/cpuinfo.c (get_amd_cpu): Detect bdver4. > + (__cpu_indicator_init): Fix model selection for AMD CPUs. > + > 2015-10-05 Kirill Yukhin > > * config/i386/cpuinfo.c (get_intel_cpu): Detect "skylake-avx512". > diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c > index 0cbbc85..1313ca3 100644 > --- a/libgcc/config/i386/cpuinfo.c > +++ b/libgcc/config/i386/cpuinfo.c > @@ -169,6 +169,9 @@ get_amd_cpu (unsigned int family, unsigned int model) > /* Bulldozer version 3 "Steamroller" */ > if (model >= 0x30 && model <= 0x4f) > __cpu_model.__cpu_subtype = AMDFAM15H_BDVER3; > + /* Bulldozer version 4 "Excavator" */ > + if (model >= 0x60 && model <= 0x7f) > + __cpu_model.__cpu_subtype = AMDFAM15H_BDVER4; > break; > /* AMD Family 16h "btver2" */ > case 0x16: > @@ -455,7 +458,7 @@ __cpu_indicator_init (void) > if (family == 0x0f) > { > family += extended_family; > - model += (extended_model << 4); > + model += extended_model; > } > > /* Get CPU type. */ > > Regards, > Venkat. > > > > > >