shithub: scc

Download patch

ref: ffc1d8068bbe61041c23aaccfa2457280ed97c27
parent: e02c78834f4beb50cf32a87f4141da46e823fa4a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Mar 15 06:08:31 EDT 2015

Add INC assmbler instruction to cc2

--- a/cc2/cc2.h
+++ b/cc2/cc2.h
@@ -108,7 +108,7 @@
 
 
 enum {
-	LDW, LDL, LDH, MOV, ADD, PUSH, POP, RET, NOP
+	LDW, LDL, LDH, MOV, ADD, PUSH, POP, RET, NOP, INC
 };
 
 enum {
--- a/cc2/code.c
+++ b/cc2/code.c
@@ -29,7 +29,8 @@
 	[PUSH] = inst1,
 	[POP] = inst1,
 	[RET] = inst0,
-	[NOP] = inst0
+	[NOP] = inst0,
+	[INC] = inst1
 };
 
 static char *insttext[] = {
@@ -41,7 +42,8 @@
 	[PUSH] = "PUSH",
 	[POP] = "POP",
 	[RET] = "RET",
-	[NOP] = "NOP"
+	[NOP] = "NOP",
+	[INC] = "INC"
 };
 
 typedef struct inst Inst;
--