Mercurial > hg-old > index.cgi
comparison lwasm/pass4.c @ 387:a741d2e4869f
Various bugfixes; fixed lwobjdump to display symbols with unprintable characters more sensibly; start of a (nonfunctional for now) testing framework
author | lost@l-w.ca |
---|---|
date | Wed, 14 Jul 2010 20:15:23 -0600 |
parents | 9c24d9d485b9 |
children |
comparison
equal
deleted
inserted
replaced
386:af5f2c51db76 | 387:a741d2e4869f |
---|---|
34 Resolve2 Pass | 34 Resolve2 Pass |
35 | 35 |
36 Force resolution of instruction sizes. | 36 Force resolution of instruction sizes. |
37 | 37 |
38 */ | 38 */ |
39 void do_pass4(asmstate_t *as) | 39 void do_pass4_aux(asmstate_t *as, int force) |
40 { | 40 { |
41 int rc; | 41 int rc; |
42 int cnt; | 42 int cnt; |
43 line_t *cl, *sl; | 43 line_t *cl, *sl; |
44 struct line_expr_s *le; | 44 struct line_expr_s *le; |
74 | 74 |
75 | 75 |
76 if (sl -> len == -1 && sl -> insn >= 0 && instab[sl -> insn].resolve) | 76 if (sl -> len == -1 && sl -> insn >= 0 && instab[sl -> insn].resolve) |
77 { | 77 { |
78 (instab[sl -> insn].resolve)(as, sl, 1); | 78 (instab[sl -> insn].resolve)(as, sl, 1); |
79 if (sl -> len == -1) | 79 if (force && sl -> len == -1) |
80 { | 80 { |
81 lwasm_register_error(as, sl, "Instruction failed to resolve."); | 81 lwasm_register_error(as, sl, "Instruction failed to resolve."); |
82 return; | 82 return; |
83 } | 83 } |
84 } | 84 } |
120 if (as -> errorcount > 0) | 120 if (as -> errorcount > 0) |
121 return; | 121 return; |
122 } while (rc > 0); | 122 } while (rc > 0); |
123 } | 123 } |
124 } | 124 } |
125 | |
126 void do_pass4(asmstate_t *as) | |
127 { | |
128 do_pass4_aux(as, 1); | |
129 } |