test: group examples into per-category folders
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.
This commit is contained in:
20
examples/platform/1647-platform-asm-aarch64-multi.sx
Normal file
20
examples/platform/1647-platform-asm-aarch64-multi.sx
Normal file
@@ -0,0 +1,20 @@
|
||||
// ASM stream Phase E — multi-output asm that RUNS end-to-end on aarch64. Splits
|
||||
// a value into low/high bytes via two value outputs, returned + destructured as
|
||||
// a `(lo, hi)` tuple. The two outputs become an LLVM `{ i64, i64 }` struct =
|
||||
// sx's tuple. aarch64-pinned via `.build`: executes on a matching host (exit
|
||||
// reflects lo+hi), ir-only elsewhere.
|
||||
split :: (x: u64) -> (lo: u64, hi: u64) {
|
||||
return asm {
|
||||
#string ASM
|
||||
and %[l], %[x], #0xff
|
||||
lsr %[h], %[x], #8
|
||||
ASM,
|
||||
[l] "=r" -> u64,
|
||||
[h] "=r" -> u64,
|
||||
[x] "r" = x,
|
||||
};
|
||||
}
|
||||
main :: () -> i64 {
|
||||
lo, hi := split(0x1234);
|
||||
return xx (lo + hi); // 0x34 + 0x12 = 52 + 18 = 70
|
||||
}
|
||||
Reference in New Issue
Block a user