Changes between Version 4 and Version 5 of GcnInstrsSmrd


Ignore:
Timestamp:
12/23/15 17:00:17 (8 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsSmrd

    v4 v5  
    5050<li>IMM=0 - OFFSET holds number of SGPR that holds byte offset to SBASE.</li>
    5151</ul>
    52 <p>For S_LOAD_DWORD<em> instructions, 2 SBASE SGPRs holds an base 48-bit address and a
     52<p>For S_LOAD_DWORD* instructions, 2 SBASE SGPRs holds an base 48-bit address and a
    535316-bit size.
    54 For S_BUFFER_LOAD_DWORD</em> instructions, 4 SBASE SGPRs holds a buffer descriptor.
     54For S_BUFFER_LOAD_DWORD* instructions, 4 SBASE SGPRs holds a buffer descriptor.
    5555In this case, SBASE must be a multipla of 2.</p>
    5656<p>The SMRD instructions can return the resul data out of the order. Any SMRD operation
     
    144144Syntax: S_BUFFER_LOAD_DWORD SDST, SBASE(4), OFFSET<br />
    145145Description: Load single dword from read-only memory through constant cache (kcache).
    146 SBASE is buffer descriptor.</p>
     146SBASE is buffer descriptor.<br />
     147Operation:<br />
     148<code>SDST = *(UINT32*)(SMRD + (OFFSET &amp; 3))</code></p>
    147149<h4>S_BUFFER_LOAD_DWORDX16</h4>
    148150<p>Opcode: 12 (0xc)<br />
    149151Syntax: S_BUFFER_LOAD_DWORDX16 SDST(16), SBASE(4), OFFSET<br />
    150152Description: Load 16 dwords from read-only memory through constant cache (kcache).
    151 SBASE is buffer descriptor.</p>
     153SBASE is buffer descriptor.<br />
     154Operation:<br />
     155<code>for (BYTE i = 0; i &lt; 16; i++)
     156    SDST[i] = *(UINT32*)(SMRD + i*4 + (OFFSET &amp; 3))</code></p>
    152157<h4>S_BUFFER_LOAD_DWORDX2</h4>
    153158<p>Opcode: 9 (0x9)<br />
    154159Syntax: S_BUFFER_LOAD_DWORDX2 SDST(2), SBASE(4), OFFSET<br />
    155160Description: Load two dwords from read-only memory through constant cache (kcache).
    156 SBASE is buffer descriptor.</p>
     161SBASE is buffer descriptor.<br />
     162Operation:<br />
     163<code>SDST = *(UINT64*)(SMRD + (OFFSET &amp; 3))</code></p>
    157164<h4>S_BUFFER_LOAD_DWORDX4</h4>
    158165<p>Opcode: 10 (0xa)<br />
    159166Syntax: S_BUFFER_LOAD_DWORDX4 SDST(4), SBASE(4), OFFSET<br />
    160167Description: Load four dwords from read-only memory through constant cache (kcache).
    161 SBASE is buffer descriptor.</p>
     168SBASE is buffer descriptor.<br />
     169Operation:<br />
     170<code>for (BYTE i = 0; i &lt; 4; i++)
     171    SDST[i] = *(UINT32*)(SMRD + i*4 + (OFFSET &amp; 3))</code></p>
    162172<h4>S_BUFFER_LOAD_DWORDX8</h4>
    163173<p>Opcode: 11 (0xb)<br />
    164174Syntax: S_BUFFER_LOAD_DWORDX8 SDST(8), SBASE(4), OFFSET<br />
    165175Description: Load eight dwords from read-only memory through constant cache (kcache).
    166 SBASE is buffer descriptor.</p>
     176SBASE is buffer descriptor.<br />
     177Operation:<br />
     178<code>for (BYTE i = 0; i &lt; 8; i++)
     179    SDST[i] = *(UINT32*)(SMRD + i*4 + (OFFSET &amp; 3))</code></p>
    167180<h4>S_DCACHE_INV</h4>
    168181<p>Opcode: 31 (0x1f)<br />
     
    176189<p>Opcode: 0 (0x0)<br />
    177190Syntax: S_LOAD_DWORD SDST, SBASE(2), OFFSET<br />
    178 Description: Load single dword from read-only memory through constant cache (kcache).</p>
     191Description: Load single dword from read-only memory through constant cache (kcache).<br />
     192Operation:<br />
     193<code>SDST = *(UINT32*)(SMRD + (OFFSET &amp; 3))</code></p>
    179194<h4>S_LOAD_DWORDX16</h4>
    180195<p>Opcode: 4 (0x4)<br />
    181196Syntax: S_LOAD_DWORDX16 SDST(16), SBASE(2), OFFSET<br />
    182 Description: Load 16 dwords from read-only memory through constant cache (kcache).</p>
     197Description: Load 16 dwords from read-only memory through constant cache (kcache).<br />
     198Operation:<br />
     199<code>for (BYTE i = 0; i &lt; 16; i++)
     200    SDST[i] = *(UINT32*)(SMRD + i*4 + (OFFSET &amp; 3))</code></p>
    183201<h4>S_LOAD_DWORDX2</h4>
    184202<p>Opcode: 1 (0x1)<br />
    185203Syntax: S_LOAD_DWORDX2 SDST(2), SBASE(2), OFFSET<br />
    186 Description: Load two dwords from read-only memory through constant cache (kcache).</p>
     204Description: Load two dwords from read-only memory through constant cache (kcache).<br />
     205<code>SDST = *(UINT64*)(SMRD + (OFFSET &amp; 3))</code></p>
    187206<h4>S_LOAD_DWORDX4</h4>
    188207<p>Opcode: 2 (0x2)<br />
    189208Syntax: S_LOAD_DWORDX4 SDST(4), SBASE(2), OFFSET<br />
    190 Description: Load four dwords from read-only memory through constant cache (kcache).</p>
     209Description: Load four dwords from read-only memory through constant cache (kcache).<br />
     210Operation:<br />
     211<code>for (BYTE i = 0; i &lt; 4; i++)
     212    SDST[i] = *(UINT32*)(SMRD + i*4 + (OFFSET &amp; 3))</code></p>
    191213<h4>S_LOAD_DWORDX8</h4>
    192214<p>Opcode: 3 (0x3)<br />
    193215Syntax: S_LOAD_DWORDX8 SDST(8), SBASE(2), OFFSET<br />
    194 Description: Load eight dwords from read-only memory through constant cache (kcache).</p>
     216Description: Load eight dwords from read-only memory through constant cache (kcache).<br />
     217Operation:<br />
     218<code>for (BYTE i = 0; i &lt; 8; i++)
     219    SDST[i] = *(UINT32*)(SMRD + i*4 + (OFFSET &amp; 3))</code></p>
    195220<h4>S_MEMTIME</h4>
    196221<p>Opcode: 30 (0x1e)<br />