ref: 6043574976f7135190d98a100db3519a65850d55
parent: 5beec1cadbf562073ea57e65337cca33b36a4627
author: Ori Bernstein <[email protected]>
date: Tue Jun 5 22:10:06 EDT 2012
Make the fibonacci function work. Use the right comparison operators for testing stuff.
--- a/8/isel.c
+++ b/8/isel.c
@@ -80,8 +80,8 @@
AsmOp getflag;
} reloptab[Numops] = {
[Olnot] = {Itest, Ijz, Isetz},
- [Oeq] = {Itest, Ijnz, Isetnz},
- [One] = {Itest, Ijz, Isetz},
+ [Oeq] = {Icmp, Ijz, Isetz},
+ [One] = {Icmp, Ijnz, Isetnz},
[Ogt] = {Icmp, Ijg, Isetgt},
[Oge] = {Icmp, Ijge, Isetge},
[Olt] = {Icmp, Ijl, Isetlt},
--- a/test/fib.myr
+++ b/test/fib.myr
@@ -9,6 +9,6 @@
}
const main = {
- -> fib(2)
+ -> fib(8)
}
--- a/test/test.sh
+++ b/test/test.sh
@@ -25,4 +25,4 @@
returns array 7
returns call 42
returns loop 45
-returns fib 8
+returns fib 21