pan/va: Add LD_CVT

Adds LD_CVT instruction for loading memory with conversion.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37007>
This commit is contained in:
Ludvig Lindau 2025-08-26 11:29:56 +00:00 committed by Marge Bot
parent a9e3b679f1
commit 6058cd2dfa
2 changed files with 26 additions and 0 deletions

View file

@ -1433,6 +1433,23 @@
<src>Index</src>
</ins>
<ins name="LD_CVT" title="Load with conversion" opcode="0x70" unused="true" unit="LS">
<desc>
Load from memory with data conversion. The address to load from is given in
the first source, which must be a 64-bit register (a pair of 32-bit
registers). The other source is the conversion descriptor used for the load.
</desc>
<slot/>
<va_mod name="memory_access" start="37" size="3"/>
<vecsize/>
<regfmt/>
<sr write="true"/>
<sr_count/>
<src size="64">64-bit address to load from</src>
<imm name="offset" start="8" size="8"/>
<src>Internal conversion descriptor</src>
</ins>
<ins name="ST_CVT" title="Store with conversion" opcode="0x71" unused="true" unit="LS">
<desc>
Store to memory with data conversion. The address to store to is given in

View file

@ -975,6 +975,15 @@ va_pack_instr(const bi_instr *I, unsigned arch)
break;
case BI_OPCODE_LD_CVT:
hex |= (uint64_t)va_pack_src(I, 0);
hex |= va_pack_byte_offset(I);
/* Conversion descriptor */
hex |= (uint64_t)va_pack_src(I, 2) << 16;
hex |= va_pack_memory_access(I) << 37;
break;
case BI_OPCODE_ST_CVT:
/* Staging read */
hex |= va_pack_store(I);