<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55659>55659</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Stackmap docs are unclear about sub-registers.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vext01
</td>
</tr>
</table>
<pre>
As noted in [D126204](https://reviews.llvm.org/D126204), in the case of a Register record, the Offset or SmallConstant field can encode a sub-register index.
This isn't mentioned in the docs, or maybe it is, I'm not sure:
> Each entry in the liveout register list contains a DWARF register number and size in bytes. The stackmap format deliberately omits specific subregister information. Instead the runtime must interpret this information conservatively. For example, if the stackmap reports one byte at %rax, then the value may be in either %al or %ah.
It's not clear if this is talking about only the liveouts. I'd assume it is, because without sub-register info, you wouldn't know where to find the necessary data to reconstruct the stack. I guess that for liveouts, you only care about which registers need to be saved, and not exactly what is stored in each sub-register.
If that's the case, the docs should be revised to make it clear that:
- For `Register` stackmap records, the `Offset or SmallConstant` field can express a sub-register.
- The quoted text above applies only to liveouts.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1VMtu2zoQ_Rp5M4ggy1YSL7RImxrI6gJtga4pcmTzhiJ1-ZDt-_WdoSLbKVDAsCRyHmfOnJnOqUv7EsC6iAq0haL58rquH-tqWzSvRf18jHEMxealqPf08zhpPIXSmGkonT_Q0WJd74r6K0eIRwQpAoLrQcB3POgQ0YNH6bxiGzb4p-8DRnAefgzCmK_OhihshF6jUeRuAa10CilCSN2DX6Joq_BcFtVrUb3M_z-POoAOtqifIgxoo3Z2LoXzKCcD56REg7h0CDqSMZ-8kcPAdVMCj1zhXdBi8w2-CXkkFNFflmBGT-hShCsaQw-QzkahbSCor79evu9v1zYNHT2EVRD0_8hhukvEUMJPikYFy_dBjNA7P4gICo0mcxHRXMANOgYII0rda8kc3FEwO1CdJbwRbyhUhucTFT8gDIlQ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