aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2021-10-02 16:58:29 +0200
committerMike Pall <mike>2021-10-02 17:23:51 +0200
commit10c9d9a214cefc714571603641ead1780ec8ea74 (patch)
tree69fc2cbb2bd68f95ef915a3c130517b0987a73e9 /src
parenta2047d3f180aa8be4c175d94bcaef249629c516c (diff)
parentd3294fa63b344173db68dd612c6d3801631e28d4 (diff)
downloadluajit-10c9d9a214cefc714571603641ead1780ec8ea74.tar.gz
luajit-10c9d9a214cefc714571603641ead1780ec8ea74.tar.bz2
luajit-10c9d9a214cefc714571603641ead1780ec8ea74.zip
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm_mips.h33
1 files changed, 13 insertions, 20 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index ba05f193..21b9f9db 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -968,11 +968,16 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
968 MCLabel l_end, l_loop, l_next; 968 MCLabel l_end, l_loop, l_next;
969 969
970 rset_clear(allow, tab); 970 rset_clear(allow, tab);
971#if LJ_SOFTFP32 971 if (!LJ_SOFTFP && irt_isnum(kt)) {
972 if (!isk) { 972 key = ra_alloc1(as, refkey, RSET_FPR);
973 key = ra_alloc1(as, refkey, allow); 973 tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key));
974 rset_clear(allow, key); 974 } else {
975 if (irkey[1].o == IR_HIOP) { 975 if (!irt_ispri(kt)) {
976 key = ra_alloc1(as, refkey, allow);
977 rset_clear(allow, key);
978 }
979#if LJ_32
980 if (LJ_SOFTFP && irkey[1].o == IR_HIOP) {
976 if (ra_hasreg((irkey+1)->r)) { 981 if (ra_hasreg((irkey+1)->r)) {
977 type = tmpnum = (irkey+1)->r; 982 type = tmpnum = (irkey+1)->r;
978 tmp1 = ra_scratch(as, allow); 983 tmp1 = ra_scratch(as, allow);
@@ -983,23 +988,11 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
983 } 988 }
984 rset_clear(allow, tmpnum); 989 rset_clear(allow, tmpnum);
985 } else { 990 } else {
986 type = ra_allock(as, (int32_t)irt_toitype(irkey->t), allow); 991 type = ra_allock(as, (int32_t)irt_toitype(kt), allow);
987 rset_clear(allow, type); 992 rset_clear(allow, type);
988 } 993 }
989 }
990#else
991 if (!LJ_SOFTFP && irt_isnum(kt)) {
992 key = ra_alloc1(as, refkey, RSET_FPR);
993 tmpnum = ra_scratch(as, rset_exclude(RSET_FPR, key));
994 } else if (!irt_ispri(kt)) {
995 key = ra_alloc1(as, refkey, allow);
996 rset_clear(allow, key);
997#if LJ_32
998 type = ra_allock(as, (int32_t)irt_toitype(irkey->t), allow);
999 rset_clear(allow, type);
1000#endif 994#endif
1001 } 995 }
1002#endif
1003 tmp2 = ra_scratch(as, allow); 996 tmp2 = ra_scratch(as, allow);
1004 rset_clear(allow, tmp2); 997 rset_clear(allow, tmp2);
1005#if LJ_64 998#if LJ_64
@@ -1012,10 +1005,10 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
1012 } else { 1005 } else {
1013 int64_t k; 1006 int64_t k;
1014 if (isk && irt_isaddr(kt)) { 1007 if (isk && irt_isaddr(kt)) {
1015 k = ((int64_t)irt_toitype(irkey->t) << 47) | irkey[1].tv.u64; 1008 k = ((int64_t)irt_toitype(kt) << 47) | irkey[1].tv.u64;
1016 } else { 1009 } else {
1017 lj_assertA(irt_ispri(kt) && !irt_isnil(kt), "bad HREF key type"); 1010 lj_assertA(irt_ispri(kt) && !irt_isnil(kt), "bad HREF key type");
1018 k = ~((int64_t)~irt_toitype(ir->t) << 47); 1011 k = ~((int64_t)~irt_toitype(kt) << 47);
1019 } 1012 }
1020 cmp64 = ra_allock(as, k, allow); 1013 cmp64 = ra_allock(as, k, allow);
1021 rset_clear(allow, cmp64); 1014 rset_clear(allow, cmp64);