shithub: mc

Download patch

ref: 05e04ed1df3c315aa69b2b5c16f16e83922d5aed
parent: 7cd4f442cf238c5de486b54deb0bfd3a3f7a0516
author: Ori Bernstein <ori@eigenstate.org>
date: Sat May 12 21:28:59 EDT 2018

Fix posix build.

--- a/lib/math/bld.sub
+++ b/lib/math/bld.sub
@@ -33,6 +33,7 @@
 	util.myr
 	ftrap.myr
 	ftrap-impl+plan9-x64.s
+	ftrap-impl+posixy-x64.s
 
 	lib ../std:std
 ;;
--- 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
--- 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