mirror of
https://git.musl-libc.org/git/musl
synced 2025-02-24 06:04:36 +03:00
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.
This commit is contained in:
parent
afad262440
commit
8d9e948652
6
src/math/i386/fabs.s
Normal file
6
src/math/i386/fabs.s
Normal file
@ -0,0 +1,6 @@
|
||||
.global fabs
|
||||
.type fabs,@function
|
||||
fabs:
|
||||
fldl 4(%esp)
|
||||
fabs
|
||||
ret
|
6
src/math/i386/fabsf.s
Normal file
6
src/math/i386/fabsf.s
Normal file
@ -0,0 +1,6 @@
|
||||
.global fabsf
|
||||
.type fabsf,@function
|
||||
fabsf:
|
||||
flds 4(%esp)
|
||||
fabs
|
||||
ret
|
6
src/math/i386/fabsl.s
Normal file
6
src/math/i386/fabsl.s
Normal file
@ -0,0 +1,6 @@
|
||||
.global fabsl
|
||||
.type fabsl,@function
|
||||
fabsl:
|
||||
fldt 4(%esp)
|
||||
fabs
|
||||
ret
|
6
src/math/i386/rint.s
Normal file
6
src/math/i386/rint.s
Normal file
@ -0,0 +1,6 @@
|
||||
.global rint
|
||||
.type rint,@function
|
||||
rint:
|
||||
fldl 4(%esp)
|
||||
frndint
|
||||
ret
|
6
src/math/i386/rintf.s
Normal file
6
src/math/i386/rintf.s
Normal file
@ -0,0 +1,6 @@
|
||||
.global rintf
|
||||
.type rintf,@function
|
||||
rintf:
|
||||
flds 4(%esp)
|
||||
frndint
|
||||
ret
|
6
src/math/i386/rintl.s
Normal file
6
src/math/i386/rintl.s
Normal file
@ -0,0 +1,6 @@
|
||||
.global rintl
|
||||
.type rintl,@function
|
||||
rintl:
|
||||
fldt 4(%esp)
|
||||
frndint
|
||||
ret
|
6
src/math/x86_64/fabsl.s
Normal file
6
src/math/x86_64/fabsl.s
Normal file
@ -0,0 +1,6 @@
|
||||
.global fabsl
|
||||
.type fabsl,@function
|
||||
fabsl:
|
||||
fldt 8(%rsp)
|
||||
fabs
|
||||
ret
|
6
src/math/x86_64/rintl.s
Normal file
6
src/math/x86_64/rintl.s
Normal file
@ -0,0 +1,6 @@
|
||||
.global rintl
|
||||
.type rintl,@function
|
||||
rintl:
|
||||
fldt 8(%rsp)
|
||||
frndint
|
||||
ret
|
Loading…
x
Reference in New Issue
Block a user