diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-21 11:35:53 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-21 11:35:53 -0500 |
commit | 420bf4cc8b74c8d7226b504baa022561f3a18574 (patch) | |
tree | 51ea7c0ee297fcae557fca79e639d2895b9ebfd1 /lisc/isel.c | |
parent | 3983c206f9103fcb11db3f91b4a4da1b71f44526 (diff) | |
download | roux-420bf4cc8b74c8d7226b504baa022561f3a18574.tar.gz |
genius or idiot?
Diffstat (limited to 'lisc/isel.c')
-rw-r--r-- | lisc/isel.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/lisc/isel.c b/lisc/isel.c index c2d92d1..eb7906c 100644 --- a/lisc/isel.c +++ b/lisc/isel.c @@ -50,23 +50,23 @@ static int iscmp(int op, int *k, int *c) { if (OCmpw <= op && op <= OCmpw1) { - *c = op - OCmpw; - *k = Kw; + c && (*c = op - OCmpw); + k && (*k = Kw); return 1; } if (OCmpl <= op && op <= OCmpl1) { - *c = op - OCmpl; - *k = Kl; + c && (*c = op - OCmpl); + k && (*k = Kl); return 1; } if (OCmps <= op && op <= OCmps1) { - *c = fcmptoi(op - OCmps); - *k = Ks; + c && (*c = fcmptoi(op - OCmps)); + k && (*k = Ks); return 1; } if (OCmpd <= op && op <= OCmpd1) { - *c = fcmptoi(op - OCmpd); - *k = Kd; + c && (*c = fcmptoi(op - OCmpd)); + k && (*k = Kd); return 1; } return 0; @@ -336,10 +336,7 @@ flagi(Ins *i0, Ins *i) while (i>i0) switch ((--i)->op) { default: - if ((OCmpw <= i->op && i->op <= OCmpw1) - || (OCmpl <= i->op && i->op <= OCmpl1) - || (OCmps <= i->op && i->op <= OCmps1) - || (OCmpd <= i->op && i->op <= OCmpd1)) + if (iscmp(i->op, 0, 0)) return i; if (isext(i->op) || isload(i->op)) continue; |