Actually set the bIDIVa value in the ARM CPUDetect.

This commit is contained in:
Ryan Houdek 2013-03-14 08:48:01 -05:00
parent 808eaf7c49
commit b4830be9bc
1 changed files with 8 additions and 4 deletions

View File

@ -122,6 +122,12 @@ void CPUInfo::Detect()
bVFPv4 = CheckCPUFeature("vfpv4"); bVFPv4 = CheckCPUFeature("vfpv4");
bIDIVa = CheckCPUFeature("idiva"); bIDIVa = CheckCPUFeature("idiva");
bIDIVt = CheckCPUFeature("idivt"); bIDIVt = CheckCPUFeature("idivt");
// On some buggy kernels(Qualcomm) they show that they support VFPv4 but not IDIVa
// All VFPv4 CPUs will support IDIVa
if (bVFPv4)
bIDIVa = bIDIVt = true;
// These two are ARMv8 specific. // These two are ARMv8 specific.
bFP = CheckCPUFeature("fp"); bFP = CheckCPUFeature("fp");
bASIMD = CheckCPUFeature("asimd"); bASIMD = CheckCPUFeature("asimd");
@ -154,10 +160,8 @@ std::string CPUInfo::Summarize()
if (bVFPv3) sum += ", VFPv3"; if (bVFPv3) sum += ", VFPv3";
if (bTLS) sum += ", TLS"; if (bTLS) sum += ", TLS";
if (bVFPv4) sum += ", VFPv4"; if (bVFPv4) sum += ", VFPv4";
// On some buggy kernels(Qualcomm) they show that they support VFPv4 but not IDIVa if (bIDIVa) sum += ", IDIVa";
// All VFPv4 CPUs will support IDIVa if (bIDIVt) sum += ", IDIVt";
if (bIDIVa || bVFPv4) sum += ", IDIVa";
if (bIDIVt || bVFPv4) sum += ", IDIVt";
return sum; return sum;
} }