Skip to content

How to implement relocation of return values #140329

Open
@Tt421

Description

@Tt421

In the llvm-project of emscripten. It use TypeIndex in the file /llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyInstrCall.td implement the parameter of CALL_INDIRECT instruction. I looked at the code briefly and found that it is indeed handling TypeIndex in Relocation.

If I need to implement an instruction, the return value of this instruction is related to the processing type of TypeIndex.
This instruction looks like ref.null ht, which ht is 𝑥:s33, the return value of this instruction can be ref x (𝑥 ≥ 0).

How can I modify the code of the llvm-project to achieve the above effect? Can you give me some implementation suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:WebAssemblyquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions