Refactor callRuntimeHelper
Change-Id: I87c5f592a931c98c4b5b693b72216f4e71990162
diff --git a/src/compiler/codegen/arm/Thumb2/Gen.cc b/src/compiler/codegen/arm/Thumb2/Gen.cc
index 49728b4..74412ab 100644
--- a/src/compiler/codegen/arm/Thumb2/Gen.cc
+++ b/src/compiler/codegen/arm/Thumb2/Gen.cc
@@ -210,7 +210,8 @@
OFFSETOF_MEMBER(Thread, pHandleFillArrayDataFromCode), rLR);
// Materialize a pointer to the fill data image
newLIR3(cUnit, kThumb2Adr, r1, 0, (intptr_t)tabRec);
- callRuntimeHelper(cUnit, rLR);
+ oatClobberCalleeSave(cUnit);
+ opReg(cUnit, kOpBlx, rLR);
}
void genNegFloat(CompilationUnit* cUnit, RegLocation rlDest, RegLocation rlSrc)
@@ -282,7 +283,8 @@
// Go expensive route - artLockObjectFromCode(self, obj);
loadWordDisp(cUnit, rSELF, OFFSETOF_MEMBER(Thread, pLockObjectFromCode),
rLR);
- callRuntimeHelper(cUnit, rLR);
+ oatClobberCalleeSave(cUnit);
+ opReg(cUnit, kOpBlx, rLR);
oatGenMemBarrier(cUnit, kSY);
}
@@ -312,7 +314,8 @@
// Go expensive route - UnlockObjectFromCode(obj);
loadWordDisp(cUnit, rSELF, OFFSETOF_MEMBER(Thread, pUnlockObjectFromCode),
rLR);
- callRuntimeHelper(cUnit, rLR);
+ oatClobberCalleeSave(cUnit);
+ opReg(cUnit, kOpBlx, rLR);
oatGenMemBarrier(cUnit, kSY);
}