Add macos-amd64 reference files for darwin x86_64#1215
Merged
Conversation
The new MacOS/x86_64 CI job surfaced 22 test cases whose output legitimately differs on darwin x86_64. Add specialized macos-amd64 ref variants: - 21 ir-code[-O2]-macos-amd64.ll files (irgenerator/* and benchmark): host C++ stdlib argument-evaluation order (libstdc++ vs libc++), differing std::hash values for typeid/TBAA/TySan, and ELF-vs-Mach-O codegen (comdat, llvm.global_ctors, ASAN shadow offset, __asan_register_elf_globals). - 2 exception-macos-amd64.out files (typechecker/imports): the import search-path suffix in the error message (_darwin_x86_64 / _darwin); these cases previously had no macOS x86_64 variant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The new MacOS/x86_64 CI job failed IRGeneratorTests.builtins_successSyscall because the import search path (syscall_darwin_x86_64 / syscall_darwin / syscall) had no matching file. Add syscall_darwin_x86_64.spice with the Darwin BSD-class syscall numbers, which are architecture-independent and therefore identical to the existing syscall_darwin_aarch64.spice table. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The macOS x86_64 syscall asm template emitted "movq $(33554432 + 0), %rax". In LLVM inline asm "$(" is a dialect-variant marker (stripped by the parser), and the trailing operand index was a literal instead of an operand reference, producing the invalid "movq 33554432 + 0), %rax" reported by the MC assembler.
Load the syscall number operand into %rax as usual, then add the BSD syscall-class offset (0x2000000) with a properly escaped immediate ($$ -> literal $).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The new MacOS/x86_64 CI job (added in #1210) surfaced 22 test cases whose compiler output legitimately differs on darwin + x86_64. This adds specialized
macos-amd64reference variants so those cases pass on the new runner without affecting any other platform.The refs were reconstructed from the failing job's logged actual output and verified to differ from the existing (Linux x86_64) refs only in the platform-specific lines.
What differs on darwin x86_64
ir-code[-O2]-macos-amd64.ll(irgenerator/*,benchmark/success-pidigits):std::hashvalues →typeid/ TBAA / TySan type-id constantscomdatusage,@llvm.global_ctors, ASAN shadow offset (0x7fff8000→0x100000000000), dropped__asan_register_elf_globalsexception-macos-amd64.out(typechecker/imports/error-imported-{std,file}-not-existing): the import search-path suffix in the error message (_darwin_x86_64/_darwin). These cases previously had no macOS x86_64 variant at all (onlymacos-aarch64).Notes
x86Only, so the genericir-code.llis the Linux x86_64 ref and AArch64 never compares it — which is why only this new OS+arch combination broke.!DIFile(...)lines (erased at compare time) were preserved so the variants stay structurally parallel to the Linux refs.🤖 Generated with Claude Code