From 85619d59ae82beed932453839b6bea76e75f3642 Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Mon, 5 Feb 2024 01:20:50 -0500 Subject: [PATCH] Correct the features of arm64-darwin xbuild test I'm starting to think that make-host-2 might need to suppress the MEMBER transform if a constant list has a NIL, because the address of NIL is sensitive to static-space-start, necessitating xperfecthash entries for each choice. Nonetheles, gathering an exhaustive list of known good configurations to test isn't in itself an unreasonable thing. --- build-all-cores.sh | 4 +- crossbuild-runner/Makefile | 4 +- ...d-from-headers.lisp => linux-headers.lisp} | 0 crossbuild-runner/pass-2.lisp | 22 +++--- xperfecthash63.lisp-expr | 69 +++++++++++++++++++ 5 files changed, 85 insertions(+), 14 deletions(-) rename crossbuild-runner/backends/arm64/{stuff-groveled-from-headers.lisp => linux-headers.lisp} (100%) diff --git a/build-all-cores.sh b/build-all-cores.sh index cb8be905a..c87206d8d 100755 --- a/build-all-cores.sh +++ b/build-all-cores.sh @@ -19,7 +19,7 @@ (defparameter *all-configurations* '(("arm" ("arm" :little-endian :largefile)) ("arm64" ("arm64" :little-endian :sb-thread) - ("arm64-darwin" :little-endian :sb-thread :darwin-jit)) + ("arm64-darwin" :darwin :bsd :unix :mach-o :little-endian :sb-thread :darwin-jit)) ("mips" ("mips" :largefile :little-endian)) ("ppc" ("ppc" :big-endian) ("ppc-thread" :big-endian :sb-thread)) @@ -32,7 +32,7 @@ ("x86-linux" :little-endian :largefile :sb-thread :linux :unix :elf :sb-thread)) ("x86-64" ("x86-64" :little-endian :avx2 :gencgc :sb-simd-pack :sb-simd-pack-256) ("x86-64-linux" :linux :unix :elf :little-endian :avx2 :gencgc :sb-simd-pack :sb-simd-pack-256) - ("x86-64-darwin" :darwin :bsd :unix :elf :little-endian :avx2 :gencgc + ("x86-64-darwin" :darwin :bsd :unix :mach-o :little-endian :avx2 :gencgc :sb-simd-pack :sb-simd-pack-256) ("x86-64-imm" :little-endian :avx2 :gencgc :sb-simd-pack :sb-simd-pack-256 :immobile-space) diff --git a/crossbuild-runner/Makefile b/crossbuild-runner/Makefile index 603070db3..b61af77af 100644 --- a/crossbuild-runner/Makefile +++ b/crossbuild-runner/Makefile @@ -15,7 +15,7 @@ obj/xbuild/arm64.core: obj/xbuild/arm64/xc.core $(SBCL) $(ARGS) arm64 < $(SCRIPT2) obj/xbuild/arm64-darwin/xc.core: $(DEPS1) - $(SBCL) $(ARGS) arm64-darwin arm64 "(:UNIX :LINUX :ELF :LITTLE-ENDIAN :SB-THREAD :DARWIN-JIT)" < $(SCRIPT1) + $(SBCL) $(ARGS) arm64-darwin arm64 "(:DARWIN :BSD :UNIX :MACH-O :LITTLE-ENDIAN :SB-THREAD :DARWIN-JIT)" < $(SCRIPT1) obj/xbuild/arm64-darwin.core: obj/xbuild/arm64-darwin/xc.core $(SBCL) $(ARGS) arm64-darwin < $(SCRIPT2) @@ -80,7 +80,7 @@ obj/xbuild/x86-64-linux.core: obj/xbuild/x86-64-linux/xc.core $(SBCL) $(ARGS) x86-64-linux < $(SCRIPT2) obj/xbuild/x86-64-darwin/xc.core: $(DEPS1) - $(SBCL) $(ARGS) x86-64-darwin x86-64 "(:DARWIN :BSD :UNIX :ELF :LITTLE-ENDIAN :AVX2 :GENCGC :SB-SIMD-PACK :SB-SIMD-PACK-256)" < $(SCRIPT1) + $(SBCL) $(ARGS) x86-64-darwin x86-64 "(:DARWIN :BSD :UNIX :MACH-O :LITTLE-ENDIAN :AVX2 :GENCGC :SB-SIMD-PACK :SB-SIMD-PACK-256)" < $(SCRIPT1) obj/xbuild/x86-64-darwin.core: obj/xbuild/x86-64-darwin/xc.core $(SBCL) $(ARGS) x86-64-darwin < $(SCRIPT2) diff --git a/crossbuild-runner/backends/arm64/stuff-groveled-from-headers.lisp b/crossbuild-runner/backends/arm64/linux-headers.lisp similarity index 100% rename from crossbuild-runner/backends/arm64/stuff-groveled-from-headers.lisp rename to crossbuild-runner/backends/arm64/linux-headers.lisp diff --git a/crossbuild-runner/pass-2.lisp b/crossbuild-runner/pass-2.lisp index 46442b2f1..b934e365c 100644 --- a/crossbuild-runner/pass-2.lisp +++ b/crossbuild-runner/pass-2.lisp @@ -20,19 +20,21 @@ (preload-perfect-hash-generator (perfect-hash-generator-journal :input)) ;;; Redefine STEM-SOURCE-PATH to take 'stuff-groveled-from-headers' from the -;;; architecture-dependent location, but otherwise the normal location. +;;; configuration-dependent location, but otherwise the normal locpation. (host-sb-int:encapsulate 'stem-source-path 'wrap (lambda (realfun stem) (if (string= stem "output/stuff-groveled-from-headers") - (let* ((arch (string-downcase (sb-cold::target-platform-keyword))) - (guess - (format nil "crossbuild-runner/backends/~a/stuff-groveled-from-headers.lisp" - arch))) - (cond ((probe-file guess) guess) - ((member :win32 sb-xc:*features*) - (format nil "crossbuild-runner/backends/~a/win32-headers.lisp" arch)) - (t - (format nil "crossbuild-runner/backends/~a/posix-headers.lisp" arch)))) + (let ((arch (string-downcase (sb-cold::target-platform-keyword)))) + (flet ((try (name &optional (check-existence t)) + (let ((fullname + (format nil "crossbuild-runner/backends/~a/~a.lisp" arch name))) + (when (or (not check-existence) (probe-file fullname)) + fullname)))) + (or (and (member :win32 sb-xc:*features*) (try "win32-headers")) + (and (member :linux sb-xc:*features*) (try "linux-headers")) + (and (member :darwin sb-xc:*features*) (try "darwin-headers")) + (try "posix-headers") + (try "stuff-groveled-from-headers" nil)))) (funcall realfun stem)))) (format t "~&Target features: ~S~%" sb-xc:*features*) diff --git a/xperfecthash63.lisp-expr b/xperfecthash63.lisp-expr index ca4398611..874a0c4fe 100644 --- a/xperfecthash63.lisp-expr +++ b/xperfecthash63.lisp-expr @@ -834,5 +834,74 @@ (#(1008808B 64688A38 B690AE2E D1146057 E0A39FB8) "(:BYTE :WORD :DWORD :QWORD NIL)" "( (& (- (>> val 4) (>> val 31)) 7))") +(#(7980B71D 7C678985 8010008B CD22F006) + "(NIL BASE-CHAR CHARACTER *)" + "( (& (>> val 7) 3) )") +(#(10ACE44E 74748736 8010008B 971A1DF1) + "(NIL FLOAT RATIONAL INTEGER)" + "( (& (>> val 2) 3) )") +(#(8010008B E022967D FB685091 FF5AE652) + "(NIL :HEAD :TAIL :BOTH)" + "( (& (>> val 14) 3) )") +(#(8010008B 905F66AC 92586CF4 9D5025AF) + "(:SPECIAL-FORM :MACRO :FUNCTION NIL)" + "( (^ (& (>> val 18) 3) (& (>> val 2) 1)) )") +(#(19627350 3932B57B 8010008B C3C1E2DD) + "(NIL NOTINLINE MAYBE-INLINE INLINE)" + "( (& (>> val 8) 3) )") +(#(12D85B02 47ED28C7 568510D9 8010008B EC8EB822) + "(NIL :FORTHCOMING-DEFCLASS-TYPE :INSTANCE :DEFINED :PRIMITIVE)" + "( (& (^ (>> val 7) (>> val 26)) 7))") +(#(55E45869 62971997 8010008B 8F406FFB) + "(:AUTO :IMMOBILE :DYNAMIC NIL)" + "( (& (>> val 4) 3) )") +(#(3C28E423 6610551C 8010008B A1DFDD0E A55DBD6F) + "(:DELETED :INITIAL :COMPLEX-TOPLEVEL :TOPLEVEL NIL)" + "( (& (+ (>> val 3) (>> val 16)) 7))") +(#(8010008B 8D87477C C8A25DB2 F987A176) + "(SB-C::INITIAL-UNUSED T SET NIL)" + "( (& (>> val 2) 3) )") +(#(BA54B74 2F740446 3C28E423 53DC2256 5AC1F5A1 659A1BF7 6F4E2B12 7F853C99 8010008B 8612A6FE A55DBD6F CF79C550) + "(:TOPLEVEL-XEP :ZOMBIE :ASSIGNMENT :MV-LET :LET :CLEANUP :ESCAPE :TOPLEVEL :EXTERNAL :DELETED :OPTIONAL NIL)" + "((let ((tab #a((8) (unsigned-byte 8) 12 0 13 11 5 10 2 3))) + (let ((b (& (>> val 18) #x7))) + (let ((a (>> (<< val 31) 29))) + (^ a (aref tab b))))))") +(#(8010008B 83A45D5A 90B78E0C C8A25DB2) + "(:COMPUTE-ONLY :FORCE-TO-STACK NIL T)" + "( (& (>> val 7) 3) )") +(#(519DD3CE 55B0F9E6 70E7C178 8010008B 92E00046) + "(:FIXED :KNOWN-RETURN :LOCAL-CALL :FULL-CALL NIL)" + "( (& (- val (>> val 19)) 7))") +(#(60574E06 7BC3707A 7F9752D2 8010008B) + "(:UNSPECIFIC :WILD :NEWEST NIL)" + "( (& (>> val 3) 3) )") +(#(60574E06 7F9752D2 8010008B ED8B5226) + "(:UNC :WILD :UNSPECIFIC NIL)" + "( (& (- val (>> val 4)) 3) )") +(#(7A03BEDF 8010008B 8E8B60F0 9D81B113 D8C1EE02 FBADBE01) + "(:NAMED :PREDICATE :COPIER :CONSTRUCTOR :CONC-NAME NIL)" + "( (& (- (>> val 6) (>> val 10)) 7))") +(#(3E421619 42F9EC4F 52ECC4FA 53C6AF8C 546D436A 8010008B D9F0FE17 E77DD8CF) + "(NIL :SUPERSEDE :APPEND :OVERWRITE :RENAME-AND-DELETE :RENAME :NEW-VERSION :ERROR)" + "( (& (- (>> val 4) (>> val 25)) 7))") +(#(2F740446 6F4E2B12 8010008B 8612A6FE CF79C550) + "(NIL :ESCAPE :CLEANUP :OPTIONAL :ASSIGNMENT)" + "( (& (^ (>> val 3) (>> val 13)) 7))") +(#(2F740446 3C28E423 7F853C99 8010008B 8612A6FE CF79C550) + "(:OPTIONAL :EXTERNAL :TOPLEVEL NIL :ESCAPE :CLEANUP)" + "( (& (+ (>> val 1) (>> val 10)) 7))") +(#(3C28E423 7F853C99 8010008B 8612A6FE CF79C550) + "(NIL :EXTERNAL :OPTIONAL :TOPLEVEL :CLEANUP)" + "( (& (- val (>> val 13)) 7))") +(#(B414EE0 3B3832EC 8010008B A256D8C6 E3479BD2) + "(:KEY-OR-VALUE :KEY-AND-VALUE :VALUE :KEY NIL)" + "( (& (>> val 2) 7))") +(#(8010008B C07E71ED E022967D E41ED3F1) + "(NIL :STRINGS :BOTH :SYMBOLS)" + "( (& (>> val 8) 3) )") +(#(90EDB7B 1FDE90F6 25164A63 50F5AB12 8010008B B800E558 C3EABF48) + "(:VERSION :TYPE :NAME :DIRECTORY :DEVICE :HOST NIL)" + "( (& (>> val 12) 7))") ) ;; EOF