[llvm] [RISCV] Add Stackmap/Statepoint/Patchpoint support with targets (PR #77337)

Sacha Coppey via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 04:42:36 PDT 2024


================
@@ -172,6 +199,35 @@ void RISCVAsmPrinter::LowerSTATEPOINT(MCStreamer &OutStreamer, StackMaps &SM,
     assert(PatchBytes % NOPBytes == 0 &&
            "Invalid number of NOP bytes requested!");
     emitNops(PatchBytes / NOPBytes);
+  } else {
+    // Lower call target and choose correct opcode
+    const MachineOperand &CallTarget = SOpers.getCallTarget();
+    MCOperand CallTargetMCOp;
+    switch (CallTarget.getType()) {
----------------
Zeavee wrote:

I added tests based on the `Statepoint` tests from `AArch64` since the architecture are similar.

https://github.com/llvm/llvm-project/pull/77337


More information about the llvm-commits mailing list