changeset 171:d59f17580e8b

Actually check for 6309 instructions when in 6809 mode. Thanks to adamgr on IRC for finding the problem.
author lost@l-w.ca
date Fri, 02 Sep 2011 18:10:26 -0600
parents 372d7c881831
children a88b04ba5ab8
files lwasm/pass1.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/pass1.c	Mon Aug 29 19:18:23 2011 -0600
+++ b/lwasm/pass1.c	Fri Sep 02 18:10:26 2011 -0600
@@ -274,6 +274,8 @@
 				if (!strcasecmp(instab[opnum].opcode, sym))
 					break;
 			}
+			if ((as -> target == TARGET_6309) && (instab[opnum].flags & lwasm_insn_is6309))
+				lwasm_register_error(as, cl, "Illegal use of 6309 instruction in 6809 mode (%s)", sym);
 			
 			// have to go to linedone here in case there was a symbol
 			// to register on this line