Add OpEndIT() for marking the end of OpIT blocks
In ARM we need to prevent code motion to the inside of an
IT block. This was done using a GenBarrier() to mark the end, but
it wasn't obvious that this is what was happening. This CL adds
an explicit OpEndIT() that takes the LIR of the OpIT for future
checks.
Bug: 13751744
Change-Id: If41d2adea1f43f11ebb3b72906bd308252ce3d01
diff --git a/compiler/dex/quick/arm/fp_arm.cc b/compiler/dex/quick/arm/fp_arm.cc
index 07a13ce..d72f596 100644
--- a/compiler/dex/quick/arm/fp_arm.cc
+++ b/compiler/dex/quick/arm/fp_arm.cc
@@ -314,14 +314,14 @@
DCHECK(!ARM_FPREG(rl_result.reg.GetReg()));
NewLIR0(kThumb2Fmstat);
- OpIT((default_result == -1) ? kCondGt : kCondMi, "");
+ LIR* it = OpIT((default_result == -1) ? kCondGt : kCondMi, "");
NewLIR2(kThumb2MovI8M, rl_result.reg.GetReg(),
ModifiedImmediate(-default_result)); // Must not alter ccodes
- GenBarrier();
+ OpEndIT(it);
- OpIT(kCondEq, "");
+ it = OpIT(kCondEq, "");
LoadConstant(rl_result.reg, 0);
- GenBarrier();
+ OpEndIT(it);
StoreValue(rl_dest, rl_result);
}