summaryrefslogtreecommitdiff
path: root/src/cpu/x86/sse_disable.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86/sse_disable.inc')
-rw-r--r--src/cpu/x86/sse_disable.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cpu/x86/sse_disable.inc b/src/cpu/x86/sse_disable.inc
new file mode 100644
index 0000000000..a18ea18643
--- /dev/null
+++ b/src/cpu/x86/sse_disable.inc
@@ -0,0 +1,18 @@
+ /*
+ * Put the processor back into a reset state
+ * with respect to the xmm registers.
+ */
+
+ xorps %xmm0, %xmm0
+ xorps %xmm1, %xmm1
+ xorps %xmm2, %xmm2
+ xorps %xmm3, %xmm3
+ xorps %xmm4, %xmm4
+ xorps %xmm5, %xmm5
+ xorps %xmm6, %xmm6
+ xorps %xmm7, %xmm7
+
+ /* Disable sse instructions */
+ movl %cr4, %eax
+ andl $~(3<<9), %eax
+ movl %eax, %cr4