summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-05-13 01:28:59 -0700
committerOri Bernstein <ori@eigenstate.org>2018-05-13 01:28:59 -0700
commit05e04ed1df3c315aa69b2b5c16f16e83922d5aed (patch)
tree0674ea97d672c2e930bf5df1b534df1aa466753d
parent7cd4f442cf238c5de486b54deb0bfd3a3f7a0516 (diff)
downloadmc-05e04ed1df3c315aa69b2b5c16f16e83922d5aed.tar.gz
Fix posix build.
-rw-r--r--lib/math/bld.sub1
-rw-r--r--lib/math/ftrap-impl+posixy-x64.s12
-rw-r--r--lib/std/bld.sub5
3 files changed, 11 insertions, 7 deletions
diff --git a/lib/math/bld.sub b/lib/math/bld.sub
index df857d5..270028a 100644
--- a/lib/math/bld.sub
+++ b/lib/math/bld.sub
@@ -33,6 +33,7 @@ lib math =
util.myr
ftrap.myr
ftrap-impl+plan9-x64.s
+ ftrap-impl+posixy-x64.s
lib ../std:std
;;
diff --git a/lib/math/ftrap-impl+posixy-x64.s b/lib/math/ftrap-impl+posixy-x64.s
index e713a9f..08dd7cf 100644
--- a/lib/math/ftrap-impl+posixy-x64.s
+++ b/lib/math/ftrap-impl+posixy-x64.s
@@ -1,17 +1,17 @@
.globl _math$fptrap
.globl math$fptrap
_math$fptrap:
-math$fptrap
+math$fptrap:
subq $4,%rsp
wait
stmxcsr (%rsp)
- movl (%rsp),%rax
- andl $~0x1f80,%rax
- testb %rdi,%rdi
+ movl (%rsp),%eax
+ andl $~0x1f80,%eax
+ testb %dil,%dil
jnz .apply
- orl $0x1f80,%rax
+ orl $0x1f80,%eax
.apply:
- movl %rax,(rsp)
+ movl %eax,(%rsp)
ldmxcsr (%rsp)
addq $4,%rsp
ret
diff --git a/lib/std/bld.sub b/lib/std/bld.sub
index 244b992..e6e8b73 100644
--- a/lib/std/bld.sub
+++ b/lib/std/bld.sub
@@ -1,4 +1,7 @@
-testdeps = ../testr:testr ;;
+testdeps =
+ ../testr:testr
+ ../math:math
+;;
lib std =
lib ../sys:sys