summary refs log tree commit diff
path: root/lisc/lisc.h
diff options
context:
space:
mode:
Diffstat (limited to 'lisc/lisc.h')
-rw-r--r--lisc/lisc.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h
index 374dcd3..d8ef273 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -19,22 +19,25 @@ typedef struct Fn Fn;
 typedef enum { U, F, T } B3;
 
 enum {
-	RAX = 1,
+	RAX = 1, /* caller-save */
 	RCX,
 	RDX,
 	RSI,
 	RDI,
-	RBX,
 	R8,
 	R9,
 	R10,
 	R11,
+
+	RBX, /* callee-save */
 	R12,
 	R13,
 	R14,
 	R15,
-	RSP, /* reserved */
+
 	RBP, /* reserved */
+	RSP,
+
 	// NReg = R15 - RAX + 1
 	NReg = 3 /* for test purposes */
 };
@@ -94,12 +97,18 @@ enum {
 	ONop,
 	OCopy,
 	OSwap,
-	OXCltd,
+	OSign,
 	OXDiv,
 	OLast
 };
 
 enum {
+	CXXX,
+	CWord,
+	CLong,
+};
+
+enum {
 	JXXX,
 	JRet,
 	JJmp,
@@ -155,6 +164,7 @@ struct Sym {
 		STmp,
 	} type;
 	char name[NString];
+	int class;
 	uint ndef, nuse;
 	uint cost;
 	uint spill;