diff options
| author | 2017-05-02 06:10:02 +0000 | |
|---|---|---|
| committer | 2017-05-02 06:10:04 +0000 | |
| commit | df48db90d5709542f2531fd1df310e81814ab788 (patch) | |
| tree | 431ed5cfdd2b203fb4ebd3a42d2896d1db2fe76e /compiler/optimizing | |
| parent | 0d12a2aa35b3b93d81645e93d2fcf915864934a6 (diff) | |
| parent | c83dd7bfde2171c879efb92a31a363505385ffb9 (diff) | |
Merge "Revert "Add concurrent card graying for immune spaces""
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/code_generator_x86.cc | 8 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_x86_64.cc | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index 8afc6bab89..08a752f1d2 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -7177,10 +7177,10 @@ void InstructionCodeGeneratorX86::GenerateGcRootFieldLoad( instruction, root, /* unpoison_ref_before_marking */ false); codegen_->AddSlowPath(slow_path); - // Test if the GC is marking. Note that X86 and X86_64 don't switch the entrypoints when the - // GC is marking. - const int32_t is_marking_offset = Thread::IsGcMarkingOffset<kX86PointerSize>().Int32Value(); - __ fs()->cmpl(Address::Absolute(is_marking_offset), Immediate(0)); + // Test the entrypoint (`Thread::Current()->pReadBarrierMarkReg ## root.reg()`). + const int32_t entry_point_offset = + CodeGenerator::GetReadBarrierMarkEntryPointsOffset<kX86PointerSize>(root.reg()); + __ fs()->cmpl(Address::Absolute(entry_point_offset), Immediate(0)); // The entrypoint is null when the GC is not marking. __ j(kNotEqual, slow_path->GetEntryLabel()); __ Bind(slow_path->GetExitLabel()); diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index c2b1a3190d..ff6e099d12 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -6542,11 +6542,10 @@ void InstructionCodeGeneratorX86_64::GenerateGcRootFieldLoad( instruction, root, /* unpoison_ref_before_marking */ false); codegen_->AddSlowPath(slow_path); - // Test if the GC is marking. Note that X86 and X86_64 don't switch the entrypoints when the - // GC is marking. - const int32_t is_marking_offset = - Thread::IsGcMarkingOffset<kX86_64PointerSize>().Int32Value(); - __ gs()->cmpl(Address::Absolute(is_marking_offset, /* no_rip */ true), Immediate(0)); + // Test the `Thread::Current()->pReadBarrierMarkReg ## root.reg()` entrypoint. + const int32_t entry_point_offset = + CodeGenerator::GetReadBarrierMarkEntryPointsOffset<kX86_64PointerSize>(root.reg()); + __ gs()->cmpl(Address::Absolute(entry_point_offset, /* no_rip */ true), Immediate(0)); // The entrypoint is null when the GC is not marking. __ j(kNotEqual, slow_path->GetEntryLabel()); __ Bind(slow_path->GetExitLabel()); |