Use insEncodeImmT2_Mov to encode imm in IF_T2_N1 in src/jit/emitarm.cpp
authorEgor Chesakov <Egor.Chesakov@microsoft.com>
Thu, 23 Aug 2018 02:09:17 +0000 (19:09 -0700)
committerEgor Chesakov <Egor.Chesakov@microsoft.com>
Thu, 23 Aug 2018 18:27:31 +0000 (11:27 -0700)
src/jit/emitarm.cpp

index 8a6cde4..2a4c06f 100644 (file)
@@ -5391,11 +5391,7 @@ BYTE* emitter::emitOutputLJ(insGroup* ig, BYTE* dst, instrDesc* i)
             }
             ((instrDescJmp*)id)->idjTemp.idjAddr = (dstOffs > srcOffs) ? dst : NULL;
 
-            assert((imm & 0x0000ffff) == imm);
-            code |= (imm & 0x00ff);
-            code |= ((imm & 0x0700) << 4);
-            code |= ((imm & 0x0800) << 15);
-            code |= ((imm & 0xf000) << 4);
+            code |= insEncodeImmT2_Mov(imm);
             dst += emitOutput_Thumb2Instr(dst, code);
 
             if (id->idIsCnsReloc() || id->idIsDspReloc())