From patchwork Mon May 21 17:16:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 27360 Received: (qmail 23326 invoked by alias); 21 May 2018 17:16:21 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 23316 invoked by uid 89); 21 May 2018 17:16:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM autolearn=ham version=3.3.2 spammy=Initial X-HELO: mga17.intel.com X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 Date: Mon, 21 May 2018 10:16:17 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] Initial Fast Short REP MOVSB (FSRM) support Message-ID: <20180521171617.GA6568@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.5 (2018-04-13) The newer Intel processors support Fast Short REP MOVSB which has a feature bit in CPUID. This patch adds the Fast Short REP MOVSB (FSRM) bit to x86 cpu-features. I will check it in shortly. H.J. --- * sysdeps/x86/cpu-features.h (bit_cpu_FSRM): New. (index_cpu_FSRM): Likewise. (reg_FSRM): Likewise. --- sysdeps/x86/cpu-features.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/x86/cpu-features.h b/sysdeps/x86/cpu-features.h index c60c2e4eeb..2088bd73ee 100644 --- a/sysdeps/x86/cpu-features.h +++ b/sysdeps/x86/cpu-features.h @@ -76,6 +76,7 @@ #define bit_cpu_AVX512VL (1u << 31) #define bit_cpu_IBT (1u << 20) #define bit_cpu_SHSTK (1u << 7) +#define bit_cpu_FSRM (1 << 4) /* XCR0 Feature flags. */ #define bit_XMM_state (1 << 1) @@ -207,6 +208,7 @@ extern const struct cpu_features *__get_cpu_features (void) # define index_cpu_POPCNT COMMON_CPUID_INDEX_1 # define index_cpu_IBT COMMON_CPUID_INDEX_7 # define index_cpu_SHSTK COMMON_CPUID_INDEX_7 +# define index_cpu_FSRM COMMON_CPUID_INDEX_7 # define reg_CX8 edx # define reg_CMOV edx @@ -238,6 +240,7 @@ extern const struct cpu_features *__get_cpu_features (void) # define reg_POPCNT ecx # define reg_IBT edx # define reg_SHSTK ecx +# define reg_FSRM edx # define index_arch_Fast_Rep_String FEATURE_INDEX_1 # define index_arch_Fast_Copy_Backward FEATURE_INDEX_1