aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_mips.h
diff options
context:
space:
mode:
authorMike Pall <mike>2016-05-21 00:02:45 +0200
committerMike Pall <mike>2016-05-21 00:02:45 +0200
commitcfa188f1349ba4c843394b53f270cb64635b9805 (patch)
treee16e643dfa2567fd52506702b79a4b851c3db63e /src/lj_asm_mips.h
parent1931b38da5a9ea075df73a966630308d3988bb96 (diff)
downloadluajit-cfa188f1349ba4c843394b53f270cb64635b9805.tar.gz
luajit-cfa188f1349ba4c843394b53f270cb64635b9805.tar.bz2
luajit-cfa188f1349ba4c843394b53f270cb64635b9805.zip
Move common 32/64 bit in-memory FP constants to jit_State.
Prerequisite for immovable IR. Contributed by Peter Cawley.
Diffstat (limited to 'src/lj_asm_mips.h')
-rw-r--r--src/lj_asm_mips.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index ecb38c5d..d37bc132 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -459,12 +459,10 @@ static void asm_conv(ASMState *as, IRIns *ir)
459 dest, dest); 459 dest, dest);
460 if (irt_isfloat(ir->t)) 460 if (irt_isfloat(ir->t))
461 emit_lsptr(as, MIPSI_LWC1, (tmp & 31), 461 emit_lsptr(as, MIPSI_LWC1, (tmp & 31),
462 (void *)lj_ir_k64_find(as->J, U64x(4f000000,4f000000)), 462 (void *)&as->J->k32[LJ_K32_2P31], RSET_GPR);
463 RSET_GPR);
464 else 463 else
465 emit_lsptr(as, MIPSI_LDC1, (tmp & 31), 464 emit_lsptr(as, MIPSI_LDC1, (tmp & 31),
466 (void *)lj_ir_k64_find(as->J, U64x(41e00000,00000000)), 465 (void *)&as->J->k64[LJ_K64_2P31], RSET_GPR);
467 RSET_GPR);
468 emit_tg(as, MIPSI_MTC1, RID_TMP, dest); 466 emit_tg(as, MIPSI_MTC1, RID_TMP, dest);
469 emit_dst(as, MIPSI_XOR, RID_TMP, RID_TMP, left); 467 emit_dst(as, MIPSI_XOR, RID_TMP, RID_TMP, left);
470 emit_ti(as, MIPSI_LUI, RID_TMP, 0x8000); 468 emit_ti(as, MIPSI_LUI, RID_TMP, 0x8000);
@@ -494,12 +492,10 @@ static void asm_conv(ASMState *as, IRIns *ir)
494 tmp, left, tmp); 492 tmp, left, tmp);
495 if (st == IRT_FLOAT) 493 if (st == IRT_FLOAT)
496 emit_lsptr(as, MIPSI_LWC1, (tmp & 31), 494 emit_lsptr(as, MIPSI_LWC1, (tmp & 31),
497 (void *)lj_ir_k64_find(as->J, U64x(4f000000,4f000000)), 495 (void *)&as->J->k32[LJ_K32_2P31], RSET_GPR);
498 RSET_GPR);
499 else 496 else
500 emit_lsptr(as, MIPSI_LDC1, (tmp & 31), 497 emit_lsptr(as, MIPSI_LDC1, (tmp & 31),
501 (void *)lj_ir_k64_find(as->J, U64x(41e00000,00000000)), 498 (void *)&as->J->k64[LJ_K64_2P31], RSET_GPR);
502 RSET_GPR);
503 } else { 499 } else {
504 emit_tg(as, MIPSI_MFC1, dest, tmp); 500 emit_tg(as, MIPSI_MFC1, dest, tmp);
505 emit_fg(as, st == IRT_FLOAT ? MIPSI_TRUNC_W_S : MIPSI_TRUNC_W_D, 501 emit_fg(as, st == IRT_FLOAT ? MIPSI_TRUNC_W_S : MIPSI_TRUNC_W_D,