diff options
author | Mathieu Chartier <mathieuc@google.com> | 2016-11-14 14:38:53 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2016-11-15 13:02:24 -0800 |
commit | 9fd8c60cdff7b28a89bb97fd90ae9d0f37cf8f8b (patch) | |
tree | 630b6f23441a26e4b5d9434900993a710635c9e9 /compiler/optimizing/code_generator_mips.cc | |
parent | 26c8f54be31ccf99540906746b17fc8bba1bab9a (diff) |
Pass object instead of class to instanceof entrypoint
Reduces code size. Also avoid read barrier for kArrayCheck case.
Bug: 32577579
Test: test-art-host, test-art-target CC
Change-Id: Ia890f656fe166b2d39c522b63a8a6469404134ae
Diffstat (limited to 'compiler/optimizing/code_generator_mips.cc')
-rw-r--r-- | compiler/optimizing/code_generator_mips.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc index f169eb00f3..573bb507f2 100644 --- a/compiler/optimizing/code_generator_mips.cc +++ b/compiler/optimizing/code_generator_mips.cc @@ -378,14 +378,6 @@ class TypeCheckSlowPathMIPS : public SlowPathCodeMIPS { void EmitNativeCode(CodeGenerator* codegen) OVERRIDE { LocationSummary* locations = instruction_->GetLocations(); - Location arg0, arg1; - if (instruction_->IsInstanceOf()) { - arg0 = locations->InAt(1); - arg1 = locations->Out(); - } else { - arg0 = locations->InAt(0); - arg1 = locations->InAt(1); - } uint32_t dex_pc = instruction_->GetDexPc(); DCHECK(instruction_->IsCheckCast() || !locations->GetLiveRegisters()->ContainsCoreRegister(locations->Out().reg())); @@ -397,15 +389,15 @@ class TypeCheckSlowPathMIPS : public SlowPathCodeMIPS { // We're moving two locations to locations that could overlap, so we need a parallel // move resolver. InvokeRuntimeCallingConvention calling_convention; - codegen->EmitParallelMoves(arg0, + codegen->EmitParallelMoves(locations->InAt(0), Location::RegisterLocation(calling_convention.GetRegisterAt(0)), Primitive::kPrimNot, - arg1, + locations->InAt(1), Location::RegisterLocation(calling_convention.GetRegisterAt(1)), Primitive::kPrimNot); if (instruction_->IsInstanceOf()) { mips_codegen->InvokeRuntime(kQuickInstanceofNonTrivial, instruction_, dex_pc, this); - CheckEntrypointTypes<kQuickInstanceofNonTrivial, size_t, mirror::Class*, mirror::Class*>(); + CheckEntrypointTypes<kQuickInstanceofNonTrivial, size_t, mirror::Object*, mirror::Class*>(); Primitive::Type ret_type = instruction_->GetType(); Location ret_loc = calling_convention.GetReturnLocation(ret_type); mips_codegen->MoveLocation(locations->Out(), ret_loc, ret_type); |