Mercurial > hg > index.cgi
comparison lwasm/instab.h @ 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 | 8e25147c2aa8 |
children | e97f9a302c6a |
comparison
equal
deleted
inserted
replaced
384:6ee9c67a0f8d | 385:4fd16faa4d93 |
---|---|
36 int flags; /* flag for this instruction */ | 36 int flags; /* flag for this instruction */ |
37 } instab_t; | 37 } instab_t; |
38 | 38 |
39 enum | 39 enum |
40 { | 40 { |
41 lwasm_insn_cond = 1, /* conditional instruction */ | 41 lwasm_insn_cond = 1, /* conditional instruction */ |
42 lwasm_insn_endm = 2, /* end of macro */ | 42 lwasm_insn_endm = 1 << 1, /* end of macro */ |
43 lwasm_insn_setsym = 4, /* insn sets symbol address */ | 43 lwasm_insn_setsym = 1 << 2, /* insn sets symbol address */ |
44 lwasm_insn_is6309 = 8, /* insn is 6309 only */ | 44 lwasm_insn_is6309 = 1 << 3, /* insn is 6309 only */ |
45 lwasm_insn_struct = 16, /* insn allowed in a struct */ | 45 lwasm_insn_struct = 1 << 4, /* insn allowed in a struct */ |
46 lwasm_insn_setdata = 32, /* insn uses the data address for symbols */ | 46 lwasm_insn_setdata = 1 << 5, /* insn uses the data address for symbols */ |
47 lwasm_insn_is6800 = 64, /* insn is a 6800 compatibility operation */ | 47 lwasm_insn_is6800 = 1 << 6, /* insn is a 6800 compatibility operation */ |
48 lwasm_insn_is6809 = 128, /* insn is 6809 only */ | 48 lwasm_insn_is6809 = 1 << 7, /* insn is 6809 only */ |
49 lwasm_insn_normal = 0 | 49 lwasm_insn_is6809conv = 1 << 8, /* insn is 6809 convenience only */ |
50 lwasm_insn_is6309conv = 1 << 9, /* insn is 6309 convenience only */ | |
51 lwasm_insn_normal = 0 | |
50 }; | 52 }; |
51 | 53 |
52 | 54 |
53 #define PARSEFUNC(fn) void (fn)(asmstate_t *as, line_t *l, char **p) | 55 #define PARSEFUNC(fn) void (fn)(asmstate_t *as, line_t *l, char **p) |
54 #define RESOLVEFUNC(fn) void (fn)(asmstate_t *as, line_t *l, int force) | 56 #define RESOLVEFUNC(fn) void (fn)(asmstate_t *as, line_t *l, int force) |