<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/140329>140329</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
How to implement relocation of return values
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Tt421
</td>
</tr>
</table>
<pre>
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?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMk82O4ygQx58GX0obEfyR-OCDN93WWmrtoRVpjiNsCptpDBHg9OTtR5BMd9Kaw5xsKOpfv_ri3qvJIDak_JeUTxlfw2xdcwwF22aDFZemNxBmBK3Pyz8nZ3_gGMBKwMWPTp0Cmg30AVaPQCp6vJywNwJ_koqCunpKpZONsO5e5HaMHzUQ1h25mzDefsOh9R6XQV8eT73xwR241psgkv5y0rigCSnMiTu-YEAX6UhFD-3Ly_f-_6f-9flwvOL44NYxKBuRQVv7hgL41Xu0AmFwCqW-ADcCpF2NgDDzACqA8qCMQBQwcyO0MtOfsn1FbUeeAhDaEtr2Enow0S3YO1xu7mEIOyQEh2F1Bs5crxhzCHOK-vEuQjjUPFzlUs7Ojuh9xAmXU_L6YIoIx68SMWkPWr2ljjiUG7NqDXNI_TnA-6zGOZrSTYwYDR0l9ROpt6QtSd76PL-9_ivqkRsYfoeDVCrC9l9l4-0zI_uatCVQwupbBf-z70mhh8UKJS-fzUqxku7DVFU0FoePs8Izphd8sGcElDKa8w4O3MDFrjCpM8KC4O2Cn81J7QO_ThP6-OtJ3mWiyUWd1zzDZrsrdkVR7mmZzY2UxYiVFDta8rHO65EXZc5GUe3lsNvvx0w1jLKSltsd3eZVUW6GUg7bHa12OaLc55wUFBeu9CYmsbFuypT3KzbbguaszjQfUPu0nIwZfIdkJYzFXXVNynxYJ08KqpUP_lMmqKCxieV7GD33MaKxgPfN89nqdDOHcPIkbwnrCOsmFeZ12Ix2udvWxx1OQJ6w7kZ8btivAAAA__9cS24v">