diff options
author | Dave Allison <dallison@google.com> | 2014-04-01 23:44:59 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-01 23:45:00 +0000 |
commit | b74a8625b6194fe86769416c70497e74a73a740d (patch) | |
tree | 5f353e7044b43e0580019e0df01087183dbe2f0d | |
parent | 52f5ecb1714a17b72182fcdf88ae7f6d817855cc (diff) | |
parent | 43a065ce1dda78e963868f9753a6e263721af927 (diff) | |
download | art-b74a8625b6194fe86769416c70497e74a73a740d.zip art-b74a8625b6194fe86769416c70497e74a73a740d.tar.gz art-b74a8625b6194fe86769416c70497e74a73a740d.tar.bz2 |
Merge "Add GenBarrier() calls to terminate all IT blocks."
-rw-r--r-- | compiler/dex/quick/arm/int_arm.cc | 3 | ||||
-rw-r--r-- | compiler/dex/quick/gen_common.cc | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/compiler/dex/quick/arm/int_arm.cc b/compiler/dex/quick/arm/int_arm.cc index dc2b3c3..8177999 100644 --- a/compiler/dex/quick/arm/int_arm.cc +++ b/compiler/dex/quick/arm/int_arm.cc @@ -816,6 +816,8 @@ bool ArmMir2Lir::GenInlinedCas(CallInfo* info, bool is_long, bool is_object) { // Still one conditional left from OpIT(kCondEq, "T") from either branch OpRegImm(kOpCmp /* eq */, r_tmp, 1); + GenBarrier(); + OpCondBranch(kCondEq, target); if (!load_early) { @@ -829,6 +831,7 @@ bool ArmMir2Lir::GenInlinedCas(CallInfo* info, bool is_long, bool is_object) { OpIT(kCondUlt, ""); LoadConstant(rl_result.reg, 0); /* cc */ FreeTemp(r_tmp); // Now unneeded. + GenBarrier(); // Barrier to terminate OpIT. StoreValue(rl_dest, rl_result); diff --git a/compiler/dex/quick/gen_common.cc b/compiler/dex/quick/gen_common.cc index 262279f..7af9d57 100644 --- a/compiler/dex/quick/gen_common.cc +++ b/compiler/dex/quick/gen_common.cc @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #include "dex/compiler_ir.h" #include "dex/compiler_internals.h" #include "dex/quick/arm/arm_lir.h" @@ -1084,6 +1083,7 @@ void Mir2Lir::GenInstanceofFinal(bool use_declaring_class, uint32_t type_idx, Re OpRegReg(kOpCmp, check_class, object_class); // Same? OpIT(kCondEq, ""); // if-convert the test LoadConstant(result_reg, 1); // .eq case - load true + GenBarrier(); } else { ne_branchover = OpCmpBranch(kCondNe, check_class, object_class, NULL); LoadConstant(result_reg, 1); // eq case - load true @@ -1168,6 +1168,7 @@ void Mir2Lir::GenInstanceofCallingHelper(bool needs_access_check, bool type_know OpIT(kCondEq, "E"); // if-convert the test LoadConstant(rl_result.reg, 1); // .eq case - load true LoadConstant(rl_result.reg, 0); // .ne case - load false + GenBarrier(); } else { LoadConstant(rl_result.reg, 0); // ne case - load false branchover = OpCmpBranch(kCondNe, TargetReg(kArg1), TargetReg(kArg2), NULL); @@ -1184,6 +1185,7 @@ void Mir2Lir::GenInstanceofCallingHelper(bool needs_access_check, bool type_know } OpRegCopy(TargetReg(kArg0), TargetReg(kArg2)); // .ne case - arg0 <= class OpReg(kOpBlx, r_tgt); // .ne case: helper(class, ref->class) + GenBarrier(); FreeTemp(r_tgt); } else { if (!type_known_abstract) { |