Changes between Version 5 and Version 6 of GcnInstrsSop2
- Timestamp:
- 11/13/15 23:00:18 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GcnInstrsSop2
v5 v6 132 132 Syntax: S_ABSDIFF_I32 SDST, SSRC0, SSRC1<br /> 133 133 Description: Compute absolute difference from SSRC0 and SSRC1 and store result to SDST. 134 If result is non-zero store 1 to SCC, otherwise store 0 to SCC.<br /> 135 Operation:<br /> 136 <code>INT32 temp = SSRC0-SSRC1 137 SDST = temp>=0 ? temp : -temp 134 If result is non-zero, store 1 to SCC, otherwise store 0 to SCC.<br /> 135 Operation:<br /> 136 <code>SDST = ABS(SSRC0 - SSRC1) 138 137 SCC = SDST!=0</code></p> 139 138 <h4>S_ADDC_U32</h4> … … 145 144 <code>UINT64 temp = (UINT64)SSRC0 + (UINT64)SSRC1 + SCC 146 145 SDST = temp 147 SCC = temp >>32</code></p>146 SCC = temp >> 32</code></p> 148 147 <h4>S_ADD_I32</h4> 149 148 <p>Opcode: 2 (0x2)<br /> … … 152 151 Operation:<br /> 153 152 <code>SDST = SSRC0 + SSRC1 154 INT64 temp = (INT64)SSRC0 + (INT64)SSRC1153 INT64 temp = SEXT64(SSRC0) + SEXT64(SSRC1) 155 154 SCC = temp > ((1LL<<31)-1) || temp < (-1LL<<31)</code></p> 156 155 <h4>S_ADD_U32</h4> … … 159 158 Description: Add SSRC0 to SSRC1 and store result into SDST and store carry-out into SCC.<br /> 160 159 Operation:<br /> 161 <code>SDST = SSRC0 + SSRC1 162 SCC = ((UINT64)SSRC0 + (UINT64)SSRC1)>>32</code></p> 160 <code>UINT64 temp = (UINT64)SSRC0 + (UINT64)SSRC1 161 SDST = temp 162 SCC = temp >> 32</code></p> 163 163 <h4>S_AND_B32</h4> 164 164 <p>Opcode: 14 (0xe)<br /> … … 205 205 <p>Opcode: 35 (0x23)<br /> 206 206 Syntax: S_ASHR_I64 SDST(2), SSRC0(2), SSRC1<br /> 207 Description: Arithmetic Shift to right SSRC0 by (SSRC1& 31) bits and store result into SDST.207 Description: Arithmetic Shift to right SSRC0 by (SSRC1&63) bits and store result into SDST. 208 208 If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit, 209 209 SSRC1 is 32 bit.<br /> … … 313 313 <p>Opcode: 31 (0x1f) 314 314 Syntax: S_LSHL_B64 SDST(2), SSRC0(2), SSRC1<br /> 315 Description: Shift to left SSRC0 by (SSRC1& 31) bits and store result into SDST.315 Description: Shift to left SSRC0 by (SSRC1&63) bits and store result into SDST. 316 316 If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit, 317 317 SSRC1 is 32 bit.<br /> … … 330 330 <p>Opcode: 33 (0x21) 331 331 Syntax: S_LSHR_B64 SDST(2), SSRC0(2), SSRC1<br /> 332 Description: Shift to right SSRC0 by (SSRC1& 31) bits and store result into SDST.332 Description: Shift to right SSRC0 by (SSRC1&63) bits and store result into SDST. 333 333 If result is non-zero store 1 to SCC, otherwise store 0 to SCC. SDST, SSRC0 are 64-bit, 334 334 SSRC1 is 32 bit.<br /> … … 340 340 Syntax: S_MIN_I32 SDST, SSRC0, SSRC1<br /> 341 341 Description: Choose largest signed value value from SSRC0 and SSRC1 and store its into SDST, 342 and store 1 to SCC if SS SRC0 value has been choosen, otherwise store 0 to SCC<br />343 Operation:<br /> 344 <code>SDST = (INT32)SS SRC0 > (INT32)SSSRC1 ? SSSRC0 : SSSRC1345 SCC = (INT32)SS SRC0 > (INT32)SSSRC1</code></p>342 and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC.<br /> 343 Operation:<br /> 344 <code>SDST = (INT32)SSRC0 > (INT32)SSRC1 ? SSRC0 : SSRC1 345 SCC = (INT32)SSRC0 > (INT32)SSRC1</code></p> 346 346 <h4>S_MAX_U32</h4> 347 347 <p>Opcode: 9 (0x9)<br /> 348 348 Syntax: S_MAX_U32 SDST, SSRC0, SSRC1<br /> 349 349 Description: Choose largest unsigned value value from SSRC0 and SSRC1 and store its into SDST, 350 and store 1 to SCC if SS SRC0 value has been choosen, otherwise store 0 to SCC<br />351 Operation:<br /> 352 <code>SDST = (UINT32)SSSRC0 > (UINT32)SSSRC1 ? SSSRC0 : SSSRC1353 SCC = (UINT32)SSSRC0 > (UINT32)SSSRC1</code></p>350 and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC.<br /> 351 Operation:<br /> 352 <code>SDST = SSRC0 > SSRC1 ? SSRC0 : SSRC1 353 SCC = SSRC0 > SSRC1</code></p> 354 354 <h4>S_MIN_I32</h4> 355 355 <p>Opcode: 6 (0x6) 356 356 Syntax: S_MIN_I32 SDST, SSRC0, SSRC1<br /> 357 357 Description: Choose smallest signed value value from SSRC0 and SSRC1 and store its into SDST, 358 and store 1 to SCC if SS SRC0 value has been choosen, otherwise store 0 to SCC<br />359 Operation:<br /> 360 <code>SDST = (INT32)SS SRC0 < (INT32)SSSRC1 ? SSSRC0 : SSSRC1361 SCC = (INT32)SS SRC0 < (INT32)SSSRC1</code></p>358 and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC.<br /> 359 Operation:<br /> 360 <code>SDST = (INT32)SSRC0 < (INT32)SSRC1 ? SSRC0 : SSRC1 361 SCC = (INT32)SSRC0 < (INT32)SSRC1</code></p> 362 362 <h4>S_MIN_U32</h4> 363 363 <p>Opcode: 7 (0x7)<br /> 364 364 Syntax: S_MIN_U32 SDST, SSRC0, SSRC1<br /> 365 365 Description: Choose smallest unsigned value value from SSRC0 and SSRC1 and store its into SDST, 366 and store 1 to SCC if SS SRC0 value has been choosen, otherwise store 0 to SCC<br />367 Operation:<br /> 368 <code>SDST = (UINT32)SSSRC0 < (UINT32)SSSRC1 ? SSSRC0 : SSSRC1369 SCC = (UINT32)SSSRC0 < (UINT32)SSSRC1</code></p>366 and store 1 to SCC if SSRC0 value has been choosen, otherwise store 0 to SCC.<br /> 367 Operation:<br /> 368 <code>SDST = SSRC0 < SSRC1 ? SSRC0 : SSRC1 369 SCC = SSRC0 < SSRC1</code></p> 370 370 <h4>S_MUL_I32</h4> 371 371 <p>Opcode: 38 (0x26) … … 447 447 <code>UINT64 temp = (UINT64)SSRC0 - (UINT64)SSRC1 - SCC 448 448 SDST = temp 449 SCC = temp>>32</code></p>449 SCC = (temp>>32) & 1</code></p> 450 450 <h4>S_SUB_I32</h4> 451 451 <p>Opcode: 3 (0x3)<br /> … … 456 456 Operation:<br /> 457 457 <code>SDST = SSRC0 - SSRC1 458 INT64 temp = (INT64)SSRC0 - (INT64)SSRC1458 INT64 temp = SEXT64(SSRC0) - SEXT64(SSRC1) 459 459 SCC = temp > ((1LL<<31)-1) || temp < (-1LL<<31)</code></p> 460 460 <h4>S_SUB_U32</h4> … … 463 463 Description: Subtract SSRC0 to SSRC1 and store result into SDST and store borrow into SCC.<br /> 464 464 Operation:<br /> 465 <code>SDST = SSRC0 - SSRC1 466 SCC = ((INT64)SSRC0 - (INT64)SSRC1)>>32</code></p> 465 <code>UINT64 temp = (UINT64)SSRC0 - (UINT64)SSRC1 466 SDST = temp 467 SCC = (temp>>32)!=0</code></p> 467 468 <h4>S_XNOR_B32</h4> 468 469 <p>Opcode: 28 (0x1c)<br />