mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
Kernel: Detect support for CPUID FXSR
The fxsave and fxrstor instructions are available only if the FXSR feature is present.
This commit is contained in:
parent
90873781c1
commit
fea23d0ec1
Notes:
sideshowbarker
2024-07-18 12:06:33 +09:00
Author: https://github.com/boricj Commit: https://github.com/SerenityOS/serenity/commit/fea23d0ec10 Pull-request: https://github.com/SerenityOS/serenity/pull/8067 Reviewed-by: https://github.com/awesomekling
@ -971,6 +971,8 @@ UNMAP_AFTER_INIT void Processor::cpu_detect()
|
||||
set_feature(CPUFeature::PGE);
|
||||
if (processor_info.edx() & (1 << 23))
|
||||
set_feature(CPUFeature::MMX);
|
||||
if (processor_info.edx() & (1 << 24))
|
||||
set_feature(CPUFeature::FXSR);
|
||||
if (processor_info.edx() & (1 << 25))
|
||||
set_feature(CPUFeature::SSE);
|
||||
if (processor_info.edx() & (1 << 26))
|
||||
@ -1137,6 +1139,8 @@ String Processor::features_string() const
|
||||
return "syscall";
|
||||
case CPUFeature::MMX:
|
||||
return "mmx";
|
||||
case CPUFeature::FXSR:
|
||||
return "fxsr";
|
||||
case CPUFeature::SSE2:
|
||||
return "sse2";
|
||||
case CPUFeature::SSE3:
|
||||
|
@ -548,6 +548,7 @@ enum class CPUFeature : u32 {
|
||||
SSE4_2 = (1 << 20),
|
||||
XSAVE = (1 << 21),
|
||||
AVX = (1 << 22),
|
||||
FXSR = (1 << 23),
|
||||
};
|
||||
|
||||
class Thread;
|
||||
|
Loading…
Reference in New Issue
Block a user