Mercurial > hg-old > index.cgi
comparison lwasm/lwasm.h @ 190:563adfccb645
Added 'sym=expr' opcode handling
author | lost |
---|---|
date | Sun, 22 Mar 2009 16:08:20 +0000 |
parents | b061350c17e4 |
children | 6ddc861a07d4 |
comparison
equal
deleted
inserted
replaced
189:1936ea52b83e | 190:563adfccb645 |
---|---|
106 int nocodelen; // for "RMB" type instructions | 106 int nocodelen; // for "RMB" type instructions |
107 int addrset; // set if this instruction sets the assembly address | 107 int addrset; // set if this instruction sets the assembly address |
108 int symaddr; // set if this instruction sets a symbol addr with EQU or the like | 108 int symaddr; // set if this instruction sets a symbol addr with EQU or the like |
109 int badop; // bad operation - ignore it | 109 int badop; // bad operation - ignore it |
110 int context; // the symbol context for this line | 110 int context; // the symbol context for this line |
111 int forceglobal; // force a "global" symbol definition if constant | |
111 | 112 |
112 // the following are used for obj format - for external references, inter-section | 113 // the following are used for obj format - for external references, inter-section |
113 // references, and intrasection relocations | 114 // references, and intrasection relocations |
114 int relocoff; // offset into insn where relocation value goes | 115 int relocoff; // offset into insn where relocation value goes |
115 lwasm_expr_stack_t *exprs[4]; // non-constant expression values | 116 lwasm_expr_stack_t *exprs[4]; // non-constant expression values |
123 #define SYMBOL_SET 1 // the symbol was used for "SET" | 124 #define SYMBOL_SET 1 // the symbol was used for "SET" |
124 #define SYMBOL_COMPLEX 2 // register symbol as a complex symbol (from l -> expr) | 125 #define SYMBOL_COMPLEX 2 // register symbol as a complex symbol (from l -> expr) |
125 #define SYMBOL_FORCE 4 // force resetting the symbol value if it already exists on pass 2 | 126 #define SYMBOL_FORCE 4 // force resetting the symbol value if it already exists on pass 2 |
126 #define SYMBOL_NORM 0 // no flags | 127 #define SYMBOL_NORM 0 // no flags |
127 #define SYMBOL_EXTERN 8 // the symbol is an external reference | 128 #define SYMBOL_EXTERN 8 // the symbol is an external reference |
129 #define SYMBOL_GLOBAL 16 // force global if non-complex symbol | |
128 typedef struct lwasm_symbol_ent_s lwasm_symbol_ent_t; | 130 typedef struct lwasm_symbol_ent_s lwasm_symbol_ent_t; |
129 struct lwasm_symbol_ent_s | 131 struct lwasm_symbol_ent_s |
130 { | 132 { |
131 char *sym; // the symbol | 133 char *sym; // the symbol |
132 int context; // the context number of the symbol (-1 for global) | 134 int context; // the context number of the symbol (-1 for global) |