From 70b8332ff0fb0b632a6726e7acbf46b4b4546d27 Mon Sep 17 00:00:00 2001
From: Florian Maushart <FloriansGit@online.ms>
Date: Wed, 24 May 2017 22:06:47 +0200
Subject: [PATCH] SystemInformation: Add CPU_FEATURE_FPU flag

Teach `DoesCPUSupportFeature` to check for a FPU.
---
 SystemInformation.cxx    | 5 +++++
 SystemInformation.hxx.in | 1 +
 2 files changed, 6 insertions(+)

diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 9590ae0..bfc895e 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -1968,6 +1968,11 @@ bool SystemInformationImplementation::DoesCPUSupportFeature(long int dwFeature)
       this->Features.ExtendedFeatures.PowerManagement.HasVoltageID)
     bHasFeature = true;
 
+  // Check for FPU support.
+  if (((dwFeature & SystemInformation::CPU_FEATURE_FPU) != 0) &&
+      this->Features.HasFPU)
+    bHasFeature = true;
+
   return bHasFeature;
 }
 
diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in
index 8af063a..516c505 100644
--- a/SystemInformation.hxx.in
+++ b/SystemInformation.hxx.in
@@ -50,6 +50,7 @@ public:
   static const long int CPU_FEATURE_TEMPSENSEDIODE = 1 << 20;
   static const long int CPU_FEATURE_FREQUENCYID = 1 << 21;
   static const long int CPU_FEATURE_VOLTAGEID_FREQUENCY = 1 << 22;
+  static const long int CPU_FEATURE_FPU = 1 << 23;
 
 public:
   SystemInformation();
-- 
GitLab