From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 5076968C0 for ; Thu, 20 Mar 2014 18:01:23 +0100 (CET) Received: by mail-wg0-f51.google.com with SMTP id k14so834621wgh.22 for ; Thu, 20 Mar 2014 10:02:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=ChwtByIU5eBMZQvvmoxWrBl11QJ9JMp66KN2fDILAic=; b=YxplwyfKbjbezA5qHrOP+WugJxqW0yWZErBSREjMpHRb8LOFw7dOBCmyWfx/lGjT8i wxCNt8ySAAIX9duAa3ZuTIxM0q4dJj0yAMDlyac/AMBdHP0bUDSO/6q2gSovNg0M6Apj eRMPF4ZpPeT0ZOSlxwQKO0imUeuEsCppsovE5nEfcdt2r0RiV/eK3+rIl7j2nOubw9Ta k3Vy1h3IsMIcJPffkrn1sFNZ2JBbhSZREs+dVH9Gi3umEZcfnjcJFXt/nxsyJUvVGKCp 2E962J8Rd7QZ7/D+vS463xGHMfnk7jEnp03rWf6xDhyfsPlHV/PYKAptGGjSGEwUetiI TPbg== X-Gm-Message-State: ALoCoQlO/xp5Fu6bReLyYMfpPI2qS4uE4pCttEq+Eww9Po9aJlWBJlDB8QUzJra0kG0Mynp8R9it X-Received: by 10.180.182.166 with SMTP id ef6mr11988857wic.29.1395334975120; Thu, 20 Mar 2014 10:02:55 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id fq16sm6479222wjc.3.2014.03.20.10.02.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Mar 2014 10:02:54 -0700 (PDT) From: Thomas Monjalon To: Neil Horman , "H. Peter Anvin" Date: Thu, 20 Mar 2014 18:02:52 +0100 Message-ID: <2288041.gdk3FRcxLX@xps13> Organization: 6WIND User-Agent: KMail/4.12.3 (Linux/3.13.6-1-ARCH; KDE/4.12.3; x86_64; ; ) In-Reply-To: <20140320163921.GC7721@hmsreliant.think-freely.org> References: <1395330830-1310-1-git-send-email-hpa@linux.intel.com> <20140320163921.GC7721@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org, "H. Peter Anvin" Subject: Re: [dpdk-dev] [RFC UNTESTED PATCH] eal_common_cpuflags: Fix %rbx corruption, and simplify the code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2014 17:01:23 -0000 Hi, 20/03/2014 12:39, Neil Horman : > On Thu, Mar 20, 2014 at 08:53:50AM -0700, H. Peter Anvin wrote: > > Neil Horman reported that on x86-64 the upper half of %rbx would get > > clobbered when the code was compiled PIC or PIE, because the > > i386-specific code to preserve %ebx was incorrectly compiled. > > > > However, the code is really way more complex than it needs to be. For > > one thing, the CPUID instruction only needs %eax (leaf) and %ecx > > (subleaf) as parameters, and since we are testing for bits, we might > > as well list the bits explicitly. Furthermore, we can use an array > > rather than doing a switch statement inside a structure. > > > > Reported-by: Neil Horman > > Signed-off-by: H. Peter Anvin > > Acked-by: Neil Horman This is a RFC UNTESTED patch. So should I understand with this acknowledgement that you have tested it? As a shared library? in 32-bit mode? -- Thomas