Changes between Version 9 and Version 10 of GcnInstrsDs


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

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsDs

    v9 v10  
    10881088</tr>
    10891089<tr>
    1090 <td>204 (0xcc)</td>
     1090<td>205 (0xcd)</td>
    10911091<td>✓</td>
    10921092<td>✓</td>
    10931093<td>DS_WRITE_SRC2_B64</td>
    1094 <td>--</td>
    1095 </tr>
    1096 <tr>
    1097 <td>205 (0xcd)</td>
    1098 <td></td>
    1099 <td></td>
    1100 <td>--</td>
    11011094<td>DS_WRITE_SRC2_B64</td>
    11021095</tr>
     
    12171210<p>Opcode: 9 (0x9)<br />
    12181211Syntax: DS_AND_B32 ADDR, VDATA0 [OFFSET:OFFSET]<br />
    1219 Description: Do bitwise AND operatin on 32-bit value from LDS/GDS at address
     1212Description: Do bitwise AND operation on 32-bit value from LDS/GDS at address
    12201213(ADDR+OFFSET) &amp; ~3, and value from VDATA0; and store result to LDS/GDS at this same
    12211214address. Operation is atomic.<br />
     
    12261219<p>Opcode: 73 (0x49)<br />
    12271220Syntax: DS_AND_B64 ADDR, VDATA0(2) [OFFSET:OFFSET]<br />
    1228 Description: Do bitwise AND operatin on 64-bit value from LDS/GDS at address
     1221Description: Do bitwise AND operation on 64-bit value from LDS/GDS at address
    12291222(ADDR+OFFSET) &amp; ~7, and value from VDATA0; and store result to LDS/GDS at this same
    12301223address. Operation is atomic.<br />
     
    12351228<p>Opcode: 41 (0x29)<br />
    12361229Syntax: DS_AND_RTN_B32 VDST, ADDR, VDATA0 [OFFSET:OFFSET]<br />
    1237 Description: Do bitwise AND operatin on 32-bit value from LDS/GDS at address
     1230Description: Do bitwise AND operation on 32-bit value from LDS/GDS at address
    12381231(ADDR+OFFSET) &amp; ~3, and value from VDATA0; and store result to LDS/GDS at this same
    12391232address. Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br />
     
    12441237<p>Opcode: 105 (0x69)<br />
    12451238Syntax: DS_AND_RTN_B64 VDST(2), ADDR, VDATA0(2) [OFFSET:OFFSET]<br />
    1246 Description: Do bitwise AND operatin on 64-bit value from LDS/GDS at address
     1239Description: Do bitwise AND operation on 64-bit value from LDS/GDS at address
    12471240(ADDR+OFFSET) &amp; ~7, and value from VDATA0; and store result to LDS/GDS at this same
    12481241address. Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br />
     
    12531246<p>Opcode: 137 (0x89)<br />
    12541247Syntax: DS_AND_SRC2_B32 ADDR [OFFSET:OFFSET]<br />
    1255 Description: Do bitwise AND operatin on 32-bit value from LDS/GDS at address
     1248Description: Do bitwise AND operation on 32-bit value from LDS/GDS at address
    12561249A, and at address B; and store result to LDS/GDS at address A. Operation is atomic.<br />
    12571250Operation:<br />
     
    12621255UINT32* V = (UINT32*)(DS + A)
    12631256*V = *V &amp; *(UINT32*)(DS + B) // atomic operation</code></p>
     1257<h4>DS_AND_SRC2_B64</h4>
     1258<p>Opcode: 201 (0xc9)<br />
     1259Syntax: DS_AND_SRC2_B64 ADDR [OFFSET:OFFSET]<br />
     1260Description: Do bitwise AND operation on 64-bit value from LDS/GDS at address
     1261A, and at address B; and store result to LDS/GDS at address A. Operation is atomic.<br />
     1262Operation:<br />
     1263<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1264UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1265            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1266            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1267UINT64* V = (UINT64*)(DS + A)
     1268*V = *V &amp; *(UINT64*)(DS + B) // atomic operation</code></p>
    12641269<h4>DS_CMPST_B32</h4>
    12651270<p>Opcode: 16 (0x10)<br />
     
    13691374UINT32* VB = (UINT32*)(DS + B)
    13701375*V = (*VB &gt;= *V &amp;&amp; *V!=0) ? *V-1 : *VB // atomic operation</code></p>
     1376<h4>DS_DEC_SRC2_U64</h4>
     1377<p>Opcode: 196 (0xc4)<br />
     1378Syntax: DS_DEC_SRC2_U64 ADDR [OFFSET:OFFSET]<br />
     1379Description: Load unsigned 64-bit value from LDS/GDS at address A, and compare with unsigned
     138064-bit value at address B. If value at address B is greater or equal and loaded
     1381unsigned value is not zero, then decrement value from LDS/GDS, otherwise store value
     1382at address B to LDS/GDS at address A. Refer to listing to learn about addressing.
     1383Operation is atomic.<br />
     1384Operation:<br />
     1385<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1386UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1387            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1388            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1389UINT64* V = (UINT64*)(DS + A)
     1390UINT64* VB = (UINT64*)(DS + B)
     1391*V = (*VB &gt;= *V &amp;&amp; *V!=0) ? *V-1 : *VB // atomic operation</code></p>
    13711392<h4>DS_DEC_U32</h4>
    13721393<p>Opcode: 4 (0x4)<br />
     
    14231444UINT32* V = (UINT32*)(DS + A)
    14241445*V = (*(UINT32*)(DS + B) &gt; *V) ? *V+1 : 0  // atomic operation</code></p>
     1446<h4>DS_INC_SRC2_U64</h4>
     1447<p>Opcode: 195 (0xc3)<br />
     1448Syntax: DS_INC_SRC2_U64 ADDR [OFFSET:OFFSET]<br />
     1449Description: Load unsigned 64-bit value from LDS/GDS at address A, and
     1450compare with unsigned value at address B. If value at address B is greater,
     1451then increment value from LDS/GDS, otherwise store 0 to LDS/GDS at address A.
     1452Refer to listing to learn about addressing. Operation is atomic.<br />
     1453Operation:<br />
     1454<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1455UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1456            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1457            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1458UINT64* V = (UINT64*)(DS + A)
     1459*V = (*(UINT64*)(DS + B) &gt; *V) ? *V+1 : 0  // atomic operation</code></p>
    14251460<h4>DS_INC_U32</h4>
    14261461<p>Opcode: 3 (0x3)<br />
     
    15441579FLOAT* V = (FLOAT*)(DS + A)
    15451580*V = MAX(*V, *(FLOAT*)(DS + B)) // atomic operation</code></p>
     1581<h4>DS_MAX_SRC2_F64</h4>
     1582<p>Opcode: 211 (0xd3)<br />
     1583Syntax: DS_MAX_SRC2_F64 ADDR [OFFSET:OFFSET]<br />
     1584Description: Choose greatest double floating point value from LDS/GDS at address
     1585A and at address B, and store result to LDS/GDS at address A.
     1586Refer to listing to learn about addressing. Operation is atomic.<br />
     1587Operation:<br />
     1588<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1589UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1590            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1591            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1592DOUBLE* V = (DOUBLE*)(DS + A)
     1593*V = MAX(*V, *(DOUBLE*)(DS + B)) // atomic operation</code></p>
    15461594<h4>DS_MAX_SRC2_I32</h4>
    15471595<p>Opcode: 134 (0x86)<br />
     
    15571605INT32* V = (INT32*)(DS + A)
    15581606*V = MAX(*V, *(INT32*)(DS + B)) // atomic operation</code></p>
     1607<h4>DS_MAX_SRC2_I64</h4>
     1608<p>Opcode: 198 (0x86)<br />
     1609Syntax: DS_MAX_SRC2_I64 ADDR [OFFSET:OFFSET]<br />
     1610Description: Choose greatest signed 64-bit integer value from LDS/GDS at address
     1611A and at address B, and store result to LDS/GDS at address A.
     1612Refer to listing to learn about addressing. Operation is atomic.<br />
     1613Operation:<br />
     1614<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1615UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1616            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1617            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1618INT64* V = (INT64*)(DS + A)
     1619*V = MAX(*V, *(INT64*)(DS + B)) // atomic operation</code></p>
    15591620<h4>DS_MAX_SRC2_U32</h4>
    15601621<p>Opcode: 136 (0x88)<br />
     
    15701631UINT32* V = (UINT32*)(DS + A)
    15711632*V = MAX(*V, *(UINT32*)(DS + B)) // atomic operation</code></p>
     1633<h4>DS_MAX_SRC2_U64</h4>
     1634<p>Opcode: 200 (0xc8)<br />
     1635Syntax: DS_MAX_SRC2_U64 ADDR [OFFSET:OFFSET]<br />
     1636Description: Choose greatest unsigned 64-bit integer value from LDS/GDS at address
     1637A and at address B, and store result to LDS/GDS at address A.
     1638Refer to listing to learn about addressing. Operation is atomic.<br />
     1639Operation:<br />
     1640<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1641UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1642            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1643            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1644UINT64* V = (UINT64*)(DS + A)
     1645*V = MAX(*V, *(UINT64*)(DS + B)) // atomic operation</code></p>
    15721646<h4>DS_MAX_U32</h4>
    15731647<p>Opcode: 8 (0x8)<br />
     
    16911765FLOAT* V = (FLOAT*)(DS + A)
    16921766*V = MIN(*V, *(FLOAT*)(DS + B)) // atomic operation</code></p>
     1767<h4>DS_MIN_SRC2_F64</h4>
     1768<p>Opcode: 210 (0xd2)<br />
     1769Syntax: DS_MIN_SRC2_F64 ADDR [OFFSET:OFFSET]<br />
     1770Description: Choose smallest double floating point value from LDS/GDS at address
     1771A and at address B, and store result to LDS/GDS at address A.
     1772Refer to listing to learn about addressing. Operation is atomic.<br />
     1773Operation:<br />
     1774<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1775UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1776            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1777            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1778DOUBLE* V = (DOUBLE*)(DS + A)
     1779*V = MIN(*V, *(DOUBLE*)(DS + B)) // atomic operation</code></p>
    16931780<h4>DS_MIN_SRC2_I32</h4>
    16941781<p>Opcode: 133 (0x85)<br />
     
    17041791INT32* V = (INT32*)(DS + A)
    17051792*V = MIN(*V, *(INT32*)(DS + B)) // atomic operation</code></p>
     1793<h4>DS_MIN_SRC2_I64</h4>
     1794<p>Opcode: 197 (0xc5)<br />
     1795Syntax: DS_MIN_SRC2_I64 ADDR [OFFSET:OFFSET]<br />
     1796Description: Choose smallest signed 64-bit integer value from LDS/GDS at address
     1797A and at address B, and store result to LDS/GDS at address A.
     1798Refer to listing to learn about addressing. Operation is atomic.<br />
     1799Operation:<br />
     1800<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1801UINT16 B = A + (((OFFSET&amp;0x8000) ? \
     1802            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1803            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1804INT64* V = (INT64*)(DS + A)
     1805*V = MIN(*V, *(INT64*)(DS + B)) // atomic operation</code></p>
    17061806<h4>DS_MIN_SRC2_U32</h4>
    17071807<p>Opcode: 135 (0x87)<br />
     
    17171817UINT32* V = (UINT32*)(DS + A)
    17181818*V = MIN(*V, *(UINT32*)(DS + B)) // atomic operation</code></p>
     1819<h4>DS_MIN_SRC2_U64</h4>
     1820<p>Opcode: 199 (0xc7)<br />
     1821Syntax: DS_MIN_SRC2_U64 ADDR [OFFSET:OFFSET]<br />
     1822Description: Choose smallest unsigned 64-bit integer value from LDS/GDS at address
     1823A and at address B, and store result to LDS/GDS at address A.
     1824Refer to listing to learn about addressing. Operation is atomic.<br />
     1825Operation:<br />
     1826<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1827UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1828            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1829            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1830UINT64* V = (UINT64*)(DS + A)
     1831*V = MIN(*V, *(UINT64*)(DS + B)) // atomic operation</code></p>
    17191832<h4>DS_MIN_U32</h4>
    17201833<p>Opcode: 7 (0x7)<br />
     
    17801893<p>Opcode: 10 (0xa)<br />
    17811894Syntax: DS_OR_B32 ADDR, VDATA0 [OFFSET:OFFSET]<br />
    1782 Description: Do bitwise OR operatin on 32-bit value from LDS/GDS at address
     1895Description: Do bitwise OR operation on 32-bit value from LDS/GDS at address
    17831896(ADDR+OFFSET) &amp; ~3, and value from VDATA0; and store result to LDS/GDS at this same
    17841897address. Operation is atomic.<br />
     
    17891902<p>Opcode: 74 (0x4a)<br />
    17901903Syntax: DS_OR_B64 ADDR, VDATA0(2) [OFFSET:OFFSET]<br />
    1791 Description: Do bitwise OR operatin on 64-bit value from LDS/GDS at address
     1904Description: Do bitwise OR operation on 64-bit value from LDS/GDS at address
    17921905(ADDR+OFFSET) &amp; ~7, and value from VDATA0; and store result to LDS/GDS at this same
    17931906address. Operation is atomic.<br />
     
    17981911<p>Opcode: 42 (0x2a)<br />
    17991912Syntax: DS_OR_RTN_B32 VDST, ADDR, VDATA0 [OFFSET:OFFSET]<br />
    1800 Description: Do bitwise OR operatin on 32-bit value from LDS/GDS at address
     1913Description: Do bitwise OR operation on 32-bit value from LDS/GDS at address
    18011914(ADDR+OFFSET) &amp; ~3, and value from VDATA0; and store result to LDS/GDS at this same
    18021915address. Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br />
     
    18071920<p>Opcode: 106 (0x6a)<br />
    18081921Syntax: DS_OR_RTN_B64 VDST(2), ADDR, VDATA0(2) [OFFSET:OFFSET]<br />
    1809 Description: Do bitwise OR operatin on 32-bit value from LDS/GDS at address
     1922Description: Do bitwise OR operation on 32-bit value from LDS/GDS at address
    18101923(ADDR+OFFSET) &amp; ~7, and value from VDATA0; and store result to LDS/GDS at this same
    18111924address. Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br />
     
    18161929<p>Opcode: 138 (0x8a)<br />
    18171930Syntax: DS_OR_SRC2_B32 ADDR [OFFSET:OFFSET]<br />
    1818 Description: Do bitwise OR operatin on 32-bit value from LDS/GDS at address
     1931Description: Do bitwise OR operation on 32-bit value from LDS/GDS at address
    18191932A, and at address B; and store result to LDS/GDS at address A. Operation is atomic.<br />
    18201933Operation:<br />
     
    18251938UINT32* V = (UINT32*)(DS + A)
    18261939*V = *V | *(UINT32*)(DS + B) // atomic operation</code></p>
     1940<h4>DS_OR_SRC2_B64</h4>
     1941<p>Opcode: 202 (0xca)<br />
     1942Syntax: DS_OR_SRC2_B64 ADDR [OFFSET:OFFSET]<br />
     1943Description: Do bitwise OR operation on 64-bit value from LDS/GDS at address
     1944A, and at address B; and store result to LDS/GDS at address A. Operation is atomic.<br />
     1945Operation:<br />
     1946<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     1947UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     1948            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     1949            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     1950UINT64* V = (UINT64*)(DS + A)
     1951*V = *V | *(UINT64*)(DS + B) // atomic operation</code></p>
    18271952<h4>DS_READ_B32</h4>
    18281953<p>Opcode: 54 (0x36)<br />
     
    19252050UINT32* V = (UINT32*)(DS + A)
    19262051*V = *(UINT32*)(DS + B) - *V // atomic operation</code></p>
     2052<h4>DS_RSUB_SRC2_U64</h4>
     2053<p>Opcode: 194 (0xc2)<br />
     2054Syntax: DS_RSUB_SRC2_U64 ADDR [OFFSET:OFFSET]<br />
     2055Description: Subtract unsigned integer value from LDS/GDS at address A from
     2056value at address B, and store result back to LDS/GDS at address A.
     2057Refer to listing to learn about addressing. Operation is atomic.<br />
     2058Operation:<br />
     2059<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     2060UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     2061            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     2062            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     2063UINT64* V = (UINT64*)(DS + A)
     2064*V = *(UINT64*)(DS + B) - *V // atomic operation</code></p>
    19272065<h4>DS_RSUB_U32</h4>
    19282066<p>Opcode: 2 (0x2)<br />
     
    19742112UINT32* V = (UINT32*)(DS + A)
    19752113*V = *V - *(UINT32*)(DS + B) // atomic operation</code></p>
    1976 <h4>DS_ADD_SRC2_U64</h4>
     2114<h4>DS_SUB_SRC2_U64</h4>
    19772115<p>Opcode: 193 (0xc1)<br />
    19782116Syntax: DS_SUB_SRC2_U64 ADDR [OFFSET:OFFSET]<br />
     
    20622200            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4
    20632201*(UINT32*)(DS + A) = *(UINT32*)(DS + B)</code></p>
     2202<h4>DS_WRITE_SRC2_B64</h4>
     2203<p>Opcode: 205 (0xcd)<br />
     2204Syntax: DS_WRITE_SRC2_B64 ADDR [OFFSET:OFFSET]<br />
     2205Description: Store 64-bit value from LDS/GDS at address B into LDS/GDS at address A.<br />
     2206Operation:<br />
     2207<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     2208UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     2209            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     2210            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     2211*(UINT64*)(DS + A) = *(UINT64*)(DS + B)</code></p>
    20642212<h4>DS_WRITE2_B32</h4>
    20652213<p>Opcode: 14 (0xe)<br />
     
    21732321<p>Opcode: 11 (0xb)<br />
    21742322Syntax: DS_XOR_B32 ADDR, VDATA0 [OFFSET:OFFSET]<br />
    2175 Description: Do bitwise XOR operatin on 32-bit value from LDS/GDS at address
     2323Description: Do bitwise XOR operation on 32-bit value from LDS/GDS at address
    21762324(ADDR+OFFSET) &amp; ~3, and value from VDATA0; and store result to LDS/GDS at this same
    21772325address. Operation is atomic.<br />
     
    21822330<p>Opcode: 75 (0x4b)<br />
    21832331Syntax: DS_XOR_B64 ADDR, VDATA0(2) [OFFSET:OFFSET]<br />
    2184 Description: Do bitwise XOR operatin on 64-bit value from LDS/GDS at address
     2332Description: Do bitwise XOR operation on 64-bit value from LDS/GDS at address
    21852333(ADDR+OFFSET) &amp; ~7, and value from VDATA0; and store result to LDS/GDS at this same
    21862334address. Operation is atomic.<br />
     
    21912339<p>Opcode: 43 (0x2b)<br />
    21922340Syntax: DS_XOR_RTN_B32 VDST, ADDR, VDATA0 [OFFSET:OFFSET]<br />
    2193 Description: Do bitwise XOR operatin on 32-bit value from LDS/GDS at address
     2341Description: Do bitwise XOR operation on 32-bit value from LDS/GDS at address
    21942342(ADDR+OFFSET) &amp; ~3, and value from VDATA0; and store result to LDS/GDS at this same
    21952343address. Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br />
     
    22002348<p>Opcode: 107 (0x6b)<br />
    22012349Syntax: DS_XOR_RTN_B64 VDST(2), ADDR, VDATA0(2) [OFFSET:OFFSET]<br />
    2202 Description: Do bitwise XOR operatin on 64-bit value from LDS/GDS at address
     2350Description: Do bitwise XOR operation on 64-bit value from LDS/GDS at address
    22032351(ADDR+OFFSET) &amp; ~7, and value from VDATA0; and store result to LDS/GDS at this same
    22042352address. Previous value from LDS/GDS are stored in VDST. Operation is atomic.<br />
     
    22092357<p>Opcode: 139 (0x8b)<br />
    22102358Syntax: DS_XOR_SRC2_B32 ADDR [OFFSET:OFFSET]<br />
    2211 Description: Do bitwise XOR operatin on 32-bit value from LDS/GDS at address
     2359Description: Do bitwise XOR operation on 32-bit value from LDS/GDS at address
    22122360A, and at address B; and store result to LDS/GDS at address A. Operation is atomic.<br />
    22132361Operation:<br />
     
    22182366UINT32* V = (UINT32*)(DS + A)
    22192367*V = *V | *(UINT32*)(DS + B) // atomic operation</code></p>
     2368<h4>DS_XOR_SRC2_B64</h4>
     2369<p>Opcode: 203 (0xcb)<br />
     2370Syntax: DS_XOR_SRC2_B64 ADDR [OFFSET:OFFSET]<br />
     2371Description: Do bitwise XOR operation on 64-bit value from LDS/GDS at address
     2372A, and at address B; and store result to LDS/GDS at address A. Operation is atomic.<br />
     2373Operation:<br />
     2374<code>UINT16 A = (OFFSET&amp;0x8000) ? ADDR&amp;0x1fff8 : ADDR&amp;~7
     2375UINT16 B = (A + ((OFFSET&amp;0x8000) ? \
     2376            ((ADDR&gt;&gt;17) | ((ADDR&gt;&gt;16)&amp;0x8000)) : \
     2377            ((OFFSET&amp;07fff) | (OFFSET&lt;&lt;1)&amp;0x8000)) * 4)&amp;~7
     2378UINT64* V = (UINT64*)(DS + A)
     2379*V = *V | *(UINT64*)(DS + B) // atomic operation</code></p>
    22202380}}}