summary refs log tree commit diff
path: root/rega.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-20 09:47:38 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-20 09:56:29 -0400
commit657c3fa66b5700a1fde89fbd8c92cd9dc56eea3b (patch)
tree3a26376d76d86df68f31abeadcc91b040a9bd921 /rega.c
parentb7debc4e7f5d50a89214421a704864a30a291cdc (diff)
downloadroux-657c3fa66b5700a1fde89fbd8c92cd9dc56eea3b.tar.gz
match jumps/ops with il text
Diffstat (limited to 'rega.c')
-rw-r--r--rega.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/rega.c b/rega.c
index 2fac0d8..da4e9e5 100644
--- a/rega.c
+++ b/rega.c
@@ -224,10 +224,10 @@ pmrec(enum PMStat *status, int i, int *k)
 	}
 	status[i] = Moved;
 	if (req(swp, R)) {
-		*curi++ = (Ins){OCopy, pm[i].dst, {pm[i].src}, pm[i].cls};
+		*curi++ = (Ins){Ocopy, pm[i].dst, {pm[i].src}, pm[i].cls};
 		return R;
 	} else if (!req(swp, pm[i].src)) {
-		*curi++ = (Ins){OSwap, R, {pm[i].src, pm[i].dst}, *k};
+		*curi++ = (Ins){Oswap, R, {pm[i].src, pm[i].dst}, *k};
 		return swp;
 	} else
 		return R;
@@ -273,7 +273,7 @@ move(int r, Ref to, RMap *m)
 static int
 regcpy(Ins *i)
 {
-	return i->op == OCopy && isreg(i->arg[0]);
+	return i->op == Ocopy && isreg(i->arg[0]);
 }
 
 static Ins *
@@ -291,7 +291,7 @@ dopm(Blk *b, Ins *i, RMap *m)
 		move(i->arg[0].val, i->to, m);
 	} while (i != b->ins && regcpy(i-1));
 	assert(m0.n <= m->n);
-	if (i != b->ins && (i-1)->op == OCall) {
+	if (i != b->ins && (i-1)->op == Ocall) {
 		def = retregs((i-1)->arg[1], 0);
 		for (r=0; r<NRSave; r++)
 			if (!(BIT(rsave[r]) & def))
@@ -371,13 +371,13 @@ doblk(Blk *b, RMap *cur)
 	}
 	for (i=&b->ins[b->nins]; i!=b->ins;) {
 		switch ((--i)->op) {
-		case OCall:
+		case Ocall:
 			rs = argregs(i->arg[1], 0);
 			for (r=0; r<NRSave; r++)
 				if (!(BIT(rsave[r]) & rs))
 					rfree(cur, rsave[r]);
 			break;
-		case OCopy:
+		case Ocopy:
 			if (isreg(i->arg[0])) {
 				i = dopm(b, i, cur);
 				continue;
@@ -391,7 +391,7 @@ doblk(Blk *b, RMap *cur)
 				assert(rtype(i->to) == RTmp);
 				r = rfree(cur, i->to.val);
 				if (r == -1 && !isreg(i->to)) {
-					*i = (Ins){.op = ONop};
+					*i = (Ins){.op = Onop};
 					continue;
 				}
 				if (i->to.val >= Tmp0)
@@ -447,7 +447,7 @@ rega(Fn *fn)
 	for (t=Tmp0; t<fn->ntmp; t++)
 		*hint(t) = -1;
 	for (b=fn->start, i=b->ins; i-b->ins < b->nins; i++)
-		if (i->op != OCopy || !isreg(i->arg[0]))
+		if (i->op != Ocopy || !isreg(i->arg[0]))
 			break;
 		else {
 			assert(rtype(i->to) == RTmp);
@@ -507,7 +507,7 @@ rega(Fn *fn)
 					rfree(&cur, t);
 					radd(&cur, t, r);
 					x = tmp[t].cls;
-					emit(OCopy, x, TMP(r1), TMP(r), R);
+					emit(Ocopy, x, TMP(r1), TMP(r), R);
 				}
 			}
 			if ((j = &insb[NIns] - curi)) {
@@ -569,7 +569,7 @@ rega(Fn *fn)
 			sprintf(b1->name, "%s_%s", b->name, s->name);
 			b1->nins = curi - insb;
 			idup(&b1->ins, insb, b1->nins);
-			b1->jmp.type = JJmp;
+			b1->jmp.type = Jjmp;
 			b1->s1 = s;
 			**ps = b1;
 		}