summaryrefslogtreecommitdiff
path: root/src/compiler/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/codegen')
-rw-r--r--src/compiler/codegen/mir_to_lir.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/codegen/mir_to_lir.cc b/src/compiler/codegen/mir_to_lir.cc
index acdeafe32c..1d64661c5d 100644
--- a/src/compiler/codegen/mir_to_lir.cc
+++ b/src/compiler/codegen/mir_to_lir.cc
@@ -86,6 +86,11 @@ static bool CompileDalvikInstruction(CompilationUnit* cu, MIR* mir, BasicBlock*
cg->GenMoveException(cu, rl_dest);
break;
case Instruction::RETURN_VOID:
+ if (((cu->access_flags & kAccConstructor) != 0) &&
+ cu->compiler->RequiresConstructorBarrier(Thread::Current(), cu->dex_file,
+ cu->class_def_idx)) {
+ cg->GenMemBarrier(cu, kStoreStore);
+ }
if (!(cu->attrs & METHOD_IS_LEAF)) {
cg->GenSuspendTest(cu, opt_flags);
}