]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
ARM64: Reorganize operand extension definitions.
authorMike Pall <mike>
Wed, 7 Dec 2016 17:38:32 +0000 (18:38 +0100)
committerMike Pall <mike>
Wed, 7 Dec 2016 17:38:32 +0000 (18:38 +0100)
src/lj_asm_arm64.h
src/lj_target_arm64.h

index eea957b538d69dd390685f17abf38303c67ad794..fff0b3fdf0d42b3d85814dcd178db639b878b1a1 100644 (file)
@@ -277,7 +277,7 @@ static void asm_fusexref(ASMState *as, A64Ins ai, Reg rd, IRRef ref,
       if (!emit_checkofs(ai, ofs)) {
        Reg rn = ra_alloc1(as, ref, allow);
        Reg rm = ra_allock(as, ofs, rset_exclude(allow, rn));
-       emit_dnm(as, (ai ^ 0x01204800), rd, rn, rm);
+       emit_dnm(as, (ai^A64I_LS_R)|A64I_LS_UXTWx, rd, rn, rm);
        return;
       }
     }
@@ -936,7 +936,7 @@ static void asm_ahuvload(ASMState *as, IRIns *ir)
            ra_allock(as, (irt_toitype(ir->t) << 15) | 0x7fff, allow), tmp);
   }
   if (ofs & FUSE_REG)
-    emit_dnm(as, (A64I_LDRx^A64I_LS_R)|A64I_LS_UXTWx, tmp, idx, (ofs & 31));
+    emit_dnm(as, (A64I_LDRx^A64I_LS_R)|A64I_LS_UXTWx|A64I_LS_SH, tmp, idx, (ofs & 31));
   else
     emit_lso(as, A64I_LDRx, tmp, idx, ofs);
 }
@@ -951,7 +951,7 @@ static void asm_ahustore(ASMState *as, IRIns *ir)
       src = ra_alloc1(as, ir->op2, RSET_FPR);
       idx = asm_fuseahuref(as, ir->op1, &ofs, allow, A64I_STRd);
       if (ofs & FUSE_REG)
-       emit_dnm(as, (A64I_STRd^A64I_LS_R)|A64I_LS_UXTWx, (src & 31), idx, (ofs &31));
+       emit_dnm(as, (A64I_STRd^A64I_LS_R)|A64I_LS_UXTWx|A64I_LS_SH, (src & 31), idx, (ofs &31));
       else
        emit_lso(as, A64I_STRd, (src & 31), idx, ofs);
     } else {
@@ -968,7 +968,7 @@ static void asm_ahustore(ASMState *as, IRIns *ir)
       idx = asm_fuseahuref(as, ir->op1, &ofs, rset_exclude(allow, type),
                           A64I_STRx);
       if (ofs & FUSE_REG)
-       emit_dnm(as, (A64I_STRx^A64I_LS_R)|A64I_LS_UXTWx, tmp, idx, (ofs & 31));
+       emit_dnm(as, (A64I_STRx^A64I_LS_R)|A64I_LS_UXTWx|A64I_LS_SH, tmp, idx, (ofs & 31));
       else
        emit_lso(as, A64I_STRx, tmp, idx, ofs);
       if (ra_hasreg(src)) {
index 6c8771c62d802b21a47333e86a7a213baca7fbe0..e12100458529433602fa537e4ec95a05f62b3091 100644 (file)
@@ -147,8 +147,11 @@ typedef enum A64Ins {
   A64I_LS_U = 0x01000000,
   A64I_LS_S = 0x00800000,
   A64I_LS_R = 0x01200800,
-  A64I_LS_UXTWx = 0x00005000,
-  A64I_LS_LSLx = 0x00007000,
+  A64I_LS_SH = 0x00001000,
+  A64I_LS_UXTWx = 0x00004000,
+  A64I_LS_SXTWx = 0x0000c000,
+  A64I_LS_SXTXx = 0x0000e000,
+  A64I_LS_LSLx = 0x00006000,
 
   A64I_ADDw = 0x0b000000,
   A64I_ADDx = 0x8b000000,