提交 8d9e9486 编写于 作者: R Rich Felker

asm versions of some simple math functions for i386 and x86_64

these are functions that have direct fpu approaches to implementation
without problematic exception or rounding issues. x86_64 lacks
float/double versions because i'm unfamiliar with the necessary sse
code for performing these operations.
上级 afad2624
.global fabs
.type fabs,@function
fabs:
fldl 4(%esp)
fabs
ret
.global fabsf
.type fabsf,@function
fabsf:
flds 4(%esp)
fabs
ret
.global fabsl
.type fabsl,@function
fabsl:
fldt 4(%esp)
fabs
ret
.global rint
.type rint,@function
rint:
fldl 4(%esp)
frndint
ret
.global rintf
.type rintf,@function
rintf:
flds 4(%esp)
frndint
ret
.global rintl
.type rintl,@function
rintl:
fldt 4(%esp)
frndint
ret
.global fabsl
.type fabsl,@function
fabsl:
fldt 8(%rsp)
fabs
ret
.global rintl
.type rintl,@function
rintl:
fldt 8(%rsp)
frndint
ret
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册