diff options
author | 2023-07-26 11:43:38 +0800 | |
---|---|---|
committer | 2023-07-28 13:04:39 +0000 | |
commit | f3ba9564534ceb186eb85a4858a16f318dc2e91c (patch) | |
tree | 9b04f6291ae160e62295a421cedf7bb30b7396a8 | |
parent | d348fec56a79e765fe5a5449177e099c028f6060 (diff) |
RISCV: [Codegen] Add VisitInvokeVirtual
Test: m test-art-host-gtest
Bug: 283082089
Change-Id: Iba11242c634a401f9d797e81526d735bab66d6dc
Signed-off-by: Lifang Xia <lifang_xia@linux.alibaba.com>
Signed-off-by: Wendong Wang <wangwd@xcvmbyte.com>
-rw-r--r-- | compiler/optimizing/code_generator_riscv64.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/compiler/optimizing/code_generator_riscv64.cc b/compiler/optimizing/code_generator_riscv64.cc index 2f253885cc..9280ad498a 100644 --- a/compiler/optimizing/code_generator_riscv64.cc +++ b/compiler/optimizing/code_generator_riscv64.cc @@ -2114,13 +2114,21 @@ void InstructionCodeGeneratorRISCV64::VisitInvokeStaticOrDirect( } void LocationsBuilderRISCV64::VisitInvokeVirtual(HInvokeVirtual* instruction) { - UNUSED(instruction); - LOG(FATAL) << "Unimplemented"; + IntrinsicLocationsBuilderRISCV64 intrinsic(GetGraph()->GetAllocator(), codegen_); + if (intrinsic.TryDispatch(instruction)) { + return; + } + + HandleInvoke(instruction); } void InstructionCodeGeneratorRISCV64::VisitInvokeVirtual(HInvokeVirtual* instruction) { - UNUSED(instruction); - LOG(FATAL) << "Unimplemented"; + if (TryGenerateIntrinsicCode(instruction, codegen_)) { + return; + } + + codegen_->GenerateVirtualCall(instruction, instruction->GetLocations()->GetTemp(0)); + DCHECK(!codegen_->IsLeafMethod()); } void LocationsBuilderRISCV64::VisitInvokePolymorphic(HInvokePolymorphic* instruction) { |