Changes between Version 4 and Version 5 of GcnInstrsSop2
 Timestamp:
 Nov 13, 2015, 10:00:17 PM (5 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

GcnInstrsSop2
v4 v5 128 128 <h3>Instruction set</h3> 129 129 <p>Alphabetically sorted instruction list:</p> 130 <h4>S_ABSDIFF_I32</h4> 131 <p>Opcode: 44 (0x2c)<br /> 132 Syntax: S_ABSDIFF_I32 SDST, SSRC0, SSRC1<br /> 133 Description: Compute absolute difference from SSRC0 and SSRC1 and store result to SDST. 134 If result is nonzero store 1 to SCC, otherwise store 0 to SCC.<br /> 135 Operation:<br /> 136 <code>INT32 temp = SSRC0SSRC1 137 SDST = temp>=0 ? temp : temp 138 SCC = SDST!=0</code></p> 130 139 <h4>S_ADDC_U32</h4> 131 140 <p>Opcode: 4 (0x4)<br /> … … 134 143 carryout flag into SCC.<br /> 135 144 Operation:<br /> 136 <code> temp = (UINT64)SSRC0 + (UINT64)SSRC1 + SCC145 <code>UINT64 temp = (UINT64)SSRC0 + (UINT64)SSRC1 + SCC 137 146 SDST = temp 138 147 SCC = temp>>32</code></p> … … 143 152 Operation:<br /> 144 153 <code>SDST = SSRC0 + SSRC1 145 temp = (UINT64)SSRC0 + (UINT64)SSRC1146 SCC = temp > ((1LL<<31)1)  temp & gt; (1LL<<31)</code></p>154 INT64 temp = (INT64)SSRC0 + (INT64)SSRC1 155 SCC = temp > ((1LL<<31)1)  temp < (1LL<<31)</code></p> 147 156 <h4>S_ADD_U32</h4> 148 157 <p>Opcode: 0 (0x0)<br /> … … 202 211 <code>SDST = (INT64)SSRC0 >> (SSRC1 & 63) 203 212 SCC = SDST!=0</code></p> 213 <h4>S_BFE_I32</h4> 214 <p>Opcode: 40 (0x28)<br /> 215 Syntax: S_BFE_I32 SDST, SSRC0, SSRC1<br /> 216 Description: Extracts bits in SSRC0 from range (SSRC1&31) with length ((SSRC1>>16)&0x7f) 217 and extend sign from last bit of extracted value. 218 If result is nonzero store 1 to SCC, otherwise store 0 to SCC.<br /> 219 Operation:<br /> 220 <code>UINT8 shift = length&31 221 UINT8 length = (SSRC1>>16) & 0x7f 222 if (length==0) 223 SDST = 0 224 if (shift+length < 32) 225 SDST = (INT32)(SSRC0 << (32  shift  length)) >> (32  length) 226 else 227 SDST = (INT32)SSRC0 >> shift 228 SCC = SDST!=0</code></p> 204 229 <h4>S_BFE_U32</h4> 205 230 <p>Opcode: 39 (0x27)<br /> … … 208 233 If result is nonzero store 1 to SCC, otherwise store 0 to SCC.<br /> 209 234 Operation:<br /> 210 <code> shift = length & 31211 length = (SSRC1>>16) & 0x7f235 <code>UINT8 shift = length & 31 236 UINT8 length = (SSRC1>>16) & 0x7f 212 237 if (length==0) 213 238 SDST = 0 … … 217 242 SDST = SSRC0 >> shift 218 243 SCC = SDST!=0</code></p> 219 <h4>S_BFE_I 32</h4>220 <p>Opcode: 4 0 (0x28)<br />221 Syntax: S_BFE_I 32SDST, SSRC0, SSRC1<br />222 Description: Extracts bits in SSRC0 from range (SSRC1& 31) with length ((SSRC1>>16)&0x7f)244 <h4>S_BFE_I64</h4> 245 <p>Opcode: 42 (0x2a)<br /> 246 Syntax: S_BFE_I64 SDST, SSRC0, SSRC1<br /> 247 Description: Extracts bits in SSRC0 from range (SSRC1&63) with length ((SSRC1>>16)&0x7f) 223 248 and extend sign from last bit of extracted value. 224 249 If result is nonzero store 1 to SCC, otherwise store 0 to SCC.<br /> 225 250 Operation:<br /> 226 <code> shift = length&31227 length = (SSRC1>>16) & 0x7f251 <code>UINT8 shift = length&63 252 UINT8 length = (SSRC1>>16) & 0x7f 228 253 if (length==0) 229 254 SDST = 0 230 if (shift+length < 32)231 SDST = (INT 32)(SSRC0 << (32  shift  length)) >> (32 length)255 if (shift+length < 64) 256 SDST = (INT64)(SSRC0 << (64  shift  length)) >> (64  length) 232 257 else 233 SDST = (INT32)SSRC0 >> shift 258 SDST = (INT64)SSRC0 >> shift 259 SCC = SDST!=0</code></p> 260 <h4>S_BFE_U64</h4> 261 <p>Opcode: 41 (0x29)<br /> 262 Syntax: S_BFE_U64 SDST(2), SSRC0(2), SSRC1<br /> 263 Description: Extracts bits in SSRC0 from range (SSRC1&63) with length ((SSRC1>>16)&0x7f). 264 If result is nonzero store 1 to SCC, otherwise store 0 to SCC. 265 SDST, SSRC0 are 64bit, SSRC1 is 32bit.<br /> 266 Operation:<br /> 267 <code>UINT8 shift = length & 63 268 UINT8 length = (SSRC1>>16) & 0x7f 269 if (length==0) 270 SDST = 0 271 if (shift+length < 64) 272 SDST = SSRC0 << (64  shift  length) >> (64  length) 273 else 274 SDST = SSRC0 >> shift 234 275 SCC = SDST!=0</code></p> 235 276 <h4>S_BFM_B32</h4> … … 404 445 carryout flag into SCC.<br /> 405 446 Operation:<br /> 406 <code> temp = (UINT64)SSRC0  (UINT64)SSRC1  SCC447 <code>UINT64 temp = (UINT64)SSRC0  (UINT64)SSRC1  SCC 407 448 SDST = temp 408 449 SCC = temp>>32</code></p> … … 415 456 Operation:<br /> 416 457 <code>SDST = SSRC0  SSRC1 417 temp = (UINT64)SSRC0  (UINT64)SSRC1418 SCC = temp >((1LL<<31)1)  temp>(1LL<<31)</code></p>458 INT64 temp = (INT64)SSRC0  (INT64)SSRC1 459 SCC = temp > ((1LL<<31)1)  temp < (1LL<<31)</code></p> 419 460 <h4>S_SUB_U32</h4> 420 461 <p>Opcode: 1 (0x1)<br />