# HG changeset patch # User William Astle # Date 1519876493 25200 # Node ID c8d4f3486ad7fe596857a5b2075f4b7d52bcca7c # Parent 3d53f2e8d0e00500552a524445a531c00cc9bdba Make 6309/6809 warnings work again. Previous commit broke 6809/6309 instruction warnings. diff -r 3d53f2e8d0e0 -r c8d4f3486ad7 lwasm/pass1.c --- a/lwasm/pass1.c Wed Feb 28 20:43:14 2018 -0700 +++ b/lwasm/pass1.c Wed Feb 28 20:54:53 2018 -0700 @@ -332,10 +332,9 @@ } if (instab[opnum].opcode == NULL || - ( (CURPRAGMA(cl, PRAGMA_6809) && (instab[opnum].flags & lwasm_insn_is6309)) || (!CURPRAGMA(cl, PRAGMA_6809) && (instab[opnum].flags & lwasm_insn_is6809)) - )) + ) { cl -> insn = -1; if (*tok != ';' && *tok != '*') @@ -348,7 +347,12 @@ if (expand_struct(as, cl, &p1, sym) != 0) { // structure expansion failed - lwasm_register_error(as, cl, E_OPCODE_BAD); + if (CURPRAGMA(cl, PRAGMA_6809) && (instab[opnum].flags & lwasm_insn_is6309)) + lwasm_register_error2(as, cl, E_6309_INVALID, "(%s)", sym); + else if (!CURPRAGMA(cl, PRAGMA_6809) && (instab[opnum].flags & lwasm_insn_is6809)) + lwasm_register_error2(as, cl, E_6809_INVALID, "(%s)", sym); + else + lwasm_register_error(as, cl, E_OPCODE_BAD); } } }