Mercurial > hg-old > index.cgi
comparison lwasm/instab.h @ 348:11a95c6414b4
Added third func to instab to split resolve and emit logic
author | lost@starbug |
---|---|
date | Sat, 27 Mar 2010 22:15:07 -0600 |
parents | 04c80c51b16a |
children | 7d91ab7ac7d6 |
comparison
equal
deleted
inserted
replaced
347:1649bc7bda5a | 348:11a95c6414b4 |
---|---|
30 { | 30 { |
31 char *opcode; /* the mneumonic */ | 31 char *opcode; /* the mneumonic */ |
32 int ops[4]; /* opcode values for up to four addr modes */ | 32 int ops[4]; /* opcode values for up to four addr modes */ |
33 void (*parse)(asmstate_t *as, line_t *l, char **optr); /* parse operand for insn */ | 33 void (*parse)(asmstate_t *as, line_t *l, char **optr); /* parse operand for insn */ |
34 void (*resolve)(asmstate_t *as, line_t *l); /* resolve instruction to code */ | 34 void (*resolve)(asmstate_t *as, line_t *l); /* resolve instruction to code */ |
35 void (*emit)(asmstate_t *as, line_t *l); /* resolve instruction to code */ | |
35 int flags; /* flag for this instruction */ | 36 int flags; /* flag for this instruction */ |
36 } instab_t; | 37 } instab_t; |
37 | 38 |
38 enum | 39 enum |
39 { | 40 { |
45 }; | 46 }; |
46 | 47 |
47 | 48 |
48 #define PARSEFUNC(fn) void (fn)(asmstate_t *as, line_t *l, char **p) | 49 #define PARSEFUNC(fn) void (fn)(asmstate_t *as, line_t *l, char **p) |
49 #define RESOLVEFUNC(fn) void (fn)(asmstate_t *as, line_t *l) | 50 #define RESOLVEFUNC(fn) void (fn)(asmstate_t *as, line_t *l) |
51 #define EMITFUNC(fn) void (fn)(asmstate_t *as, line_t *l) | |
50 | 52 |
51 #ifndef __instab_c_seen__ | 53 #ifndef __instab_c_seen__ |
52 extern instab_t instab[]; | 54 extern instab_t instab[]; |
53 #endif //__instab_c_seen__ | 55 #endif //__instab_c_seen__ |
54 | 56 |