Added PF_PAE_ENABLED and PF_XMMI64_INSTRUCTIONS defines.
Detect them and 3DNOW and XMMI_INSTRUCTIONS for Linux.
diff --git a/include/winnt.h b/include/winnt.h
index bc437cf..2592b69 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -506,8 +506,10 @@
#define PF_PPC_MOVEMEM_64BIT_OK 4
#define PF_ALPHA_BYTE_INSTRUCTIONS 5
#define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
-#define PF_AMD3D_INSTRUCTIONS_AVAILABLE 7
+#define PF_3DNOW_INSTRUCTIONS_AVAILABLE 7
#define PF_RDTSC_INSTRUCTION_AVAILABLE 8
+#define PF_PAE_ENABLED 9
+#define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
/* Execution state flags */
diff --git a/misc/cpu.c b/misc/cpu.c
index e04b833..5b4494a 100644
--- a/misc/cpu.c
+++ b/misc/cpu.c
@@ -315,6 +315,16 @@
PF[PF_MMX_INSTRUCTIONS_AVAILABLE] = TRUE;
if (strstr(value,"tsc"))
PF[PF_RDTSC_INSTRUCTION_AVAILABLE] = TRUE;
+ if (strstr(value,"3dnow"))
+ PF[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = TRUE;
+ /* This will also catch sse2, but we have sse itself
+ * if we have sse2, so no problem */
+ if (strstr(value,"sse"))
+ PF[PF_XMMI_INSTRUCTIONS_AVAILABLE] = TRUE;
+ if (strstr(value,"sse2"))
+ PF[PF_XMMI64_INSTRUCTIONS_AVAILABLE] = TRUE;
+ if (strstr(value,"pae"))
+ PF[PF_PAE_ENABLED] = TRUE;
}
}
@@ -455,7 +465,7 @@
do_cpuid(0x80000000, regs); /* get vendor cpuid level */
if (regs[0]>=0x80000001) {
do_cpuid(0x80000001, regs2); /* get vendor features */
- PF[PF_AMD3D_INSTRUCTIONS_AVAILABLE] =
+ PF[PF_3DNOW_INSTRUCTIONS_AVAILABLE] =
(regs2[3] & (1 << 31 )) >> 31;
}
}