diff options
| author | 2018-10-10 14:21:55 +0100 | |
|---|---|---|
| committer | 2018-10-10 15:25:26 +0100 | |
| commit | a2da9b99fa1ea3d25d52da71308a623b2aae216c (patch) | |
| tree | 5533be23eee7c24b68b1b72272cbae3f35a708cb /compiler/optimizing | |
| parent | dc3b4670b170b39a8bd6498d4de69c1513af1db2 (diff) | |
ART: Completely remove the --compile-pic option.
And the PIC-related fields from image header.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: Pixel 2 XL boots.
Test: testrunner.py --target --optimizing
Bug: 77856493
Change-Id: I3787369378f12d8cd9003bebeae62830a67def33
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/code_generator_arm64.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_arm_vixl.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_mips.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_mips64.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_x86.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_x86_64.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/pc_relative_fixups_x86.cc | 3 |
7 files changed, 7 insertions, 8 deletions
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc index 25eadcdc72..0a28f6557a 100644 --- a/compiler/optimizing/code_generator_arm64.cc +++ b/compiler/optimizing/code_generator_arm64.cc @@ -4350,7 +4350,7 @@ void CodeGeneratorARM64::LoadBootImageAddress(vixl::aarch64::Register reg, // Add ADD with its PC-relative type patch. vixl::aarch64::Label* add_label = NewBootImageIntrinsicPatch(boot_image_reference, adrp_label); EmitAddPlaceholder(add_label, reg.X(), reg.X()); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { // Add ADRP with its PC-relative .data.bimg.rel.ro patch. vixl::aarch64::Label* adrp_label = NewBootImageRelRoPatch(boot_image_reference); EmitAdrpPlaceholder(adrp_label, reg.X()); diff --git a/compiler/optimizing/code_generator_arm_vixl.cc b/compiler/optimizing/code_generator_arm_vixl.cc index 130ccf3126..8bd4af50f3 100644 --- a/compiler/optimizing/code_generator_arm_vixl.cc +++ b/compiler/optimizing/code_generator_arm_vixl.cc @@ -8914,7 +8914,7 @@ void CodeGeneratorARMVIXL::LoadBootImageAddress(vixl32::Register reg, CodeGeneratorARMVIXL::PcRelativePatchInfo* labels = NewBootImageIntrinsicPatch(boot_image_reference); EmitMovwMovtPlaceholder(labels, reg); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { CodeGeneratorARMVIXL::PcRelativePatchInfo* labels = NewBootImageRelRoPatch(boot_image_reference); EmitMovwMovtPlaceholder(labels, reg); diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc index 1cf55152bb..1f0e200cb7 100644 --- a/compiler/optimizing/code_generator_mips.cc +++ b/compiler/optimizing/code_generator_mips.cc @@ -1766,7 +1766,7 @@ void CodeGeneratorMIPS::LoadBootImageAddress(Register reg, uint32_t boot_image_r PcRelativePatchInfo* info_low = NewBootImageIntrinsicPatch(boot_image_reference, info_high); EmitPcRelativeAddressPlaceholderHigh(info_high, TMP, /* base */ ZERO); __ Addiu(reg, TMP, /* placeholder */ 0x5678, &info_low->label); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { PcRelativePatchInfo* info_high = NewBootImageRelRoPatch(boot_image_reference); PcRelativePatchInfo* info_low = NewBootImageRelRoPatch(boot_image_reference, info_high); EmitPcRelativeAddressPlaceholderHigh(info_high, reg, /* base */ ZERO); diff --git a/compiler/optimizing/code_generator_mips64.cc b/compiler/optimizing/code_generator_mips64.cc index 27534b004a..0005d8f6b6 100644 --- a/compiler/optimizing/code_generator_mips64.cc +++ b/compiler/optimizing/code_generator_mips64.cc @@ -1680,7 +1680,7 @@ void CodeGeneratorMIPS64::LoadBootImageAddress(GpuRegister reg, uint32_t boot_im PcRelativePatchInfo* info_low = NewBootImageIntrinsicPatch(boot_image_reference, info_high); EmitPcRelativeAddressPlaceholderHigh(info_high, AT, info_low); __ Daddiu(reg, AT, /* placeholder */ 0x5678); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { PcRelativePatchInfo* info_high = NewBootImageRelRoPatch(boot_image_reference); PcRelativePatchInfo* info_low = NewBootImageRelRoPatch(boot_image_reference, info_high); EmitPcRelativeAddressPlaceholderHigh(info_high, AT, info_low); diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index 39cbe5e850..ca1e93b75e 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -4988,7 +4988,7 @@ void CodeGeneratorX86::LoadBootImageAddress(Register reg, invoke->GetLocations()->InAt(invoke->GetSpecialInputIndex()).AsRegister<Register>(); __ leal(reg, Address(method_address_reg, CodeGeneratorX86::kDummy32BitOffset)); RecordBootImageIntrinsicPatch(method_address, boot_image_reference); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { DCHECK_EQ(invoke->InputCount(), invoke->GetNumberOfArguments() + 1u); HX86ComputeBaseMethodAddress* method_address = invoke->InputAt(invoke->GetSpecialInputIndex())->AsX86ComputeBaseMethodAddress(); diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index e458dfffb4..e6643fb08c 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -1125,7 +1125,7 @@ void CodeGeneratorX86_64::LoadBootImageAddress(CpuRegister reg, uint32_t boot_im if (GetCompilerOptions().IsBootImage()) { __ leal(reg, Address::Absolute(CodeGeneratorX86_64::kDummy32BitOffset, /* no_rip */ false)); RecordBootImageIntrinsicPatch(boot_image_reference); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { __ movl(reg, Address::Absolute(CodeGeneratorX86_64::kDummy32BitOffset, /* no_rip */ false)); RecordBootImageRelRoPatch(boot_image_reference); } else { diff --git a/compiler/optimizing/pc_relative_fixups_x86.cc b/compiler/optimizing/pc_relative_fixups_x86.cc index 4b07d5b621..4ff293c46c 100644 --- a/compiler/optimizing/pc_relative_fixups_x86.cc +++ b/compiler/optimizing/pc_relative_fixups_x86.cc @@ -17,7 +17,6 @@ #include "pc_relative_fixups_x86.h" #include "code_generator_x86.h" #include "intrinsics_x86.h" -#include "runtime.h" namespace art { namespace x86 { @@ -239,7 +238,7 @@ class PCRelativeHandlerVisitor : public HGraphVisitor { case Intrinsics::kIntegerValueOf: // This intrinsic can be call free if it loads the address of the boot image object. // If we're compiling PIC, we need the address base for loading from .data.bimg.rel.ro. - if (Runtime::Current()->UseJitCompilation()) { + if (!codegen_->GetCompilerOptions().GetCompilePic()) { break; } FALLTHROUGH_INTENDED; |