/* Set 80387 floating point hardware rounding precision */ .file "setprec.387" .version "01.01" .text .p2align 4,,15 .globl sprec .type sprec, @function sprec: LFB0: .cfi_startproc pushq %rax subq $8,%rsp fstcw (%rsp) fwait movw (%rsp),%ax andw $0xfcff,%ax movw %ax,(%rsp) fldcw (%rsp) popq %rax popq %rax ret .cfi_endproc .LFE0: .size sprec,.-sprec .align 16 .globl dprec dprec: pushq %rax subq $8,%rsp fstcw (%rsp) fwait movq (%rsp),%rax andq $0xfcff,%rax /* trap on overflow */ /* andq $0xfcf7,%rax */ orw $0x200,%ax movw %ax,(%rsp) fldcw (%rsp) popq %rax popq %rax ret .Lfe2: .size dprec,.Lfe2-dprec .align 16 .globl ldprec ldprec: pushq %rax subq $8,%rsp fstcw (%rsp) fwait movw (%rsp),%ax orw $0x300,%ax movq %rax,(%rsp) fldcw (%rsp) popq %rax popq %rax ret .Lfe3: .size ldprec,.Lfe3-ldprec .align 16 .globl getprec getprec: subq $8,%rsp fstcw (%rsp) fwait movq (%rsp),%rax ret .Lfe4: .size getprec,.Lfe4-getprec .globl setfpu .type setfpu, @function setfpu: movq 16(%rbp),%rax pushq %rax fldcw (%rsp) fwait ret .size setfpu, .-setfpu