diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_emit_x86.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lj_emit_x86.h b/src/lj_emit_x86.h index 2454c899..ca63f59c 100644 --- a/src/lj_emit_x86.h +++ b/src/lj_emit_x86.h | |||
@@ -426,22 +426,22 @@ static void emit_movrr(ASMState *as, IRIns *ir, Reg dst, Reg src) | |||
426 | emit_rr(as, XO_MOVAPS, dst, src); | 426 | emit_rr(as, XO_MOVAPS, dst, src); |
427 | } | 427 | } |
428 | 428 | ||
429 | /* Generic load of register from stack slot. */ | 429 | /* Generic load of register with base and (small) offset address. */ |
430 | static void emit_spload(ASMState *as, IRIns *ir, Reg r, int32_t ofs) | 430 | static void emit_loadofs(ASMState *as, IRIns *ir, Reg r, Reg base, int32_t ofs) |
431 | { | 431 | { |
432 | if (r < RID_MAX_GPR) | 432 | if (r < RID_MAX_GPR) |
433 | emit_rmro(as, XO_MOV, REX_64IR(ir, r), RID_ESP, ofs); | 433 | emit_rmro(as, XO_MOV, REX_64IR(ir, r), base, ofs); |
434 | else | 434 | else |
435 | emit_rmro(as, irt_isnum(ir->t) ? XO_MOVSD : XO_MOVSS, r, RID_ESP, ofs); | 435 | emit_rmro(as, irt_isnum(ir->t) ? XO_MOVSD : XO_MOVSS, r, base, ofs); |
436 | } | 436 | } |
437 | 437 | ||
438 | /* Generic store of register to stack slot. */ | 438 | /* Generic store of register with base and (small) offset address. */ |
439 | static void emit_spstore(ASMState *as, IRIns *ir, Reg r, int32_t ofs) | 439 | static void emit_storeofs(ASMState *as, IRIns *ir, Reg r, Reg base, int32_t ofs) |
440 | { | 440 | { |
441 | if (r < RID_MAX_GPR) | 441 | if (r < RID_MAX_GPR) |
442 | emit_rmro(as, XO_MOVto, REX_64IR(ir, r), RID_ESP, ofs); | 442 | emit_rmro(as, XO_MOVto, REX_64IR(ir, r), base, ofs); |
443 | else | 443 | else |
444 | emit_rmro(as, irt_isnum(ir->t) ? XO_MOVSDto : XO_MOVSSto, r, RID_ESP, ofs); | 444 | emit_rmro(as, irt_isnum(ir->t) ? XO_MOVSDto : XO_MOVSSto, r, base, ofs); |
445 | } | 445 | } |
446 | 446 | ||
447 | /* Add offset to pointer. */ | 447 | /* Add offset to pointer. */ |