Implemented move with sign extension
This commit is contained in:
parent
32d7455c38
commit
f1d4e65c1b
5 changed files with 45 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
main() {
|
||||
syscall(60, f(-32))
|
||||
assert f(-32) == 32
|
||||
}
|
||||
|
||||
f(x) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
main() {
|
||||
a := -32
|
||||
b := 64
|
||||
syscall(60, a + b)
|
||||
assert a + b == 32
|
||||
}
|
|
@ -31,8 +31,8 @@ var programs = []struct {
|
|||
{"modulo", "", "", 0},
|
||||
{"modulo-assign", "", "", 0},
|
||||
{"division-split", "", "", 0},
|
||||
{"negative", "", "", 32},
|
||||
{"negation", "", "", 32},
|
||||
{"negative", "", "", 0},
|
||||
{"negation", "", "", 0},
|
||||
{"square-sum", "", "", 0},
|
||||
{"chained-calls", "", "", 0},
|
||||
{"nested-calls", "", "", 0},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue