Files
bux-lang/vendor/qbe/test/_fix4.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

28 lines
353 B
Plaintext

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
}