diff options
author | Mike Pall <mike> | 2016-05-28 05:10:55 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2016-05-28 05:10:55 +0200 |
commit | d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b (patch) | |
tree | c89961a1a8949c19872aa39269c2408dd6595733 /src/lj_asm_mips.h | |
parent | e3c4c9af0f07a114fb754fed6ac358a102f49e2f (diff) | |
download | luajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.tar.gz luajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.tar.bz2 luajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.zip |
MIPS64, part 1: Add MIPS64 support to interpreter.
Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
Sponsored by Cisco Systems, Inc.
Diffstat (limited to 'src/lj_asm_mips.h')
-rw-r--r-- | src/lj_asm_mips.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h index 6094be68..cf446346 100644 --- a/src/lj_asm_mips.h +++ b/src/lj_asm_mips.h | |||
@@ -510,7 +510,7 @@ static void asm_conv(ASMState *as, IRIns *ir) | |||
510 | Reg left = ra_alloc1(as, ir->op1, RSET_GPR); | 510 | Reg left = ra_alloc1(as, ir->op1, RSET_GPR); |
511 | lua_assert(irt_isint(ir->t) || irt_isu32(ir->t)); | 511 | lua_assert(irt_isint(ir->t) || irt_isu32(ir->t)); |
512 | if ((ir->op2 & IRCONV_SEXT)) { | 512 | if ((ir->op2 & IRCONV_SEXT)) { |
513 | if ((as->flags & JIT_F_MIPS32R2)) { | 513 | if ((as->flags & JIT_F_MIPSXXR2)) { |
514 | emit_dst(as, st == IRT_I8 ? MIPSI_SEB : MIPSI_SEH, dest, 0, left); | 514 | emit_dst(as, st == IRT_I8 ? MIPSI_SEB : MIPSI_SEH, dest, 0, left); |
515 | } else { | 515 | } else { |
516 | uint32_t shift = st == IRT_I8 ? 24 : 16; | 516 | uint32_t shift = st == IRT_I8 ? 24 : 16; |
@@ -739,7 +739,7 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge) | |||
739 | emit_dst(as, MIPSI_SUBU, tmp2, tmp2, dest); | 739 | emit_dst(as, MIPSI_SUBU, tmp2, tmp2, dest); |
740 | if (LJ_SOFTFP ? (irkey[1].o == IR_HIOP) : irt_isnum(kt)) { | 740 | if (LJ_SOFTFP ? (irkey[1].o == IR_HIOP) : irt_isnum(kt)) { |
741 | emit_dst(as, MIPSI_XOR, tmp2, tmp2, tmp1); | 741 | emit_dst(as, MIPSI_XOR, tmp2, tmp2, tmp1); |
742 | if ((as->flags & JIT_F_MIPS32R2)) { | 742 | if ((as->flags & JIT_F_MIPSXXR2)) { |
743 | emit_dta(as, MIPSI_ROTR, dest, tmp1, (-HASH_ROT1)&31); | 743 | emit_dta(as, MIPSI_ROTR, dest, tmp1, (-HASH_ROT1)&31); |
744 | } else { | 744 | } else { |
745 | emit_dst(as, MIPSI_OR, dest, dest, tmp1); | 745 | emit_dst(as, MIPSI_OR, dest, dest, tmp1); |
@@ -1457,7 +1457,7 @@ static void asm_bswap(ASMState *as, IRIns *ir) | |||
1457 | { | 1457 | { |
1458 | Reg dest = ra_dest(as, ir, RSET_GPR); | 1458 | Reg dest = ra_dest(as, ir, RSET_GPR); |
1459 | Reg left = ra_alloc1(as, ir->op1, RSET_GPR); | 1459 | Reg left = ra_alloc1(as, ir->op1, RSET_GPR); |
1460 | if ((as->flags & JIT_F_MIPS32R2)) { | 1460 | if ((as->flags & JIT_F_MIPSXXR2)) { |
1461 | emit_dta(as, MIPSI_ROTR, dest, RID_TMP, 16); | 1461 | emit_dta(as, MIPSI_ROTR, dest, RID_TMP, 16); |
1462 | emit_dst(as, MIPSI_WSBH, RID_TMP, 0, left); | 1462 | emit_dst(as, MIPSI_WSBH, RID_TMP, 0, left); |
1463 | } else { | 1463 | } else { |
@@ -1513,7 +1513,7 @@ static void asm_bitshift(ASMState *as, IRIns *ir, MIPSIns mi, MIPSIns mik) | |||
1513 | 1513 | ||
1514 | static void asm_bror(ASMState *as, IRIns *ir) | 1514 | static void asm_bror(ASMState *as, IRIns *ir) |
1515 | { | 1515 | { |
1516 | if ((as->flags & JIT_F_MIPS32R2)) { | 1516 | if ((as->flags & JIT_F_MIPSXXR2)) { |
1517 | asm_bitshift(as, ir, MIPSI_ROTRV, MIPSI_ROTR); | 1517 | asm_bitshift(as, ir, MIPSI_ROTRV, MIPSI_ROTR); |
1518 | } else { | 1518 | } else { |
1519 | Reg dest = ra_dest(as, ir, RSET_GPR); | 1519 | Reg dest = ra_dest(as, ir, RSET_GPR); |