summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-05-09 19:21:57 -0700
committerOri Bernstein <ori@eigenstate.org>2018-05-09 19:21:57 -0700
commit4cd2696347b1273dfc97c6733b7f01d9ccc81732 (patch)
tree925ead7cf517a8daf03ea299ffa9808655acc25b
parent3665783a1d1fe03db70cca452c615b439310a329 (diff)
downloadmc-4cd2696347b1273dfc97c6733b7f01d9ccc81732.tar.gz
Turn off fancy stuff when we have an old assembler.
-rw-r--r--mbld/syssel.myr15
1 files changed, 12 insertions, 3 deletions
diff --git a/mbld/syssel.myr b/mbld/syssel.myr
index 636792a..bbf59c1 100644
--- a/mbld/syssel.myr
+++ b/mbld/syssel.myr
@@ -162,13 +162,13 @@ const addsysattrs = {b, tags
match opt_arch
| "x64":
tag(b, "x64")
- if opt_cpufeatures & CpuidSSE2 == CpuidSSE2
+ if supports(CpuidSSE2)
tag(b, "sse2")
;;
- if opt_cpufeatures & CpuidSSE4 == CpuidSSE4
+ if supports(CpuidSSE4)
tag(b, "sse4")
;;
- if opt_cpufeatures & CpuidFMA == CpuidFMA
+ if supports(CpuidFMA)
tag(b, "fma")
;;
| unknown:
@@ -182,6 +182,15 @@ const addsysattrs = {b, tags
;;
}
+const supports = {feat
+ match (opt_sys, opt_cpufeatures & feat)
+ /* The version of gas that's shipped with openbsd is too old. */
+ | ("openbsd", CpuidSSE4): -> false
+ | ("openbsd", CpuidFMA): -> false
+ | (_, f): -> f == feat
+ ;;
+}
+
const loadtagfile = {b, tagfile
var data, sp