Return to flt_rounds.S CVS log | Up to [cvs.NetBSD.org] / src / lib / libc / arch / x86_64 / gen |
Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. |
version 1.5, 2011/09/29 22:55:45 | version 1.6, 2011/09/30 17:42:34 | ||
---|---|---|---|
|
|
||
_ALIGN_TEXT | _ALIGN_TEXT | ||
ENTRY(__flt_rounds) | ENTRY(__flt_rounds) | ||
fnstcw -4(%rsp) | fnstcw -4(%rsp) | ||
movl -4(%rsp), %eax | movl -4(%rsp), %ecx | ||
shrl $10, %eax | shrl $9, %ecx | ||
andl $6, %ecx | |||
movl $0x2d, %eax /* 0x2d = 00.10.11.01 */ | |||
sarl %cl, %eax /* 0,1,2,3 -> 1,3,2,0 */ | |||
andl $3, %eax | andl $3, %eax | ||
xorl $1, %eax /* map 0,1,2,3 -> 1,0,3,2 */ | |||
ret | ret |