Functions in X86

This commit is contained in:
Dmitry Boulytchev 2018-04-11 00:47:46 +03:00
parent 8907ab2119
commit b19bea4d58
13 changed files with 126 additions and 67 deletions

View file

@ -7,7 +7,7 @@ RC=../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
# @$(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@$(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log

View file

@ -7,7 +7,7 @@ RC = ../../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
# @RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log

View file

@ -7,7 +7,7 @@ RC = ../../src/rc.opt
check: $(TESTS)
$(TESTS): %: %.expr
# @RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@RC_RUNTIME=../../runtime $(RC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -i $< > $@.log && diff $@.log orig/$@.log
@cat $@.input | $(RC) -s $< > $@.log && diff $@.log orig/$@.log

View file

@ -6,6 +6,8 @@ fun test2 (b) {
a := b
}
read (x);
test1 ();
write (a);

View file

@ -16,6 +16,8 @@ fun print () {
write (c)
}
read (x);
a := 100;
b := 200;
c := 300;

View file

@ -19,6 +19,8 @@ fun print () {
write (c)
}
read (x);
a := 100;
b := 200;
c := 300;

View file

@ -1 +1 @@
0
0

View file

@ -21,6 +21,8 @@ fun test2 (b) {
print ()
}
read (x);
a := 100;
b := 200;
c := 300;

View file

@ -5,6 +5,8 @@ fun ack (m, n) {
fi
}
read (x);
for m := 0, m <= 3, m := m+1 do
for n := 0, n <= 8, n := n+1 do
write (ack (m, n))

View file

@ -8,5 +8,7 @@ fun test (n, m) local i, s {
return s
}
read (x);
write (test (10, 100));
write (test (100, 10))