[Spice-devel] [PATCH 09/12] xddm/display/amd64: implement CheckAndSetSSE2
Alon Levy
alevy at redhat.com
Wed Apr 30 07:40:33 PDT 2014
---
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
More information about the Spice-devel
mailing list