MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / mi_detect_cpu_features

Function mi_detect_cpu_features

3rd/mimalloc-2.0.9/src/init.c:567–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565mi_decl_cache_align bool _mi_cpu_has_fsrm = false;
566
567static void mi_detect_cpu_features(void) {
568 // FSRM for fast rep movsb support (AMD Zen3+ (~2020) or Intel Ice Lake+ (~2017))
569 int32_t cpu_info[4];
570 __cpuid(cpu_info, 7);
571 _mi_cpu_has_fsrm = ((cpu_info[3] & (1 << 4)) != 0); // bit 4 of EDX : see <https ://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=0:_Extended_Features>
572}
573#else
574static void mi_detect_cpu_features(void) {
575 // nothing

Callers 1

mi_process_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected