[PATCH 09/12] xddm/display/amd64: implement CheckAndSetSSE2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 xddm/display/amd64/x64.asm | 13 +++++++++++++
 xddm/display/res.c         |  4 ++++
 2 files changed, 17 insertions(+)

diff --git a/xddm/display/amd64/x64.asm b/xddm/display/amd64/x64.asm
index e32b0df..36971d3 100644
--- a/xddm/display/amd64/x64.asm
+++ b/xddm/display/amd64/x64.asm
@@ -1 +1,14 @@
+Extern have_sse2:DWORD
+
+.code
+
+CheckAndSetSSE2 proc
+    mov eax, 0000001h
+    cpuid
+    and edx, 4000000h
+    shr edx, 26
+    mov have_sse2, edx
+    ret
+CheckAndSetSSE2 endp
+
 end
\ No newline at end of file
diff --git a/xddm/display/res.c b/xddm/display/res.c
index 289ece5..9320dd1 100644
--- a/xddm/display/res.c
+++ b/xddm/display/res.c
@@ -124,7 +124,11 @@ typedef struct QXLOutput {
     UINT8 data[0];
 } QXLOutput;
 
+#ifndef _WIN64
 static int have_sse2 = FALSE;
+#else
+int have_sse2 = FALSE;
+#endif
 
 #ifndef DBG
 static _inline void DebugShowOutput(PDev *pdev, QXLOutput* output)
-- 
1.9.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]