Files
bux-lang/vendor/qbe/test/abi2.ssa
T
dimgigov eb8179b6d0 fix(qbe): any-child terminator check in QBE_IsTerminator for hBlock — QBE SSA now fully valid
- QBE_IsTerminator(hBlock) checks ALL children, not just last
- Removed legacy c_backend.bux and nim_backend.bux from _selfhost/src/
- QBE self-hosting QBE phase: PASSES (SSA valid, assembled to .s)
- Remaining: linker errors from missing String_Eq/StringBuilder in runtime
2026-06-02 13:56:12 +03:00

20 lines
413 B
Plaintext

type :fps = { s, b, s }
export
function s $sum(:fps %p) {
@start
%f1 =s load %p
%p8 =l add 8, %p
%f2 =s load %p8
%s =s add %f1, %f2
ret %s
}
# >>> driver
# typedef struct { float f1; char b; float f2; } fps;
# extern float sum(fps);
# int main() { fps x = { 1.23, -1, 2.34 }; return !(sum(x) == 1.23f+2.34f); }
# /* Note the f suffixes above are important
# * otherwise C does double operations. */
# <<<