[llvm] [RISCV] Add Stackmap/Statepoint/Patchpoint support with targets (PR #77337)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 09:53:09 PST 2024
================
@@ -152,8 +153,35 @@ void RISCVAsmPrinter::LowerPATCHPOINT(MCStreamer &OutStreamer, StackMaps &SM,
PatchPointOpers Opers(&MI);
+ const MachineOperand &CalleeMO = Opers.getCallTarget();
unsigned EncodedBytes = 0;
+ if (CalleeMO.isImm()) {
+ uint64_t CallTarget = CalleeMO.getImm();
+ if (CallTarget) {
+ assert((CallTarget & 0xFFFF'FFFF'FFFF) == CallTarget &&
+ "High 16 bits of call target should be zero.");
+ // Materialize the jump address:
+ SmallVector<MCInst, 8> Seq =
+ RISCVMatInt::generateMCInstSeq(CallTarget, *STI, RISCV::X1);
+ for (MCInst &Inst : Seq) {
----------------
topperc wrote:
Drop curly braces
https://github.com/llvm/llvm-project/pull/77337
More information about the llvm-commits
mailing list