[PATCH] fhandler_proc/cpuinfo: support fast short REP MOVSB

Brian Inglis Brian.Inglis@SystematicSW.ab.ca
Fri Feb 21 21:33:00 GMT 2020


Added in Linux 5.6:
Check FSRM and use REP MOVSB for short copies on systems that have it.

>From the Intel Optimization Reference Manual:

3.7.6.1 Fast Short REP MOVSB
Beginning with processors based on Ice Lake Client microarchitecture,
REP MOVSB performance is enhanced with string lengths up to 128 bytes.
Support for fast-short REP MOVSB is indicated by the CPUID feature flag:
CPUID [EAX=7H, ECX=0H).EDX.FAST_SHORT_REP_MOVSB[bit 4] = 1.
There is no change in the REP STOS performance.
---
 winsup/cygwin/fhandler_proc.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index 78a69703d..030ade68a 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -1346,6 +1346,7 @@ format_proc_cpuinfo (void *, char *&destbuf)
 
           ftcprint (features1,  2, "avx512_4vnniw");	   /* vec dot prod dw */
           ftcprint (features1,  3, "avx512_4fmaps");       /* vec 4 FMA single */
+          ftcprint (features1,  4, "fsrm");		   /* fast short REP MOVSB */
           ftcprint (features1,  8, "avx512_vp2intersect"); /* vec intcpt d/q */
           ftcprint (features1, 10, "md_clear");            /* verw clear buf */
           ftcprint (features1, 18, "pconfig");		   /* platform config */
-- 
2.21.0



More information about the Cygwin-patches mailing list