public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Initial Enhanced REP MOVSB/STOSB (ERMS) support
@ 2016-03-28 20:48 H.J. Lu
  2016-03-28 21:57 ` Roland McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2016-03-28 20:48 UTC (permalink / raw)
  To: GNU C Library

The newer Intel processors support Enhanced REP MOVSB/STOSB (ERMS) which
has a feature bit in CPUID.  This patch adds the Enhanced REP MOVSB/STOSB
(ERMS) bit to x86 cpu-features.

I will use this in followup patches to optimize memcpy/memset with ERMS.

Any comments?


H.J.
	* sysdeps/x86/cpu-features.h (bit_cpu_ERMS): New.
	(index_cpu_ERMS): Likewise.
	(reg_ERMS): Likewise.
---
 sysdeps/x86/cpu-features.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sysdeps/x86/cpu-features.h b/sysdeps/x86/cpu-features.h
index bfe1f4c..8f946c4 100644
--- a/sysdeps/x86/cpu-features.h
+++ b/sysdeps/x86/cpu-features.h
@@ -53,6 +53,7 @@
 #define bit_cpu_FMA4		(1 << 16)
 
 /* COMMON_CPUID_INDEX_7.  */
+#define bit_cpu_ERMS		(1 << 9)
 #define bit_cpu_RTM		(1 << 11)
 #define bit_cpu_AVX2		(1 << 5)
 #define bit_cpu_AVX512F		(1 << 16)
@@ -84,6 +85,7 @@
 # define index_cpu_SSE4_2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
 # define index_cpu_AVX	COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
 # define index_cpu_AVX2	COMMON_CPUID_INDEX_7*CPUID_SIZE+CPUID_EBX_OFFSET
+# define index_cpu_ERMS	COMMON_CPUID_INDEX_7*CPUID_SIZE+CPUID_EBX_OFFSET
 
 # define index_arch_Fast_Rep_String	FEATURE_INDEX_1*FEATURE_SIZE
 # define index_arch_Fast_Copy_Backward	FEATURE_INDEX_1*FEATURE_SIZE
@@ -228,6 +230,7 @@ extern const struct cpu_features *__get_cpu_features (void)
 # define index_cpu_AVX2		COMMON_CPUID_INDEX_7
 # define index_cpu_AVX512F	COMMON_CPUID_INDEX_7
 # define index_cpu_AVX512DQ	COMMON_CPUID_INDEX_7
+# define index_cpu_ERMS		COMMON_CPUID_INDEX_7
 # define index_cpu_RTM		COMMON_CPUID_INDEX_7
 # define index_cpu_FMA		COMMON_CPUID_INDEX_1
 # define index_cpu_FMA4		COMMON_CPUID_INDEX_80000001
@@ -244,6 +247,7 @@ extern const struct cpu_features *__get_cpu_features (void)
 # define reg_AVX2		ebx
 # define reg_AVX512F		ebx
 # define reg_AVX512DQ		ebx
+# define reg_ERMS		ebx
 # define reg_RTM		ebx
 # define reg_FMA		ecx
 # define reg_FMA4		ecx
-- 
2.5.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Initial Enhanced REP MOVSB/STOSB (ERMS) support
  2016-03-28 20:48 [PATCH] Initial Enhanced REP MOVSB/STOSB (ERMS) support H.J. Lu
@ 2016-03-28 21:57 ` Roland McGrath
  2016-03-29  2:27   ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2016-03-28 21:57 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GNU C Library

Looks fine.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Initial Enhanced REP MOVSB/STOSB (ERMS) support
  2016-03-28 21:57 ` Roland McGrath
@ 2016-03-29  2:27   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2016-03-29  2:27 UTC (permalink / raw)
  To: Roland McGrath; +Cc: GNU C Library

On Mon, Mar 28, 2016 at 2:57 PM, Roland McGrath <roland@hack.frob.com> wrote:
> Looks fine.

Checked in.

-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-29  2:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-28 20:48 [PATCH] Initial Enhanced REP MOVSB/STOSB (ERMS) support H.J. Lu
2016-03-28 21:57 ` Roland McGrath
2016-03-29  2:27   ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).