minix/lib/i386/math/fpu_cw.s

21 lines
394 B
ArmAsm
Raw Normal View History

2009-12-24 21:22:41 +01:00
! fpu_cw_get() - get FPU control word Author: Erik van der Kouwe
! fpu_cw_set() - set FPU control word 9 Dec 2009
.sect .text
.define _fpu_cw_get
.define _fpu_cw_set
! u16_t fpu_cw_get(void)
_fpu_cw_get:
! clear unused bits just to be sure
xor eax, eax
push eax
fstcw (esp)
pop eax
ret
! void fpu_cw_set(u16_t fpu_cw)
_fpu_cw_set:
! load control word from parameter
fldcw 4(esp)
ret