Changes between Version 3 and Version 4 of GcnInstrsSmem


Ignore:
Timestamp:
07/19/17 20:00:27 (5 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsSmem

    v3 v4  
    183183SBASE is buffer descriptor.<br />
    184184Operation:<br />
    185 <code>SDATA = *(UINT32*)(SMEM + (OFFSET &amp; 3))</code></p>
     185<code>SDATA = *(UINT32*)(SMEM + (OFFSET &amp; ~3))</code></p>
    186186<h4>S_BUFFER_LOAD_DWORDX16</h4>
    187187<p>Opcode: 12 (0xc)<br />
     
    191191Operation:<br />
    192192<code>for (BYTE i = 0; i &lt; 16; i++)
    193     SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; 3))</code></p>
     193    SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; ~3))</code></p>
    194194<h4>S_BUFFER_LOAD_DWORDX2</h4>
    195195<p>Opcode: 9 (0x9)<br />
     
    198198SBASE is buffer descriptor.<br />
    199199Operation:<br />
    200 <code>SDATA = *(UINT64*)(SMEM + (OFFSET &amp; 3))</code></p>
     200<code>SDATA = *(UINT64*)(SMEM + (OFFSET &amp; ~3))</code></p>
    201201<h4>S_BUFFER_LOAD_DWORDX4</h4>
    202202<p>Opcode: 10 (0xa)<br />
     
    206206Operation:<br />
    207207<code>for (BYTE i = 0; i &lt; 4; i++)
    208     SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; 3))</code></p>
     208    SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; ~3))</code></p>
    209209<h4>S_BUFFER_LOAD_DWORDX8</h4>
    210210<p>Opcode: 11 (0xb)<br />
     
    214214Operation:<br />
    215215<code>for (BYTE i = 0; i &lt; 8; i++)
    216     SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; 3))</code></p>
     216    SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; ~3))</code></p>
    217217<h4>S_BUFFER_STORE_DWORD</h4>
    218218<p>Opcode: 24 (0x18)<br />
     
    221221SBASE is buffer descriptor.<br />
    222222Operation:<br />
    223 <code>*(UINT32*)(SMEM + (OFFSET &amp; 3)) = SDATA</code></p>
     223<code>*(UINT32*)(SMEM + (OFFSET &amp; ~3)) = SDATA</code></p>
    224224<h4>S_BUFFER_STORE_DWORDX2</h4>
    225225<p>Opcode: 25 (0x19)<br />
     
    228228SBASE is buffer descriptor.<br />
    229229Operation:<br />
    230 <code>*(UINT64*)(SMEM + (OFFSET &amp; 3)) = SDATA</code></p>
     230<code>*(UINT64*)(SMEM + (OFFSET &amp; ~3)) = SDATA</code></p>
    231231<h4>S_BUFFER_STORE_DWORDX4</h4>
    232232<p>Opcode: 26 (0x1a)<br />
     
    236236Operation:<br />
    237237<code>for (BYTE i = 0; i &lt; 4; i++)
    238     *(UINT32*)(SMEM + i*4 + (OFFSET &amp; 3)) = SDATA</code></p>
     238    *(UINT32*)(SMEM + i*4 + (OFFSET &amp; ~3)) = SDATA</code></p>
    239239<h4>S_DCACHE_INV</h4>
    240240<p>Opcode: 32 (0x20)<br />
     
    250250Description: Load single dword from read-only memory through constant cache (kcache).<br />
    251251Operation:<br />
    252 <code>SDATA = *(UINT32*)(SMEM + (OFFSET &amp; 3))</code></p>
     252<code>SDATA = *(UINT32*)(SMEM + (OFFSET &amp; ~3))</code></p>
    253253<h4>S_LOAD_DWORDX16</h4>
    254254<p>Opcode: 4 (0x4)<br />
     
    257257Operation:<br />
    258258<code>for (BYTE i = 0; i &lt; 16; i++)
    259     SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; 3))</code></p>
     259    SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; ~3))</code></p>
    260260<h4>S_LOAD_DWORDX2</h4>
    261261<p>Opcode: 1 (0x1)<br />
    262262Syntax: S_LOAD_DWORDX2 SDATA(2), SBASE(2), OFFSET<br />
    263263Description: Load two dwords from read-only memory through constant cache (kcache).<br />
    264 <code>SDATA = *(UINT64*)(SMEM + (OFFSET &amp; 3))</code></p>
     264<code>SDATA = *(UINT64*)(SMEM + (OFFSET &amp; ~3))</code></p>
    265265<h4>S_LOAD_DWORDX4</h4>
    266266<p>Opcode: 2 (0x2)<br />
     
    269269Operation:<br />
    270270<code>for (BYTE i = 0; i &lt; 4; i++)
    271     SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; 3))</code></p>
     271    SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; ~3))</code></p>
    272272<h4>S_LOAD_DWORDX8</h4>
    273273<p>Opcode: 3 (0x3)<br />
     
    276276Operation:<br />
    277277<code>for (BYTE i = 0; i &lt; 8; i++)
    278     SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; 3))</code></p>
     278    SDATA[i] = *(UINT32*)(SMEM + i*4 + (OFFSET &amp; ~3))</code></p>
    279279<h4>S_MEMREALTIME</h4>
    280280<p>Opcode: 37 (0x25)<br />
     
    298298SBASE is buffer descriptor.<br />
    299299Operation:<br />
    300 <code>*(UINT32*)(SMEM + (OFFSET &amp; 3)) = SDATA</code></p>
     300<code>*(UINT32*)(SMEM + (OFFSET &amp; ~3)) = SDATA</code></p>
    301301<h4>S_STORE_DWORDX2</h4>
    302302<p>Opcode: 17 (0x11)<br />
     
    304304Description: Store two dwords to memory. It accepts only offset as M0 or any immediate.<br />
    305305Operation:<br />
    306 <code>*(UINT64*)(SMEM + (OFFSET &amp; 3)) = SDATA</code></p>
     306<code>*(UINT64*)(SMEM + (OFFSET &amp; ~3)) = SDATA</code></p>
    307307<h4>S_STORE_DWORDX4</h4>
    308308<p>Opcode: 18 (0x12)<br />
     
    311311Operation:<br />
    312312<code>for (BYTE i = 0; i &lt; 4; i++)
    313     *(UINT32*)(SMEM + i*4 + (OFFSET &amp; 3)) = SDATA</code></p>
     313    *(UINT32*)(SMEM + i*4 + (OFFSET &amp; ~3)) = SDATA</code></p>
    314314}}}