PATCH: Re: more capabilities for linux/cpu flags
Marcus Meissner
marcus at jet.franken.de
Sun Jun 29 08:04:51 CDT 2003
On Sun, Jun 29, 2003 at 12:52:51PM +0200, Philipp Wollermann wrote:
> Hi,
>
> according to MSDN
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/ba
> se/isprocessorfeaturepresent.asp):
>
> PF_XMMI_INSTRUCTIONS_AVAILABLE The SSE instruction set is available.
> PF_XMMI64_INSTRUCTIONS_AVAILABLE The SSE2 instruction set is
> available.
Hi,
Ah, thanks. Updated patch.
Ciao, Marcus
Changelog:
Added PF_PAE_ENABLED and PF_XMMI64_INSTRUCTIONS defines.
Detect them and 3DNOW and XMMI_INSTRUCTIONS for Linux.
Index: include/winnt.h
===================================================================
RCS file: /home/wine/wine/include/winnt.h,v
retrieving revision 1.159
diff -u -r1.159 winnt.h
--- include/winnt.h 16 Jun 2003 19:44:06 -0000 1.159
+++ include/winnt.h 29 Jun 2003 13:03:06 -0000
@@ -506,8 +506,12 @@
#define PF_PPC_MOVEMEM_64BIT_OK 4
#define PF_ALPHA_BYTE_INSTRUCTIONS 5
#define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
+/* docu disagrees with name, we used AMD3D, MSDN says 3DNOW */
#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 */
Index: misc/cpu.c
===================================================================
RCS file: /home/wine/wine/misc/cpu.c,v
retrieving revision 1.32
diff -u -r1.32 cpu.c
--- misc/cpu.c 21 May 2003 18:24:34 -0000 1.32
+++ misc/cpu.c 29 Jun 2003 13:03:07 -0000
@@ -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_AMD3D_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;
}
}
More information about the wine-patches
mailing list