summaryrefslogtreecommitdiff
path: root/src/cpu/k8/disable_mmx_sse.inc
blob: 5ce9dfdc1fb4df49287b8b6368a59e960b3f50a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
	/* Clear out an mmx state */
	emms

	/*
	 * Put the processor back into a reset state
	 * with respect to the xmm registers.
	 */
	
	pxor %xmm0, %xmm0
	pxor %xmm1, %xmm1
	pxor %xmm2, %xmm2
	pxor %xmm3, %xmm3
	pxor %xmm4, %xmm4
	pxor %xmm5, %xmm5
	pxor %xmm6, %xmm6
	pxor %xmm7, %xmm7

	/* Disable floating point emulation */
	movl	%cr0, %eax
	andl	$~(1<<2), %eax
	movl	%eax, %cr0

	/* Disable sse instructions */
	movl	%cr4, %eax
	andl	$~(3<<9), %eax
	movl	%eax, %cr4