diff options
| author | 2017-01-26 19:04:23 +0000 | |
|---|---|---|
| committer | 2017-01-27 13:31:09 +0000 | |
| commit | d0b51838d5cbec18a9b3a6de7bd9bd2a7a3905d5 (patch) | |
| tree | 4304574849efa0b36c19b2e122d29ac67d0dd59a /compiler/optimizing | |
| parent | fbf47ea64a9f797a82030e919fa4f085c9eb5b28 (diff) | |
Don't use VIXL's temp registers in LocationsBuilderARM64::HandleFieldGet.
Before this CL, when emitting a volatile field load with a
large offset, it was possible to deplete the pool of VIXL
ARM64 temporary registers (IP0, IP1) in the concurrent
collector configuration. To avoid this, we now request a
temporary register from the register allocator instead.
Test: m test-art-target-run-test-635-checker-arm64-volatile-load-cc
Bug: 34726333
Change-Id: Idf73a0306142c6133e259783aacaf7ad5401a2fd
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/code_generator_arm64.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc index 9762ee81b1..e685d598d6 100644 --- a/compiler/optimizing/code_generator_arm64.cc +++ b/compiler/optimizing/code_generator_arm64.cc @@ -1903,6 +1903,9 @@ void LocationsBuilderARM64::HandleFieldGet(HInstruction* instruction) { LocationSummary::kNoCall); if (object_field_get_with_read_barrier && kUseBakerReadBarrier) { locations->SetCustomSlowPathCallerSaves(RegisterSet::Empty()); // No caller-save registers. + // We need a temporary register for the read barrier marking slow + // path in CodeGeneratorARM64::GenerateFieldLoadWithBakerReadBarrier. + locations->AddTemp(Location::RequiresRegister()); } locations->SetInAt(0, Location::RequiresRegister()); if (Primitive::IsFloatingPointType(instruction->GetType())) { @@ -1930,11 +1933,9 @@ void InstructionCodeGeneratorARM64::HandleFieldGet(HInstruction* instruction, if (field_type == Primitive::kPrimNot && kEmitCompilerReadBarrier && kUseBakerReadBarrier) { // Object FieldGet with Baker's read barrier case. - MacroAssembler* masm = GetVIXLAssembler(); - UseScratchRegisterScope temps(masm); // /* HeapReference<Object> */ out = *(base + offset) Register base = RegisterFrom(base_loc, Primitive::kPrimNot); - Register temp = temps.AcquireW(); + Register temp = WRegisterFrom(locations->GetTemp(0)); // Note that potential implicit null checks are handled in this // CodeGeneratorARM64::GenerateFieldLoadWithBakerReadBarrier call. codegen_->GenerateFieldLoadWithBakerReadBarrier( |