diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/dex/quick/arm64/call_arm64.cc | 6 | ||||
| -rw-r--r-- | compiler/dex/quick/mips64/call_mips64.cc | 6 | ||||
| -rw-r--r-- | compiler/dex/quick/x86/call_x86.cc | 7 | ||||
| -rw-r--r-- | compiler/driver/compiler_driver.cc | 2 | ||||
| -rw-r--r-- | compiler/image_writer.cc | 1 |
5 files changed, 14 insertions, 8 deletions
diff --git a/compiler/dex/quick/arm64/call_arm64.cc b/compiler/dex/quick/arm64/call_arm64.cc index 15edcc5142..82751626e3 100644 --- a/compiler/dex/quick/arm64/call_arm64.cc +++ b/compiler/dex/quick/arm64/call_arm64.cc @@ -449,14 +449,14 @@ static int Arm64NextSDCallInsn(CompilationUnit* cu, CallInfo* info, switch (state) { case 0: // Get the current Method* [sets kArg0] if (direct_code != static_cast<uintptr_t>(-1)) { - cg->LoadConstant(cg->TargetPtrReg(kInvokeTgt), direct_code); + cg->LoadConstantWide(cg->TargetPtrReg(kInvokeTgt), direct_code); } else if (Arm64UseRelativeCall(cu, target_method)) { // Defer to linker patch. } else { cg->LoadCodeAddress(target_method, type, kInvokeTgt); } if (direct_method != static_cast<uintptr_t>(-1)) { - cg->LoadConstant(cg->TargetReg(kArg0, kRef), direct_method); + cg->LoadConstantWide(cg->TargetReg(kArg0, kRef), direct_method); } else { cg->LoadMethodAddress(target_method, type, kArg0); } @@ -479,7 +479,7 @@ static int Arm64NextSDCallInsn(CompilationUnit* cu, CallInfo* info, // Set up direct code if known. if (direct_code != 0) { if (direct_code != static_cast<uintptr_t>(-1)) { - cg->LoadConstant(cg->TargetPtrReg(kInvokeTgt), direct_code); + cg->LoadConstantWide(cg->TargetPtrReg(kInvokeTgt), direct_code); } else if (Arm64UseRelativeCall(cu, target_method)) { // Defer to linker patch. } else { diff --git a/compiler/dex/quick/mips64/call_mips64.cc b/compiler/dex/quick/mips64/call_mips64.cc index 63cef7e348..31be1c21a6 100644 --- a/compiler/dex/quick/mips64/call_mips64.cc +++ b/compiler/dex/quick/mips64/call_mips64.cc @@ -356,12 +356,12 @@ static int Mips64NextSDCallInsn(CompilationUnit* cu, CallInfo* info ATTRIBUTE_UN switch (state) { case 0: // Get the current Method* [sets kArg0] if (direct_code != static_cast<uintptr_t>(-1)) { - cg->LoadConstant(cg->TargetPtrReg(kInvokeTgt), direct_code); + cg->LoadConstantWide(cg->TargetPtrReg(kInvokeTgt), direct_code); } else { cg->LoadCodeAddress(target_method, type, kInvokeTgt); } if (direct_method != static_cast<uintptr_t>(-1)) { - cg->LoadConstant(cg->TargetReg(kArg0, kRef), direct_method); + cg->LoadConstantWide(cg->TargetReg(kArg0, kRef), direct_method); } else { cg->LoadMethodAddress(target_method, type, kArg0); } @@ -382,7 +382,7 @@ static int Mips64NextSDCallInsn(CompilationUnit* cu, CallInfo* info ATTRIBUTE_UN // Set up direct code if known. if (direct_code != 0) { if (direct_code != static_cast<uintptr_t>(-1)) { - cg->LoadConstant(cg->TargetPtrReg(kInvokeTgt), direct_code); + cg->LoadConstantWide(cg->TargetPtrReg(kInvokeTgt), direct_code); } else { CHECK_LT(target_method.dex_method_index, target_method.dex_file->NumMethodIds()); cg->LoadCodeAddress(target_method, type, kInvokeTgt); diff --git a/compiler/dex/quick/x86/call_x86.cc b/compiler/dex/quick/x86/call_x86.cc index c3db3a64e5..11c146549e 100644 --- a/compiler/dex/quick/x86/call_x86.cc +++ b/compiler/dex/quick/x86/call_x86.cc @@ -332,7 +332,12 @@ static int X86NextSDCallInsn(CompilationUnit* cu, CallInfo* info, switch (state) { case 0: // Get the current Method* [sets kArg0] if (direct_method != static_cast<uintptr_t>(-1)) { - cg->LoadConstant(cg->TargetReg(kArg0, kRef), direct_method); + auto target_reg = cg->TargetReg(kArg0, kRef); + if (target_reg.Is64Bit()) { + cg->LoadConstantWide(target_reg, direct_method); + } else { + cg->LoadConstant(target_reg, direct_method); + } } else { cg->LoadMethodAddress(target_method, type, kArg0); } diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index be6c41a834..3d3d5cbc2a 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -932,7 +932,7 @@ void CompilerDriver::UpdateImageClasses(TimingLogger* timings) { Runtime* current = Runtime::Current(); // Suspend all threads. - current->GetThreadList()->SuspendAll(); + current->GetThreadList()->SuspendAll(__FUNCTION__); std::string error_msg; std::unique_ptr<ClinitImageUpdate> update(ClinitImageUpdate::Create(image_classes_.get(), diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index c7f81eab2f..d238b2cb05 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -137,6 +137,7 @@ bool ImageWriter::Write(const std::string& image_filename, if (oat_file_ == nullptr) { PLOG(ERROR) << "Failed to open writable oat file " << oat_filename << " for " << oat_location << ": " << error_msg; + oat_file->Erase(); return false; } CHECK_EQ(class_linker->RegisterOatFile(oat_file_), oat_file_); |