| 233 | } |
| 234 | |
| 235 | void JitCompiler::EmitRETI() |
| 236 | { |
| 237 | using namespace asmjit; |
| 238 | |
| 239 | int a = A; |
| 240 | int retnum = a & ~RET_FINAL; |
| 241 | |
| 242 | X86Gp reg_retnum = newTempInt32(); |
| 243 | X86Gp location = newTempIntPtr(); |
| 244 | Label L_endif = cc.newLabel(); |
| 245 | |
| 246 | cc.mov(reg_retnum, retnum); |
| 247 | cc.cmp(reg_retnum, numret); |
| 248 | cc.jge(L_endif); |
| 249 | |
| 250 | cc.mov(location, x86::ptr(ret, retnum * sizeof(VMReturn))); |
| 251 | cc.mov(x86::dword_ptr(location), BCs); |
| 252 | |
| 253 | if (a & RET_FINAL) |
| 254 | { |
| 255 | cc.add(reg_retnum, 1); |
| 256 | EmitPopFrame(); |
| 257 | cc.ret(reg_retnum); |
| 258 | } |
| 259 | |
| 260 | cc.bind(L_endif); |
| 261 | if (a & RET_FINAL) |
| 262 | { |
| 263 | EmitPopFrame(); |
| 264 | cc.ret(numret); |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | void JitCompiler::EmitTHROW() |
| 269 | { |