new blit instruction
This commit is contained in:
parent
15e25a61b3
commit
26c1c30b7d
16 changed files with 398 additions and 103 deletions
35
test/mem1.ssa
Normal file
35
test/mem1.ssa
Normal file
|
@ -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);
|
||||
# }
|
||||
# <<<
|
Loading…
Add table
Add a link
Reference in a new issue