Implemented loads with register offsets
This commit is contained in:
parent
c86766bd33
commit
144810c6c8
13 changed files with 320 additions and 145 deletions
20
tests/programs/array-index-static.q
Normal file
20
tests/programs/array-index-static.q
Normal file
|
@ -0,0 +1,20 @@
|
|||
import mem
|
||||
|
||||
main() {
|
||||
a := mem.alloc(4)
|
||||
|
||||
assert a[0] == 0
|
||||
assert a[1] == 0
|
||||
assert a[2] == 0
|
||||
assert a[3] == 0
|
||||
|
||||
a[0] = 0
|
||||
a[1] = 1
|
||||
a[2] = 2
|
||||
a[3] = 3
|
||||
|
||||
assert a[0] == 0
|
||||
assert a[1] == 1
|
||||
assert a[2] == 2
|
||||
assert a[3] == 3
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue