Move examples/*.sx and their expected/ snapshots into per-category subfolders (examples/<category>/...). Folder = leading filename token, with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus runner and LSP sweep now discover each category's expected/ dir, while issues/ stays flat. Example 1058's repo-root-relative companion import is made file-relative. Path strings embedded in 164 snapshots were regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
11 lines
655 B
Plaintext
11 lines
655 B
Plaintext
// ASM stream Phase D — inline assembly that RUNS end-to-end. An aarch64 `add`
|
|
// with two register-class inputs (`%[a]`, `%[b]`) and a value output (`%[out]`)
|
|
// returned from the function. The `.build` pins aarch64-macOS: on a matching
|
|
// host the runner executes it (exit 42); elsewhere it falls to ir-only mode and
|
|
// asserts the `.ir` snapshot (the inline_asm op + LLVM `call asm` are target-
|
|
// independent in the IR text). Regression for the full lower→emit→JIT path.
|
|
add_asm :: (a: i64, b: i64) -> i64 {
|
|
return asm { "add %[out], %[a], %[b]", [out] "=r" -> i64, [a] "r" = a, [b] "r" = b };
|
|
}
|
|
main :: () -> i64 { return add_asm(40, 2); }
|