2017-10-02 14:55:30 +02:00
|
|
|
.text
|
|
|
|
|
|
|
|
|
2018-05-08 17:45:51 +02:00
|
|
|
// logf.
|
|
|
|
.globl _D5tanya4math8nbtheory4logfFNaNbNiNffZf
|
|
|
|
.type _D5tanya4math8nbtheory4logfFNaNbNiNffZf, @function
|
|
|
|
|
|
|
|
_D5tanya4math8nbtheory4logfFNaNbNiNffZf:
|
|
|
|
movss %xmm0, -4(%rsp) // Put the argument onto the stack
|
2017-10-02 14:55:30 +02:00
|
|
|
|
|
|
|
fldln2 // Put lb(e) onto the FPU stack
|
2018-05-08 17:45:51 +02:00
|
|
|
flds -4(%rsp) // Put a float onto the FPU stack
|
2017-10-02 14:55:30 +02:00
|
|
|
fyl2x // %st1 * lb(%st0)
|
2018-05-08 17:45:51 +02:00
|
|
|
|
|
|
|
// The result is on the FPU stack, but returned in %xmm0
|
|
|
|
fstps -4(%rsp)
|
|
|
|
movss -4(%rsp), %xmm0
|
|
|
|
|
2017-10-02 14:55:30 +02:00
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
// log.
|
2018-05-08 17:45:51 +02:00
|
|
|
.globl _D5tanya4math8nbtheory3logFNaNbNiNfdZd
|
|
|
|
.type _D5tanya4math8nbtheory3logFNaNbNiNfdZd, @function
|
2017-10-02 14:55:30 +02:00
|
|
|
|
2018-05-08 17:45:51 +02:00
|
|
|
_D5tanya4math8nbtheory3logFNaNbNiNfdZd:
|
2017-10-02 14:55:30 +02:00
|
|
|
movsd %xmm0, -8(%rsp) // Put the argument onto the stack
|
|
|
|
|
|
|
|
fldln2 // Put lb(e) onto the FPU stack
|
|
|
|
fldl -8(%rsp) // Put a double onto the FPU stack
|
|
|
|
fyl2x // %st1 * lb(%st0)
|
|
|
|
|
|
|
|
// The result is on the FPU stack, but returned in %xmm0
|
|
|
|
fstpl -8(%rsp)
|
|
|
|
movsd -8(%rsp), %xmm0
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
2018-05-08 17:45:51 +02:00
|
|
|
// logl.
|
|
|
|
.globl _D5tanya4math8nbtheory4loglFNaNbNiNfeZe
|
|
|
|
.type _D5tanya4math8nbtheory4loglFNaNbNiNfeZe, @function
|
2017-10-02 14:55:30 +02:00
|
|
|
|
2018-05-08 17:45:51 +02:00
|
|
|
_D5tanya4math8nbtheory4loglFNaNbNiNfeZe:
|
2017-10-02 14:55:30 +02:00
|
|
|
fldln2 // Put lb(e) onto the FPU stack
|
2018-05-08 17:45:51 +02:00
|
|
|
fldt 8(%rsp) // Put the argument onto the FPU stack
|
2017-10-02 14:55:30 +02:00
|
|
|
fyl2x // %st1 * lb(%st0)
|
|
|
|
ret
|