summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mbld/bld.sub2
-rw-r--r--mbld/cpufeatures+plan9-x64.s9
-rw-r--r--mbld/cpufeatures+posixy-x64.s (renamed from mbld/cpufeatures+x64.s)0
-rwxr-xr-xmk/bootstrap/bootstrap+Darwin-x86_64.sh2
-rwxr-xr-xmk/bootstrap/bootstrap+Linux-x86_64.sh2
-rwxr-xr-xmk/bootstrap/bootstrap+NetBSD-amd64.sh2
-rwxr-xr-xmk/bootstrap/bootstrap+OpenBSD-amd64.sh4
-rwxr-xr-xmk/bootstrap/bootstrap+Plan9-amd64.sh2
8 files changed, 16 insertions, 7 deletions
diff --git a/mbld/bld.sub b/mbld/bld.sub
index 7374bb3..5f6b129 100644
--- a/mbld/bld.sub
+++ b/mbld/bld.sub
@@ -1,6 +1,6 @@
bin mbld =
build.myr
- cpufeatures+x64.s
+ cpufeatures+posixy-x64.s
deps.myr
libs.myr
install.myr
diff --git a/mbld/cpufeatures+plan9-x64.s b/mbld/cpufeatures+plan9-x64.s
new file mode 100644
index 0000000..a67e0c9
--- /dev/null
+++ b/mbld/cpufeatures+plan9-x64.s
@@ -0,0 +1,9 @@
+TEXT bld$cpufeatures+0(SB),$0
+ MOVL $0x1,AX
+ CPUID
+ MOVL CX,AX
+ ROLQ $32, AX
+ SHRQ $32, DX
+ ORQ DX, AX
+ RET
+
diff --git a/mbld/cpufeatures+x64.s b/mbld/cpufeatures+posixy-x64.s
index 8202ca1..8202ca1 100644
--- a/mbld/cpufeatures+x64.s
+++ b/mbld/cpufeatures+posixy-x64.s
diff --git a/mk/bootstrap/bootstrap+Darwin-x86_64.sh b/mk/bootstrap/bootstrap+Darwin-x86_64.sh
index ae2dbce..220420d 100755
--- a/mk/bootstrap/bootstrap+Darwin-x86_64.sh
+++ b/mk/bootstrap/bootstrap+Darwin-x86_64.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/start.o lib/thread/start+osx-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
diff --git a/mk/bootstrap/bootstrap+Linux-x86_64.sh b/mk/bootstrap/bootstrap+Linux-x86_64.sh
index 91c5c38..c27e044 100755
--- a/mk/bootstrap/bootstrap+Linux-x86_64.sh
+++ b/mk/bootstrap/bootstrap+Linux-x86_64.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+linux-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
diff --git a/mk/bootstrap/bootstrap+NetBSD-amd64.sh b/mk/bootstrap/bootstrap+NetBSD-amd64.sh
index 54d79c4..e089748 100755
--- a/mk/bootstrap/bootstrap+NetBSD-amd64.sh
+++ b/mk/bootstrap/bootstrap+NetBSD-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/atomic-impl.o lib/thread/atomic-impl+x64.s
as -g -o lib/std/getbp.o lib/std/getbp+posixy-x64.s
$pwd/6/6m -I . -I lib/sys lib/std/option.myr
diff --git a/mk/bootstrap/bootstrap+OpenBSD-amd64.sh b/mk/bootstrap/bootstrap+OpenBSD-amd64.sh
index ecda364..bcd0b7d 100755
--- a/mk/bootstrap/bootstrap+OpenBSD-amd64.sh
+++ b/mk/bootstrap/bootstrap+OpenBSD-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+openbsd-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
@@ -142,5 +142,5 @@ set -x
$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/test.myr
$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/deps.myr
$pwd/6/6m -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/main.myr
- ld -nopie --gc-sections -o mbld/mbld $pwd/rt/_myrrt.o mbld/deps.o mbld/main.o mbld/util.o mbld/cpufeatures+x64.s mbld/libs.o mbld/syssel.o mbld/config.o mbld/opts.o mbld/subtest.o mbld/types.o mbld/test.o mbld/install.o mbld/parse.o mbld/build.o -Llib/thread -lthread -Llib/bio -lbio -Llib/regex -lregex -Llib/std -lstd -Llib/sys -lsys
+ ld -nopie --gc-sections -o mbld/mbld $pwd/rt/_myrrt.o mbld/deps.o mbld/main.o mbld/util.o mbld/cpufeatures.o mbld/libs.o mbld/syssel.o mbld/config.o mbld/opts.o mbld/subtest.o mbld/types.o mbld/test.o mbld/install.o mbld/parse.o mbld/build.o -Llib/thread -lthread -Llib/bio -lbio -Llib/regex -lregex -Llib/std -lstd -Llib/sys -lsys
true
diff --git a/mk/bootstrap/bootstrap+Plan9-amd64.sh b/mk/bootstrap/bootstrap+Plan9-amd64.sh
index 8b45e53..cce2b4c 100755
--- a/mk/bootstrap/bootstrap+Plan9-amd64.sh
+++ b/mk/bootstrap/bootstrap+Plan9-amd64.sh
@@ -4,7 +4,7 @@
pwd=`pwd`
set -x
$pwd/6/6.out -I lib/sys -I lib/std -I lib/bio -I lib/regex -I lib/thread mbld/config+plan9-x64.myr
- 6a -o mbld/cpufeatures.6 mbld/cpufeatures+x64.s
+ 6a -o mbld/cpufeatures.6 mbld/cpufeatures+plan9-x64.s
6a -o lib/thread/atomic-impl.6 lib/thread/atomic-impl+plan9-x64.s
6a -o lib/std/getbp.6 lib/std/getbp+plan9-x64.s
$pwd/6/6.out -I lib/sys lib/std/errno+plan9.myr