forked from fortanix/rust-sgx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added missing math functions from intel's libm
- Loading branch information
Showing
14 changed files
with
2,113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.file "copysignl.c" | ||
.text | ||
..TXTST0: | ||
# -- Begin copysignl | ||
.text | ||
.align 16,0x90 | ||
.globl copysignl | ||
copysignl: | ||
# parameter 1: 64 + %rsp | ||
# parameter 2: 80 + %rsp | ||
..B1.1: | ||
.cfi_startproc | ||
..___tag_value_copysignl.1: | ||
..L2: | ||
|
||
subq $56, %rsp | ||
.cfi_def_cfa_offset 64 | ||
xorb %sil, %sil | ||
fldt 64(%rsp) | ||
fstpt (%rsp) | ||
..B1.2: | ||
fnstcw 50(%rsp) | ||
..B1.3: | ||
movzwl 50(%rsp), %edx | ||
movl %edx, %eax | ||
andl $768, %eax | ||
cmpl $768, %eax | ||
je ..B1.7 | ||
..B1.4: | ||
orl $-64768, %edx | ||
movw %dx, 48(%rsp) | ||
..B1.5: | ||
fldcw 48(%rsp) | ||
..B1.6: | ||
movb $1, %sil | ||
..B1.7: | ||
fldt 80(%rsp) | ||
lea _ones(%rip), %rax | ||
fldt (%rsp) | ||
movb 89(%rsp), %dl | ||
andb $-128, %dl | ||
fldl (%rax) | ||
fmul %st, %st(1) | ||
fxch %st(1) | ||
fstpt 32(%rsp) | ||
fmulp %st, %st(1) | ||
movb 41(%rsp), %cl | ||
andb $127, %cl | ||
orb %dl, %cl | ||
fstpt 16(%rsp) | ||
testb %sil, %sil | ||
movb %cl, 41(%rsp) | ||
je ..B1.9 | ||
..B1.8: | ||
fldcw 50(%rsp) | ||
..B1.9: | ||
fldt 32(%rsp) | ||
addq $56, %rsp | ||
.cfi_def_cfa_offset 8 | ||
ret | ||
.align 16,0x90 | ||
.cfi_endproc | ||
.type copysignl,@function | ||
.size copysignl,.-copysignl | ||
.data | ||
# -- End copysignl | ||
.section .rodata, "a" | ||
.align 4 | ||
.align 4 | ||
_ones: | ||
.long 0 | ||
.long 1072693248 | ||
.long 0 | ||
.long 3220176896 | ||
.type _ones,@object | ||
.size _ones,16 | ||
.data | ||
.section .note.GNU-stack, "" | ||
// -- Begin DWARF2 SEGMENT .eh_frame | ||
.section .eh_frame,"a",@progbits | ||
.eh_frame_seg: | ||
.align 1 | ||
# End |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.file "fabs.c" | ||
.text | ||
..TXTST0: | ||
# -- Begin fabs | ||
.text | ||
.align 16,0x90 | ||
.globl fabs | ||
fabs: | ||
# parameter 1: %xmm0 | ||
..B1.1: | ||
.cfi_startproc | ||
..___tag_value_fabs.1: | ||
..L2: | ||
|
||
..B1.2: | ||
movq MASK(%rip), %xmm1 | ||
movq ONE(%rip), %xmm2 | ||
andpd %xmm1, %xmm0 | ||
mulsd %xmm2, %xmm0 | ||
ret | ||
..B1.3: | ||
.align 16,0x90 | ||
.cfi_endproc | ||
.type fabs,@function | ||
.size fabs,.-fabs | ||
.data | ||
# -- End fabs | ||
.section .rodata, "a" | ||
.align 16 | ||
.align 16 | ||
MASK: | ||
.long 4294967295 | ||
.long 2147483647 | ||
.type MASK,@object | ||
.size MASK,8 | ||
.space 8, 0x00 # pad | ||
.align 16 | ||
ONE: | ||
.long 0 | ||
.long 1072693248 | ||
.type ONE,@object | ||
.size ONE,8 | ||
.data | ||
.section .note.GNU-stack, "" | ||
// -- Begin DWARF2 SEGMENT .eh_frame | ||
.section .eh_frame,"a",@progbits | ||
.eh_frame_seg: | ||
.align 1 | ||
# End |
Oops, something went wrong.