commit e6048212be65159d865c41a803b2c4b3e075ff49
parent fff669e54a5e10ce42ffa6b3e3d85d8081782813
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Fri, 18 Sep 2015 12:27:50 -0400
use new function syntax in tests
Diffstat:
18 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/lisc/parse.c b/lisc/parse.c
@@ -824,7 +824,7 @@ printfn(Fn *fn, FILE *f)
Ins *i;
uint n;
- fprintf(f, "function $%s {\n", fn->name);
+ fprintf(f, "function $%s() {\n", fn->name);
for (b=fn->start; b; b=b->link) {
fprintf(f, "@%s\n", b->name);
for (p=b->phi; p; p=p->link) {
diff --git a/lisc/test/align.ssa b/lisc/test/align.ssa
@@ -1,4 +1,4 @@
-function $test {
+function $test() {
@start
%x =l alloc16 16
%y =l add %x, 8
diff --git a/lisc/test/alt.ssa b/lisc/test/alt.ssa
@@ -2,7 +2,7 @@
# flow graph that exposes poor
# handling of looping constructs
-function $test {
+function $test() {
@start
%ten =w copy 10
%dum =w copy 0 # dummy live-through temporary
diff --git a/lisc/test/collatz.ssa b/lisc/test/collatz.ssa
@@ -3,7 +3,7 @@
# we use a fast local array to
# memoize small collatz numbers
-function $test {
+function $test() {
@start
%mem =l alloc4 4000
@loop
diff --git a/lisc/test/cprime.ssa b/lisc/test/cprime.ssa
@@ -2,7 +2,7 @@
# compiler from the C program
# following in comments
-function $test {
+function $test() {
@start
%v0 =l alloc8 4
%v1 =l alloc8 4
diff --git a/lisc/test/cup.ssa b/lisc/test/cup.ssa
@@ -1,6 +1,6 @@
# counts up from -1988 to 1991
-function $test {
+function $test() {
@start
@loop
%n0 =l phi @start -1988, @loop %n1
diff --git a/lisc/test/eucl.ssa b/lisc/test/eucl.ssa
@@ -3,7 +3,7 @@
# ssa program because of the
# swap of b and a
-function $test {
+function $test() {
@start
@loop
diff --git a/lisc/test/fix1.ssa b/lisc/test/fix1.ssa
@@ -1,4 +1,4 @@
-function $test {
+function $test() {
@start
%x =w copy 1
@loop
diff --git a/lisc/test/fix2.ssa b/lisc/test/fix2.ssa
@@ -1,4 +1,4 @@
-function $test {
+function $test() {
@start
%x =w copy 1
@loop
diff --git a/lisc/test/live.ssa b/lisc/test/live.ssa
@@ -5,7 +5,7 @@
#
# nothing should ever be live at the entry
-function $test {
+function $test() {
@start
%b =w copy 0
%x =w copy 10
diff --git a/lisc/test/loop.ssa b/lisc/test/loop.ssa
@@ -1,7 +1,7 @@
# simple looping program
# sums all integers from 100 to 0
-function $test {
+function $test() {
@start
@loop
diff --git a/lisc/test/max.ssa b/lisc/test/max.ssa
@@ -5,7 +5,7 @@
# b input array
# a output max
-function $test {
+function $test() {
@start
@loop
%max =w phi @start -1, @new %byt, @old %max
diff --git a/lisc/test/prime.ssa b/lisc/test/prime.ssa
@@ -1,7 +1,7 @@
# find the 10,001st prime
# store it in a
-function $test {
+function $test() {
@start
@loop
%n =w phi @start 5, @tloop %n, @yes %n1
diff --git a/lisc/test/puts10.ssa b/lisc/test/puts10.ssa
@@ -1,9 +1,9 @@
-function $test {
+function $test() {
@start
%y =l alloc4 4
%y1 =l add %y, 1
storeb 0, %y1
-@loop
+@loop
%n =w phi @start 0, @loop %n1
%c =w add %n, 48
storeb %c, %y
diff --git a/lisc/test/rpo.ssa b/lisc/test/rpo.ssa
@@ -1,4 +1,4 @@
-function $test {
+function $test() {
@start
jmp @foo
@baz
diff --git a/lisc/test/spill.ssa b/lisc/test/spill.ssa
@@ -9,7 +9,7 @@
# spill
#
-function $test {
+function $test() {
@start
%f =w copy 0 # here
%b =w copy 1
diff --git a/lisc/test/spill1.ssa b/lisc/test/spill1.ssa
@@ -1,6 +1,6 @@
# stupid spilling test
-function $test {
+function $test() {
@start
%x1 =w copy 10
%x2 =w add %x1, %x1
diff --git a/lisc/test/spill2.ssa b/lisc/test/spill2.ssa
@@ -4,7 +4,7 @@
# run with NReg == 3, or
# adapt it!
-function $test {
+function $test() {
@start
%a =w copy 0
%b =w copy 0