summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-08-01 15:49:02 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:29 -0400
commitdff7044a2caba0dab6b0c140fcf60f29c0565996 (patch)
treebd23c4f4d46d6143e80e290004d13c23ecf84cf8
parent0d5fb419e3eda0832ee549d7958e19bb9afaa15a (diff)
downloadroux-dff7044a2caba0dab6b0c140fcf60f29c0565996.tar.gz
replace IA with X for x64 instructions
-rw-r--r--lisc/emit.c4
-rw-r--r--lisc/isel.c4
-rw-r--r--lisc/lisc.h4
-rw-r--r--lisc/parse.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/lisc/emit.c b/lisc/emit.c
index 54f552c..a006c12 100644
--- a/lisc/emit.c
+++ b/lisc/emit.c
@@ -81,10 +81,10 @@ eins(Ins i, Fn *fn, FILE *f)
case OSwap:
eop("xchg", i.arg[0], i.arg[1], fn, f);
break;
- case OIACltd:
+ case OXCltd:
fprintf(f, "\tcltd\n");
break;
- case OIADiv:
+ case OXDiv:
eop("idiv", i.arg[0], R, fn, f);
break;
case ONop:
diff --git a/lisc/isel.c b/lisc/isel.c
index e2d21ab..3ea935f 100644
--- a/lisc/isel.c
+++ b/lisc/isel.c
@@ -49,8 +49,8 @@ sel(Ins *i, Fn *fn)
r0 = SYM(t);
} else
r0 = i->arg[1];
- emit(OIADiv, R, r0, R);
- emit(OIACltd, SYM(RDX), R, R);
+ emit(OXDiv, R, r0, R);
+ emit(OXCltd, SYM(RDX), R, R);
emit(OCopy, SYM(RAX), i->arg[0], R);
if (rtype(i->arg[1]) == RCons)
emit(OCopy, r0, i->arg[1], R);
diff --git a/lisc/lisc.h b/lisc/lisc.h
index 4d70f31..374dcd3 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -94,8 +94,8 @@ enum {
ONop,
OCopy,
OSwap,
- OIACltd,
- OIADiv,
+ OXCltd,
+ OXDiv,
OLast
};
diff --git a/lisc/parse.c b/lisc/parse.c
index 731b51f..79b0c73 100644
--- a/lisc/parse.c
+++ b/lisc/parse.c
@@ -21,8 +21,8 @@ OpDesc opdesc[OLast] = {
[ONop] = { "nop", 0, U },
[OCopy] = { "copy", 1, U },
[OSwap] = { "swap", 2, T },
- [OIADiv] = { "iadiv", 1, U },
- [OIACltd] = { "iacltd", 0, U },
+ [OXDiv] = { "xdiv", 1, U },
+ [OXCltd] = { "xcltd", 0, U },
};
typedef enum {