shithub: mc

Download patch

ref: 60964cf8e347043da18a3f79217e5f5fa3a8bb5e
parent: a94f75ac8f6a6365182191a55fad1e5723411457
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Mar 22 20:24:17 EDT 2018

Fix the cpufeatures... er... features on plan 9.

--- a/mbld/cpufeatures+plan9-x64.s
+++ b/mbld/cpufeatures+plan9-x64.s
@@ -1,9 +1,8 @@
 TEXT bld$cpufeatures+0(SB),$0
 	MOVL	$0x1,AX
 	CPUID
-	MOVL	CX,AX
-	ROLQ	$32, AX
-	SHRQ	$32, DX
-	ORQ	DX, AX
+	MOVL    CX, AX
+	MOVL    DX, DX
+	ROLQ    $32, DX
+	ORQ     DX, AX
 	RET
-
--- a/mbld/cpufeatures+posixy-x64.s
+++ b/mbld/cpufeatures+posixy-x64.s
@@ -1,7 +1,7 @@
 .globl bld$cpufeatures
-.globl bld$_cpufeatures
+.globl _bld$cpufeatures
 bld$cpufeatures:
-bld$_cpufeatures:
+_bld$cpufeatures:
 	mov	$0x1, %eax
 	cpuid
 	mov	%ecx, %eax
--- a/mk/bootstrap/bootstrap+FreeBSD-amd64.sh
+++ b/mk/bootstrap/bootstrap+FreeBSD-amd64.sh
@@ -4,7 +4,7 @@
 pwd=`pwd`
 set -x
 	$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/config.myr
-	as -g -o mbld/cpufeatures.o mbld/cpufeatures+x64.s
+	as -g -o mbld/cpufeatures.o mbld/cpufeatures+posixy-x64.s
 	as -g -o lib/thread/exit.o lib/thread/exit+freebsd-x64.s
 	as -g -o lib/thread/atomic-impl.o lib/thread/atomic-impl+x64.s
 	as -g -o lib/std/getbp.o lib/std/getbp+posixy-x64.s