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
+27
View File
@@ -0,0 +1,27 @@
function $test() {
@start
%x =w copy 3
%n =w copy 2
@loop
%c =w ceqw %n, 10000
jnz %c, @end, @next
@next
%t =w copy 3
%x =w add %x, 2
@tloop
%s =w mul %t, %t
%c =w csgtw %s, %x
jnz %c, @prime, @test
@test
%r =w rem %x, %t
jnz %r, @tnext, @loop
@tnext
%t =w add %t, 2
jmp @tloop
@prime
%n =w add %n, 1
jmp @loop
@end
storew %x, $a
ret
}