- Code to enable and disable use of the sse and mmx registers
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@930 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
c22ea4f00d
commit
57fa1b8279
|
@ -0,0 +1,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
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Enabling mmx registers is a noop
|
||||
* Enable the use of the xmm registers
|
||||
*/
|
||||
|
||||
/* Disable floating point emulation */
|
||||
movl %cr0, %eax
|
||||
andl $~(1<<2), %eax
|
||||
movl %eax, %cr0
|
||||
|
||||
/* Enable sse instructions */
|
||||
movl %cr4, %eax
|
||||
orl $(1<<9), %eax
|
||||
movl %eax, %cr4
|
Loading…
Reference in New Issue