summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lisc/lisc.h16
-rw-r--r--lisc/parse.c10
2 files changed, 11 insertions, 15 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h
index 7e8b75a..66f12ad 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -52,24 +52,20 @@ enum {
 #define CONST(x) (Ref){RConst, x}
 
 static inline int req(Ref a, Ref b)
-{
-	return a.type == b.type && a.val == b.val;
-}
+{ return a.type == b.type && a.val == b.val; }
 static inline int rtype(Ref r)
-{
-	return req(r, R) ? -1 : r.type;
-}
+{ return req(r, R) ? -1 : r.type; }
 
 enum {
 	OXXX = 0,
+	/* public instruction */
 	OAdd,
 	OSub,
 	ODiv,
-	OMod,
-	OCopy,
-
+	ORem,
 	/* reserved instructions */
-	OX86Div,
+	OCopy,
+	OXDiv,
 	OLast
 };
 
diff --git a/lisc/parse.c b/lisc/parse.c
index 7a9da59..6f5a030 100644
--- a/lisc/parse.c
+++ b/lisc/parse.c
@@ -13,7 +13,7 @@ OpDesc opdesc[OLast] = {
 	[OAdd] = { 2, 1, "add" },
 	[OSub] = { 2, 0, "sub" },
 	[ODiv] = { 2, 0, "div" },
-	[OMod] = { 2, 0, "mod" },
+	[ORem] = { 2, 0, "mod" },
 	[OCopy] = { 1, 0, "copy" },
 };
 
@@ -31,7 +31,7 @@ typedef enum {
 	TAdd,
 	TSub,
 	TDiv,
-	TMod,
+	TRem,
 	TPhi,
 	TJmp,
 	TJez,
@@ -97,7 +97,7 @@ lex()
 		{ "add", TAdd },
 		{ "sub", TSub },
 		{ "div", TDiv },
-		{ "mod", TMod },
+		{ "rem", TRem },
 		{ "phi", TPhi },
 		{ "jmp", TJmp },
 		{ "jez", TJez },
@@ -372,8 +372,8 @@ parseline(PState ps)
 	case TDiv:
 		op = ODiv;
 		break;
-	case TMod:
-		op = OMod;
+	case TRem:
+		op = ORem;
 		break;
 	case TPhi:
 		if (ps != PPhi)