commit c92b0268fdbf45962a52087438afca1289cd3aae
parent 610e03f6d07d341e6d2aaa6ce3811bb5d3451b44
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 9 Feb 2016 16:56:36 -0500
add one case in address matching
Diffstat:
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/lisc/isel.c b/lisc/isel.c
@@ -691,13 +691,15 @@ anumber(ANum *ai, Blk *b, Con *con)
[2] [2] = 2, /* folding */
[2] [5] = 5, [5] [2] = 5,
[2] [6] = 6, [6] [2] = 6,
- [0] [0] = 4, /* b + s * i */
- /* [0] [1] = 4, [1] [0] = 4, */
+ [2] [7] = 7, [7] [2] = 7,
+ [0] [0] = 4, /* 4: b + s * i */
[0] [3] = 4, [3] [0] = 4,
- [2] [3] = 5, [3] [2] = 5, /* o + s * i */
- [2] [4] = 6, [4] [2] = 6, /* o + b + s * i */
- [0] [5] = 6, [5] [0] = 6,
- /* [1] [5] = 6, [5] [1] = 6, */
+ [2] [3] = 5, [3] [2] = 5, /* 5: o + s * i */
+ [0] [2] = 6, [2] [0] = 6, /* 6: o + b */
+ [2] [4] = 7, [4] [2] = 7, /* 7: o + b + s * i */
+ [0] [5] = 7, [5] [0] = 7,
+ [6] [3] = 7, [3] [6] = 7,
+
};
int a, a1, a2, n1, n2, t1, t2;
Ins *i;
@@ -792,7 +794,8 @@ amatch(Addr *a, Ref r, ANum *ai, Fn *fn, int top)
break;
case 2: /* constants */
case 5: /* o + s * i */
- case 6: /* o + b + s * i */
+ case 6: /* o + b */
+ case 7: /* o + b + s * i */
amatch(a, ar, ai, fn, 0);
amatch(a, al, ai, fn, 0);
break;