diff lwasm/insn_gen.c @ 383:848d3cca8078

Fixed imm8 to actually use expression and also fixed gen mode to respect > and <
author lost@starbug
date Sat, 15 May 2010 20:01:58 -0600
parents eacdae8a1575
children b8549694b4c9
line wrap: on
line diff
--- a/lwasm/insn_gen.c	Sat May 15 13:39:21 2010 -0600
+++ b/lwasm/insn_gen.c	Sat May 15 20:01:58 2010 -0600
@@ -94,6 +94,9 @@
 		goto out;
 	}
 
+	if (l -> lint2 != -1)
+		goto out;
+
 	// if we have a constant now, figure out dp vs nondp
 	if (lw_expr_istype(s, lw_expr_type_int))
 	{
@@ -435,5 +438,6 @@
 	lw_expr_t e;
 	
 	lwasm_emitop(l, instab[l -> insn].ops[0]);
+	e = lwasm_fetch_expr(l, 0);
 	lwasm_emitexpr(l, e, 1);
 }