mirror of
https://github.com/fluencelabs/musl
synced 2025-05-21 19:51:31 +00:00
asm for floor/ceil/trunc
This commit is contained in:
parent
58ff9e8eaf
commit
0b70a1e9a9
1
src/math/i386/ceil.s
Normal file
1
src/math/i386/ceil.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# see floor.s
|
1
src/math/i386/ceilf.s
Normal file
1
src/math/i386/ceilf.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# see floor.s
|
1
src/math/i386/ceill.s
Normal file
1
src/math/i386/ceill.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# see floor.s
|
67
src/math/i386/floor.s
Normal file
67
src/math/i386/floor.s
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
.global floorf
|
||||||
|
.type floorf,@function
|
||||||
|
floorf:
|
||||||
|
flds 4(%esp)
|
||||||
|
jmp 1f
|
||||||
|
|
||||||
|
.global floorl
|
||||||
|
.type floorl,@function
|
||||||
|
floorl:
|
||||||
|
fldt 4(%esp)
|
||||||
|
jmp 1f
|
||||||
|
|
||||||
|
.global floor
|
||||||
|
.type floor,@function
|
||||||
|
floor:
|
||||||
|
fldl 4(%esp)
|
||||||
|
1: mov $0x7,%al
|
||||||
|
1: fstcw 4(%esp)
|
||||||
|
mov 5(%esp),%ah
|
||||||
|
mov %al,5(%esp)
|
||||||
|
fldcw 4(%esp)
|
||||||
|
frndint
|
||||||
|
mov %ah,5(%esp)
|
||||||
|
fldcw 4(%esp)
|
||||||
|
ret
|
||||||
|
|
||||||
|
.global ceil
|
||||||
|
.type ceil,@function
|
||||||
|
ceil:
|
||||||
|
fldl 4(%esp)
|
||||||
|
mov $0xb,%al
|
||||||
|
jmp 1b
|
||||||
|
|
||||||
|
.global ceilf
|
||||||
|
.type ceilf,@function
|
||||||
|
ceilf:
|
||||||
|
flds 4(%esp)
|
||||||
|
mov $0xb,%al
|
||||||
|
jmp 1b
|
||||||
|
|
||||||
|
.global ceill
|
||||||
|
.type ceill,@function
|
||||||
|
ceill:
|
||||||
|
fldt 4(%esp)
|
||||||
|
mov $0xb,%al
|
||||||
|
jmp 1b
|
||||||
|
|
||||||
|
.global trunc
|
||||||
|
.type trunc,@function
|
||||||
|
trunc:
|
||||||
|
fldl 4(%esp)
|
||||||
|
mov $0xf,%al
|
||||||
|
jmp 1b
|
||||||
|
|
||||||
|
.global truncf
|
||||||
|
.type truncf,@function
|
||||||
|
truncf:
|
||||||
|
flds 4(%esp)
|
||||||
|
mov $0xf,%al
|
||||||
|
jmp 1b
|
||||||
|
|
||||||
|
.global truncl
|
||||||
|
.type truncl,@function
|
||||||
|
truncl:
|
||||||
|
fldt 4(%esp)
|
||||||
|
mov $0xf,%al
|
||||||
|
jmp 1b
|
1
src/math/i386/floorf.s
Normal file
1
src/math/i386/floorf.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# see floor.s
|
1
src/math/i386/floorl.s
Normal file
1
src/math/i386/floorl.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# see floor.s
|
1
src/math/i386/trunc.s
Normal file
1
src/math/i386/trunc.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# see floor.s
|
1
src/math/i386/truncf.s
Normal file
1
src/math/i386/truncf.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# see floor.s
|
1
src/math/i386/truncl.s
Normal file
1
src/math/i386/truncl.s
Normal file
@ -0,0 +1 @@
|
|||||||
|
# see floor.s
|
Loading…
x
Reference in New Issue
Block a user