From patchwork Mon Aug 13 09:29:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gopalasubramanian, Ganesh" X-Patchwork-Id: 176889 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 E69222C007B for ; Mon, 13 Aug 2012 19:30:14 +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=1345455015; 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=1BY+mF6 5kfCcHBWJ3kLzVMFRcc8=; b=JynQzsjHSDzyGjHyDL8tabFK4/uUGPOQClvaGwq nEBVNOcQ9EOWAQFRtWoEvesAwkjPeVF4VF2x8GUhTwoCJLG6Ppx/A9eA6fI9+ZMu r3pqG4qQzqZIzRLWfMYe8kaqWqi0XkMyA/+bGVU2dD3wAoKmZzVP1Vfs5wXn52+v 7cMg= 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-Forefront-Antispam-Report:X-SpamScore:X-BigFish: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=KxswIHXa840XqnGh2rWLHiee5togQfcDKcw7Mou7bd9dQUyc223+4oJ0MKYHHi McnP4ZCwkdEt41iPSU20HzuF9pqEzDKrRbPeDEC7fKAPKsQOkxw1IGGddFwAR7dK P+jHOJwu7dxRUWj2Fv7+7der5tuDsaTrIkSXgQbhk48cU=; Received: (qmail 10274 invoked by alias); 13 Aug 2012 09:30:06 -0000 Received: (qmail 10253 invoked by uid 22791); 13 Aug 2012 09:30:05 -0000 X-SWARE-Spam-Status: No, hits=-3.9 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_EB, TW_FS X-Spam-Check-By: sourceware.org Received: from co1ehsobe002.messaging.microsoft.com (HELO co1outboundpool.messaging.microsoft.com) (216.32.180.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Aug 2012 09:29:51 +0000 Received: from mail181-co1-R.bigfish.com (10.243.78.237) by CO1EHSOBE004.bigfish.com (10.243.66.67) with Microsoft SMTP Server id 14.1.225.23; Mon, 13 Aug 2012 09:29:50 +0000 Received: from mail181-co1 (localhost [127.0.0.1]) by mail181-co1-R.bigfish.com (Postfix) with ESMTP id 03998C04F4 for ; Mon, 13 Aug 2012 09:29:50 +0000 (UTC) X-Forefront-Antispam-Report: CIP:163.181.249.108; KIP:(null); UIP:(null); IPV:NLI; H:ausb3twp01.amd.com; RD:none; EFVD:NLI X-SpamScore: 2 X-BigFish: VPS2(z37d5kz936eIzz1202hzz8275bhz2dh668h839h944hd25hf0ah107ah) Received: from mail181-co1 (localhost.localdomain [127.0.0.1]) by mail181-co1 (MessageSwitch) id 1344850188678206_14689; Mon, 13 Aug 2012 09:29:48 +0000 (UTC) Received: from CO1EHSMHS028.bigfish.com (unknown [10.243.78.242]) by mail181-co1.bigfish.com (Postfix) with ESMTP id A3BA9800044 for ; Mon, 13 Aug 2012 09:29:48 +0000 (UTC) Received: from ausb3twp01.amd.com (163.181.249.108) by CO1EHSMHS028.bigfish.com (10.243.66.38) with Microsoft SMTP Server id 14.1.225.23; Mon, 13 Aug 2012 09:29:48 +0000 X-M-MSG: Received: from sausexedgep01.amd.com (sausexedgep01-ext.amd.com [163.181.249.72]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp01.amd.com (Axway MailGate 3.8.1) with ESMTP id 29CA01028007 for ; Mon, 13 Aug 2012 04:29:46 -0500 (CDT) Received: from SAUSEXDAG05.amd.com (163.181.55.6) by sausexedgep01.amd.com (163.181.36.54) with Microsoft SMTP Server (TLS) id 8.3.192.1; Mon, 13 Aug 2012 04:30:16 -0500 Received: from SAUSEXDAG04.amd.com ([fe80::9143:6575:e649:e862]) by sausexdag05.amd.com ([fe80::94d8:2d17:10c5:6039%20]) with mapi id 14.01.0323.003; Mon, 13 Aug 2012 04:29:46 -0500 From: "Gopalasubramanian, Ganesh" To: "gcc-patches@gcc.gnu.org" Subject: [PATCH,i386] cpuid function for prefetchw Date: Mon, 13 Aug 2012 09:29:45 +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, To get the prefetchw cpuid flag, cpuid function 0x80000001 needs to be called. Previous to patch, function 0x7 is called. Bootstrapping and "make -k check" passes without failures. Ok for trunk? Regards Ganesh 2012-08-13 Ganesh Gopalasubramanian PR driver/54210 * config/i386/driver-i386.c (host_detect_local_cpu): Call cpuid function 0x80000001 to get the prfchw cpuid flag. has_longmode = edx & bit_LM; has_3dnowp = edx & bit_3DNOWP; has_3dnow = edx & bit_3DNOW; + has_prfchw = ecx & bit_PRFCHW; } if (!arch Index: gcc/config/i386/driver-i386.c =================================================================== --- gcc/config/i386/driver-i386.c (revision 189996) +++ gcc/config/i386/driver-i386.c (working copy) @@ -467,7 +467,6 @@ has_bmi2 = ebx & bit_BMI2; has_fsgsbase = ebx & bit_FSGSBASE; has_rdseed = ebx & bit_RDSEED; - has_prfchw = ecx & bit_PRFCHW; } /* Check cpuid level of extended features. */ @@ -491,6 +490,7 @@