Mercurial > hg > index.cgi
comparison lwasm/pass1.c @ 212:b0d53e2f3f53
Make --6309/--6809 work properly
Fixed an inverted test that checked for 6809/6309 mode incorrectly. This
also fixes the fact that 6309 mode was not the default as per the
documentation.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 09 Jun 2012 23:17:43 -0600 |
parents | d59f17580e8b |
children | afd50d6b4113 |
comparison
equal
deleted
inserted
replaced
211:6f2e18f1fe67 | 212:b0d53e2f3f53 |
---|---|
272 for (opnum = 0; instab[opnum].opcode; opnum++) | 272 for (opnum = 0; instab[opnum].opcode; opnum++) |
273 { | 273 { |
274 if (!strcasecmp(instab[opnum].opcode, sym)) | 274 if (!strcasecmp(instab[opnum].opcode, sym)) |
275 break; | 275 break; |
276 } | 276 } |
277 if ((as -> target == TARGET_6309) && (instab[opnum].flags & lwasm_insn_is6309)) | 277 if ((as -> target != TARGET_6309) && (instab[opnum].flags & lwasm_insn_is6309)) |
278 lwasm_register_error(as, cl, "Illegal use of 6309 instruction in 6809 mode (%s)", sym); | 278 lwasm_register_error(as, cl, "Illegal use of 6309 instruction in 6809 mode (%s)", sym); |
279 | 279 |
280 // have to go to linedone here in case there was a symbol | 280 // have to go to linedone here in case there was a symbol |
281 // to register on this line | 281 // to register on this line |
282 if (instab[opnum].opcode == NULL && (*tok == '*' || *tok == ';' || *tok == '#')) | 282 if (instab[opnum].opcode == NULL && (*tok == '*' || *tok == ';' || *tok == '#')) |