summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-08-09 17:55:05 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:30 -0400
commit29c5f508b9039af15f0485fb3555304f680e5f99 (patch)
tree173aa882f28e4a230f8528431045572156b0c539
parent89039dcac1300f211e5eba6577faae5353e35818 (diff)
downloadroux-29c5f508b9039af15f0485fb3555304f680e5f99.tar.gz
cosmetics
-rw-r--r--lisc/emit.c54
-rw-r--r--lisc/lisc.h4
-rw-r--r--lisc/parse.c2
3 files changed, 30 insertions, 30 deletions
diff --git a/lisc/emit.c b/lisc/emit.c
index 5b7547e..ce1ba8c 100644
--- a/lisc/emit.c
+++ b/lisc/emit.c
@@ -2,31 +2,31 @@
 
 
 static char *rtoa[] = {
-	[RXX] = "OH GOD!",
-	[RAX] = "rax",
-	[RBX] = "rbx",
-	[RCX] = "rcx",
-	[RDX] = "rdx",
-	[RSI] = "rsi",
-	[RDI] = "rdi",
-	[RBP] = "rbp",
-	[RSP] = "rsp",
-	[R8] = "r8",
-	[R9] = "r9",
-	[R10] = "r10",
-	[R11] = "r11",
-	[R12] = "r12",
-	[R13] = "r13",
-	[R14] = "r14",
-	[R15] = "r15",
-	[EAX] = "eax",
-	[EBX] = "ebx",
-	[ECX] = "ecx",
-	[EDX] = "edx",
-	[ESI] = "esi",
-	[EDI] = "edi",
-	[R8D] = "r8d",
-	[R9D] = "r9d",
+	[RXX ] = "OH GOD!",
+	[RAX ] = "rax",
+	[RBX ] = "rbx",
+	[RCX ] = "rcx",
+	[RDX ] = "rdx",
+	[RSI ] = "rsi",
+	[RDI ] = "rdi",
+	[RBP ] = "rbp",
+	[RSP ] = "rsp",
+	[R8  ] = "r8",
+	[R9  ] = "r9",
+	[R10 ] = "r10",
+	[R11 ] = "r11",
+	[R12 ] = "r12",
+	[R13 ] = "r13",
+	[R14 ] = "r14",
+	[R15 ] = "r15",
+	[EAX ] = "eax",
+	[EBX ] = "ebx",
+	[ECX ] = "ecx",
+	[EDX ] = "edx",
+	[ESI ] = "esi",
+	[EDI ] = "edi",
+	[R8D ] = "r8d",
+	[R9D ] = "r9d",
 	[R10D] = "r10d",
 	[R11D] = "r11d",
 	[R12D] = "r12d",
@@ -57,12 +57,12 @@ static char *rsub[][2] = {
 };
 
 static char *ctoa[NCmp] = {
-	[Ceq] = "e",
+	[Ceq ] = "e",
 	[Csle] = "le",
 	[Cslt] = "l",
 	[Csgt] = "g",
 	[Csge] = "ge",
-	[Cne] = "ne",
+	[Cne ] = "ne",
 };
 
 static int
diff --git a/lisc/lisc.h b/lisc/lisc.h
index 75069fe..2caadc4 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -121,7 +121,7 @@ enum {
 enum {
 	OXXX,
 
-	/* public instruction */
+	/* public instructions */
 	OAdd,
 	OSub,
 	ODiv,
@@ -158,7 +158,7 @@ enum {
 	JJnz,
 	JXJc,
 	JXJc1 = JXJc + NCmp-1,
-	JLast
+	NJmp
 };
 
 struct OpDesc {
diff --git a/lisc/parse.c b/lisc/parse.c
index d4a0a22..507244c 100644
--- a/lisc/parse.c
+++ b/lisc/parse.c
@@ -561,7 +561,7 @@ printref(Ref r, Fn *fn, FILE *f)
 void
 printfn(Fn *fn, FILE *f)
 {
-	static char *jtoa[JLast] = {
+	static char *jtoa[NJmp] = {
 		[JJnz]      = "jnz",
 		[JXJc+Ceq]  = "xjeq",
 		[JXJc+Csle] = "xjsle",