riscv64: implement art_quick_resolution_trampoline.

Test: run ART test 993-breakpoints-non-debuggable on a Linux RISC-V VM
(it failed before this patch and it passes with this patch):

  lunch aosp_riscv64-userdebug

  export ART_TEST_SSH_USER=ubuntu
  export ART_TEST_SSH_HOST=localhost
  export ART_TEST_SSH_PORT=10001
  export ART_TEST_ON_VM=true

  . art/tools/buildbot-utils.sh
  art/tools/buildbot-build.sh --target

  # Create, boot and configure the VM.
  art/tools/buildbot-vm.sh create
  art/tools/buildbot-vm.sh boot
  art/tools/buildbot-vm.sh setup-ssh  # password: 'ubuntu'

  art/tools/buildbot-cleanup-device.sh
  art/tools/buildbot-setup-device.sh
  art/tools/buildbot-sync.sh

  art/test.py --target -r --no-prebuild --ndebug --no-image \
    --64 --interpreter 993-breakpoints-non-debuggable

Bug: b/271573990
Co-authored-by: Lifang Xia <lifang_xia@linux.alibaba.com>
Change-Id: I38f1e65fcfd26901662cb72ac267a6b1bc2a67d1
diff --git a/runtime/arch/riscv64/quick_entrypoints_riscv64.S b/runtime/arch/riscv64/quick_entrypoints_riscv64.S
index 19f99b4..d107004 100644
--- a/runtime/arch/riscv64/quick_entrypoints_riscv64.S
+++ b/runtime/arch/riscv64/quick_entrypoints_riscv64.S
@@ -557,8 +557,32 @@
 ONE_ARG_RUNTIME_EXCEPTION art_invoke_obsolete_method_stub, artInvokeObsoleteMethod
 
 
+ENTRY art_quick_resolution_trampoline
+    SETUP_SAVE_REFS_AND_ARGS_FRAME
+
+    // const void* artQuickResolutionTrampoline(ArtMethod* called,         // a0
+    //                                          mirror::Object* receiver,  // a1
+    //                                          Thread* self,              // a2
+    //                                          ArtMethod** sp)            // a3
+    mv   a2, xSELF
+    mv   a3, sp
+    call artQuickResolutionTrampoline
+
+    beqz a0, 1f
+    .cfi_remember_state
+    mv   t0, a0    // Remember returned code pointer in t0.
+    ld   a0, (sp)  // artQuickResolutionTrampoline puts called method in *sp.
+
+    RESTORE_SAVE_REFS_AND_ARGS_FRAME
+    jr   t0
+1:
+    CFI_RESTORE_STATE_AND_DEF_CFA sp, FRAME_SIZE_SAVE_REFS_AND_ARGS
+    RESTORE_SAVE_REFS_AND_ARGS_FRAME
+    DELIVER_PENDING_EXCEPTION
+END art_quick_resolution_trampoline
+
+
 UNDEFINED art_quick_imt_conflict_trampoline
-UNDEFINED art_quick_resolution_trampoline
 UNDEFINED art_quick_deoptimize_from_compiled_code
 UNDEFINED art_quick_string_builder_append
 UNDEFINED art_quick_compile_optimized