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:
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
type :i3 = { w 3 }
|
||||
|
||||
export
|
||||
function :i3 $blit() {
|
||||
@start
|
||||
%l0 =l alloc4 12
|
||||
%l1 =l alloc4 12
|
||||
|
||||
storew 287454020, %l0
|
||||
%l04 =l add %l0, 4
|
||||
storew 1432778632, %l04
|
||||
%l08 =l add %l0, 8
|
||||
storew 2578103244, %l08
|
||||
|
||||
# we expect that %l0 and %l1
|
||||
# are coalesced and the blit
|
||||
# goes backwards
|
||||
%l11 =l add %l1, 1
|
||||
blit %l0, %l11, 11
|
||||
|
||||
storeb 221, %l1
|
||||
|
||||
ret %l1
|
||||
}
|
||||
|
||||
# >>> driver
|
||||
# struct i3 { int a, b, c; };
|
||||
# extern struct i3 blit();
|
||||
# int main() {
|
||||
# struct i3 s = blit();
|
||||
# return !(s.a == 0x223344dd
|
||||
# && s.b == 0x66778811
|
||||
# && s.c == 0xaabbcc55);
|
||||
# }
|
||||
# <<<
|
||||
Reference in New Issue
Block a user