Added more tests, function calls work

Fixed a bunch of bugs in other opcodes, too
This commit is contained in:
Mitchell Plamann
2015-03-28 19:14:10 -04:00
parent 6774610569
commit 9159cf1389
28 changed files with 412 additions and 28 deletions

23
test/dsquared.c0 Normal file
View File

@@ -0,0 +1,23 @@
int dsquared(int x, int y)
{
return x*x + y*y;
}
int main ()
{
int a1 = 15;
int b1 = 122;
int a2 = 42;
int b2 = 0;
int a3 = -7;
int b3 = -11;
int a4 = -4;
int b4 = 3;
int sum = 0;
sum = sum + dsquared(a1,b1);
sum = sum + dsquared(a2,b2);
sum = sum + dsquared(a3,b3);
sum = sum + dsquared(a4,b4);
return sum;
}