comparison src/lwasm.h @ 85:918be0c02239

Started adding object target output
author lost
date Fri, 16 Jan 2009 05:14:49 +0000
parents 03be43ae19cf
children 033a328a10ae
comparison
equal deleted inserted replaced
84:e12edcfbebd5 85:918be0c02239
39 { 39 {
40 char *name; // name of the section 40 char *name; // name of the section
41 int offset; // current offset in the section 41 int offset; // current offset in the section
42 int flags; // section flags 42 int flags; // section flags
43 sectiontab_t *next; // next section 43 sectiontab_t *next; // next section
44 unsigned char *obytes; // output bytes
45 int oblen; // how many bytes output so far?
46 int obsize; // how big is output buffer so far?
44 }; 47 };
45 48
46 // structure for tracking macros 49 // structure for tracking macros
47 typedef struct macrotab_s macrotab_t; 50 typedef struct macrotab_s macrotab_t;
48 struct macrotab_s 51 struct macrotab_s
89 // references, and intrasection relocations 92 // references, and intrasection relocations
90 int relocoff; // offset into insn where relocation value goes 93 int relocoff; // offset into insn where relocation value goes
91 lwasm_expr_stack_t *exprs[4]; // non-constant expression values 94 lwasm_expr_stack_t *exprs[4]; // non-constant expression values
92 int exprvals[4]; // constant expression values 95 int exprvals[4]; // constant expression values
93 char *exprends[4]; // pointer to character after end of expression 96 char *exprends[4]; // pointer to character after end of expression
97
98 sectiontab_t *sect; // which section is the line in?
94 }; 99 };
95 100
96 // for keeping track of symbols 101 // for keeping track of symbols
97 #define SYMBOL_SET 1 // the symbol was used for "SET" 102 #define SYMBOL_SET 1 // the symbol was used for "SET"
98 #define SYMBOL_COMPLEX 2 // register symbol as a complex symbol (from l -> expr) 103 #define SYMBOL_COMPLEX 2 // register symbol as a complex symbol (from l -> expr)