Mercurial > hg-old > index.cgi
comparison src/insn_bitbit.c @ 101:f59c0916753d
Fixed relative branches and PCR addressing to handle constant intra-section references properly
author | lost |
---|---|
date | Fri, 23 Jan 2009 03:36:27 +0000 |
parents | 8929e1ee99cf |
children |
comparison
equal
deleted
inserted
replaced
100:579ac3697918 | 101:f59c0916753d |
---|---|
58 if (*(*p)++ != ',') | 58 if (*(*p)++ != ',') |
59 { | 59 { |
60 register_error(as, l, 1, "Bad operand"); | 60 register_error(as, l, 1, "Bad operand"); |
61 return; | 61 return; |
62 } | 62 } |
63 s = lwasm_evaluate_expr(as, l, *p, NULL); | 63 s = lwasm_evaluate_expr(as, l, *p, NULL, 0); |
64 if (!s) | 64 if (!s) |
65 { | 65 { |
66 register_error(as, l, 1, "Bad operand"); | 66 register_error(as, l, 1, "Bad operand"); |
67 return; | 67 return; |
68 } | 68 } |
82 register_error(as, l, 1, "Bad operand"); | 82 register_error(as, l, 1, "Bad operand"); |
83 return; | 83 return; |
84 } | 84 } |
85 r = (r << 6) | (v1 << 3); | 85 r = (r << 6) | (v1 << 3); |
86 | 86 |
87 s = lwasm_evaluate_expr(as, l, *p, NULL); | 87 s = lwasm_evaluate_expr(as, l, *p, NULL, 0); |
88 if (!s) | 88 if (!s) |
89 { | 89 { |
90 register_error(as, l, 1, "Bad operand"); | 90 register_error(as, l, 1, "Bad operand"); |
91 return; | 91 return; |
92 } | 92 } |
112 | 112 |
113 // ignore base page address modifier | 113 // ignore base page address modifier |
114 if (**p == '<') | 114 if (**p == '<') |
115 (*p)++; | 115 (*p)++; |
116 | 116 |
117 s = lwasm_evaluate_expr(as, l, *p, NULL); | 117 s = lwasm_evaluate_expr(as, l, *p, NULL, 0); |
118 if (!s) | 118 if (!s) |
119 { | 119 { |
120 register_error(as, l, 1, "Bad operand"); | 120 register_error(as, l, 1, "Bad operand"); |
121 return; | 121 return; |
122 } | 122 } |