Mercurial > hg > index.cgi
comparison lwasm/insn_indexed.c @ 130:50d86baf4ea2
Fixed code generation bug with forced-size offsets from X,Y,U,S
author | lost@l-w.ca |
---|---|
date | Thu, 11 Aug 2011 22:48:16 -0600 |
parents | 5706712f8a20 |
children | f2f3a4b0a25e |
comparison
equal
deleted
inserted
replaced
129:5706712f8a20 | 130:50d86baf4ea2 |
---|---|
188 { | 188 { |
189 l -> lint = 2; | 189 l -> lint = 2; |
190 (*p)++; | 190 (*p)++; |
191 } | 191 } |
192 | 192 |
193 if (**p == '0' && *(*p+1) == ',') | 193 if (**p == '0' && *((*p)+1) == ',') |
194 { | 194 { |
195 f0 = 1; | 195 f0 = 1; |
196 } | 196 } |
197 | 197 |
198 // now we have to evaluate the expression | 198 // now we have to evaluate the expression |
226 lwasm_register_error(as, l, "Bad operand"); | 226 lwasm_register_error(as, l, "Bad operand"); |
227 return; | 227 return; |
228 } | 228 } |
229 else | 229 else |
230 (*p)++; | 230 (*p)++; |
231 } | |
232 | |
233 if (rn <= 3) | |
234 { | |
235 // X,Y,U,S | |
236 if (l -> lint == 1) | |
237 { | |
238 l -> pb = 0x88 | (rn << 5) | (indir ? 0x10 : 0); | |
239 } | |
240 else if (l -> lint == 2) | |
241 { | |
242 l -> pb = 0x89 | (rn << 5) | (indir ? 0x10 : 0); | |
243 } | |
244 return; | |
231 } | 245 } |
232 | 246 |
233 // nnnn,W is only 16 bit (or 0 bit) | 247 // nnnn,W is only 16 bit (or 0 bit) |
234 if (rn == 4) | 248 if (rn == 4) |
235 { | 249 { |