summaryrefslogtreecommitdiff
path: root/src/jit/emitarm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/emitarm.cpp')
-rw-r--r--src/jit/emitarm.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/jit/emitarm.cpp b/src/jit/emitarm.cpp
index a0c7196ecb..c21f7aeb3e 100644
--- a/src/jit/emitarm.cpp
+++ b/src/jit/emitarm.cpp
@@ -2459,6 +2459,16 @@ void emitter::emitIns_R_R_I(instruction ins,
fmt = IF_T2_M0;
sf = INS_FLAGS_NOT_SET;
}
+ else if (insDoesNotSetFlags(flags) && (reg1 != REG_SP) && (reg1 != REG_PC))
+ {
+ // movw,movt reg1, imm
+ codeGen->instGen_Set_Reg_To_Imm(attr, reg1, (ins == INS_sub ? -1 : 1) * imm);
+
+ // ins reg1, reg2
+ emitIns_R_R(INS_add, attr, reg1, reg2);
+
+ return;
+ }
else
{
assert(!"Instruction cannot be encoded");
@@ -7619,7 +7629,7 @@ void emitter::emitInsLoadStoreOp(instruction ins, emitAttr attr, regNumber dataR
if (addr->OperGet() == GT_LEA)
{
- offset += (int)addr->AsAddrMode()->gtOffset;
+ offset += addr->AsAddrMode()->Offset();
if (addr->AsAddrMode()->gtScale > 0)
{
assert(isPow2(addr->AsAddrMode()->gtScale));