comparison lwasm/pass1.c @ 385:4fd16faa4d93

Add various "convenience" ops These are things like "NEGD" in 6809 mode or NEGQ in 6309 mode. These require either 6809conv or 6309conv pragmas. Also fix a problem with "CPX" in the 6800 mode. Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 13 Jul 2015 21:26:34 -0600
parents 80d615a6642c
children 6153cb49403c
comparison
equal deleted inserted replaced
384:6ee9c67a0f8d 385:4fd16faa4d93
277 for (; *p1 && isspace(*p1); p1++) 277 for (; *p1 && isspace(*p1); p1++)
278 /* do nothing */ ; 278 /* do nothing */ ;
279 279
280 for (opnum = 0; instab[opnum].opcode; opnum++) 280 for (opnum = 0; instab[opnum].opcode; opnum++)
281 { 281 {
282 // ignore 6800 compatibility entries unless asked for 282 // ignore 6800 compatibility opcodes unless asked for
283 if ((instab[opnum].flags & lwasm_insn_is6800) && !CURPRAGMA(cl, PRAGMA_6800COMPAT)) 283 if ((instab[opnum].flags & lwasm_insn_is6800) && !CURPRAGMA(cl, PRAGMA_6800COMPAT)) continue;
284 continue; 284 // ignore 6809 convenience opcodes unless asked for
285 if ((instab[opnum].flags & lwasm_insn_is6809conv) && !CURPRAGMA(cl, PRAGMA_6809CONV)) continue;
286 // ignore 6809 convenience opcodes in 6309 mode
287 if ((instab[opnum].flags & lwasm_insn_is6809conv) && !CURPRAGMA(cl, PRAGMA_6809)) continue;
288 // ignore 6309 convenience opcodes unless asked for
289 if ((instab[opnum].flags & lwasm_insn_is6309conv) && !CURPRAGMA(cl, PRAGMA_6309CONV)) continue;
290
285 if (!strcasecmp(instab[opnum].opcode, sym)) 291 if (!strcasecmp(instab[opnum].opcode, sym))
286 break; 292 break;
287 } 293 }
288 294
289 // have to go to linedone here in case there was a symbol 295 // have to go to linedone here in case there was a symbol