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
This commit is contained in:
2026-06-02 13:56:12 +03:00
parent 6cb5528a4d
commit eb8179b6d0
142 changed files with 70706 additions and 1407 deletions
+25
View File
@@ -0,0 +1,25 @@
export
function $test() {
@start
%x1 =d copy d_0.1
%x2 =d add d_0.2, %x1
%x3 =d sub %x2, d_0.3
@loop
%x4 =d phi @start %x3, @loop %x5
%i1 =w phi @start 0, @loop %i2
%x5 =d add %x4, %x4
%i2 =w add %i1, 1
%c0 =w cled %x5, 4607182418800017408 # d_1.0
jnz %c0, @loop, @end
@end
storew %i2, $a
ret
}
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 55); }
# <<<