Mercurial > hg > index.cgi
comparison lwasm/pass1.c @ 460:3d53f2e8d0e0
Allow macros to shadow instructions that are not supported by current CPU.
When assembling in 6809 mode, 6309 instructions should be usable as macros.
When assembling in 6309 mode, instructions not valid on the 6309 should be
usable as macros.
author | William Astle <lost@l-w.ca> |
---|---|
date | Wed, 28 Feb 2018 20:43:14 -0700 |
parents | b1adf549d181 |
children | c8d4f3486ad7 |
comparison
equal
deleted
inserted
replaced
459:ed7b8f74087d | 460:3d53f2e8d0e0 |
---|---|
328 { | 328 { |
329 // a macro was expanded here | 329 // a macro was expanded here |
330 goto linedone; | 330 goto linedone; |
331 } | 331 } |
332 } | 332 } |
333 if (instab[opnum].opcode == NULL) | 333 |
334 if (instab[opnum].opcode == NULL || | |
335 ( | |
336 (CURPRAGMA(cl, PRAGMA_6809) && (instab[opnum].flags & lwasm_insn_is6309)) || | |
337 (!CURPRAGMA(cl, PRAGMA_6809) && (instab[opnum].flags & lwasm_insn_is6809)) | |
338 )) | |
334 { | 339 { |
335 cl -> insn = -1; | 340 cl -> insn = -1; |
336 if (*tok != ';' && *tok != '*') | 341 if (*tok != ';' && *tok != '*') |
337 { | 342 { |
338 // bad opcode; check for macro here | 343 // bad opcode; check for macro here |