Changeset 1777 in CLRX


Ignore:
Timestamp:
Dec 4, 2015, 9:32:38 PM (4 years ago)
Author:
matszpk
Message:

CLRadeonExtender: VOPC instructions tables: added tables and instructions for GCN 1.2 arch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/doc/GcnInstrsVopc.md

    r1774 r1777  
    6767VOPC opcodes (0-255) and VOP3 opcodes are same.
    6868
    69 ### Tables of opcodes and their descriptions (GCN 1.0/1.1)
    70 
    71 Table of floating point comparison instructions by opcode:
     69### Tables of opcodes and their descriptions
     70
     71Table of floating point comparison instructions by opcode (GCN 1.0/1.1):
    7272
    7373Opcode range        | Instruction        | Description
    7474--------------------|--------------------|---------------------------
    75750-15 (0x00-0x0f)    | V_CMP_{OP16}_F32   | Signal on sNAN input only. Single FP values.
    76 16-31 (0x10-0x1f)   | V_CMPX_{OP16}_F32  | Signal on sNAN input only. Write result to EXEC. Single FP values.
     7616-31 (0x10-0x1f)   | V_CMPX_{OP16}_F32  | Signal on sNAN input only. Also write result to EXEC. Single FP values.
    777732-47 (0x20-0x2f)   | V_CMP_{OP16}_F64   | Signal on sNAN input only. Double FP values.
    78 48-63 (0x30-0x3f)   | V_CMPX_{OP16}_F64  | Signal on sNAN input only. Write result to EXEC. Double FP values.
    79 64-79 (0x40-0x4f)   | V_CMP_{OP16}_F32   | Signal on any sNAN. Single FP values.
    80 80-95 (0x50-0x5f)   | V_CMPX_{OP16}_F32  | Signal on any sNAN. Write result to EXEC. Single FP values.
    81 96-111 (0x60-0x6f)  | V_CMP_{OP16}_F64   | Signal on any sNAN. Double FP values.
    82 112-127 (0x70-0x7f) | V_CMPX_{OP16}_F64  | Signal on any sNAN. Write result to EXEC. Double FP values.
     7848-63 (0x30-0x3f)   | V_CMPX_{OP16}_F64  | Signal on sNAN input only. Also write result to EXEC. Double FP values.
     7964-79 (0x40-0x4f)   | V_CMPS_{OP16}_F32  | Signal on any sNAN. Single FP values.
     8080-95 (0x50-0x5f)   | V_CMPSX_{OP16}_F32 | Signal on any sNAN. Also write result to EXEC. Single FP values.
     8196-111 (0x60-0x6f)  | V_CMPS_{OP16}_F64  | Signal on any sNAN. Double FP values.
     82112-127 (0x70-0x7f) | V_CMPSX_{OP16}_F64 | Signal on any sNAN. Also write result to EXEC. Double FP values.
     83
     84Table of floating point comparison instructions by opcode (GCN 1.2):
     85
     86Opcode range        | Instruction        | Description
     87--------------------|--------------------|---------------------------
     8832-47 (0x20-0x2f)   | V_CMP_{OP16}_F32   | Signal on sNAN input only. Half FP values.
     8948-63 (0x30-0x3f)   | V_CMPX_{OP16}_F32  | Signal on sNAN input only. Also write result to EXEC. Half FP values.
     9064-79 (0x40-0x4f)   | V_CMP_{OP16}_F32   | Signal on sNAN input only. Single FP values.
     9180-95 (0x50-0x5f)   | V_CMPX_{OP16}_F32  | Signal on sNAN input only. Also write result to EXEC. Single FP values.
     9296-111 (0x60-0x6f)  | V_CMP_{OP16}_F64   | Signal on sNAN input only. Double FP values.
     93112-127 (0x70-0x7f) | V_CMPX_{OP16}_F64  | Signal on sNAN input only. Also write result to EXEC. Double FP values.
    8394
    8495Table of OP16 (compare operations) for floating point values comparisons:
     
    10111213 (0xd)      | NEG       | SDST(LANEID) = !((TYPE)SRC0 == (TYPE)SRC1)
    10211314 (0xe)      | NLT       | SDST(LANEID) = !((TYPE)SRC0 < (TYPE)SRC1)
    103 15 (0xf)      | T         | SDST(LANEID) = 1
     11415 (0xf)      | TRU, T    | SDST(LANEID) = 1
    104115
    105116NOTE: Comparison operators (<,<=,!=,==) compares only non NaN values. If any operand is NaN
     
    117128```
    118129
    119 Table of integer comparison instructions by opcode:
     130Table of integer comparison instructions by opcode (GCN 1.0/1.1):
    120131
    121132Opcode range        | Instruction        | Description
    122133--------------------|--------------------|---------------------------
    123134128-135 (0x80-0x87) | V_CMP_{OP8}_I32    | Signed 32-bit values.
    124 144-151 (0x90-0x97) | V_CMPX_{OP8}_I32   | Write result to EXEC. Signed 32-bit values.
     135144-151 (0x90-0x97) | V_CMPX_{OP8}_I32   | Also write result to EXEC. Signed 32-bit values.
    125136160-167 (0xa0-0xa7) | V_CMP_{OP8}_I64    | Signed 64-bit values.
    126 176-183 (0xb0-0xb7) | V_CMPX_{OP8}_I64   | Write result to EXEC. Signed 64-bit values.
     137176-183 (0xb0-0xb7) | V_CMPX_{OP8}_I64   | Also write result to EXEC. Signed 64-bit values.
    127138192-199 (0xc0-0xc7) | V_CMP_{OP8}_U32    | Unsigned 32-bit values.
    128 208-215 (0xd0-0xd7) | V_CMPX_{OP8}_U32   | Write result to EXEC. Unsigned 32-bit values.
     139208-215 (0xd0-0xd7) | V_CMPX_{OP8}_U32   | Also write result to EXEC. Unsigned 32-bit values.
    129140224-231 (0xe0-0xe7) | V_CMP_{OP8}_U64    | Unsigned 64-bit values.
    130 240-247 (0xf0-0xf7) | V_CMPX_{OP8}_U64   | Write result to EXEC. Unsigned 64-bit values.
     141240-247 (0xf0-0xf7) | V_CMPX_{OP8}_U64   | Also write result to EXEC. Unsigned 64-bit values.
     142
     143Table of integer comparison instructions by opcode (GCN 1.2):
     144
     145Opcode range        | Instruction        | Description
     146--------------------|--------------------|---------------------------
     147160-167 (0xa0-0xa7) | V_CMP_{OP8}_I16    | Signed 16-bit values.
     148168-175 (0xa8-0xaf) | V_CMP_{OP8}_U16    | Unsigned 16-bit values.
     149176-183 (0xb0-0xb7) | V_CMPX_{OP8}_I16   | Also write result to EXEC. Signed 16-bit values.
     150184-191 (0xb8-0xbf) | V_CMPX_{OP8}_U16   | Also write result to EXEC. Unsigned 16-bit values.
     151192-199 (0xc0-0xc7) | V_CMP_{OP8}_I32    | Signed 32-bit values.
     152200-207 (0xc8-0xcf) | V_CMP_{OP8}_U32    | Unsigned 32-bit values.
     153208-215 (0xd0-0xd7) | V_CMPX_{OP8}_I32   | Also write result to EXEC. Signed 32-bit values.
     154216-223 (0xd8-0xdf) | V_CMPX_{OP8}_U32   | Also write result to EXEC. Unsigned 32-bit values.
     155224-231 (0xe0-0xe7) | V_CMP_{OP8}_I64    | Signed 64-bit values.
     156232-239 (0xe8-0xef) | V_CMP_{OP8}_U64    | Unsigned 64-bit values.
     157240-247 (0xf0-0xf7) | V_CMPX_{OP8}_I64   | Also write result to EXEC. Signed 64-bit values.
     158248-255 (0xf8-0xff) | V_CMPX_{OP8}_U64   | Also write result to EXEC. Unsigned 64-bit values.
    131159
    132160Table of OP16 (compare operations) for integer values comparisons:
     
    1411695 (0x5)       | LG, NE   | SDST(LANEID) = (TYPE)SRC0 != (TYPE)SRC1
    1421706 (0x6)       | GE       | SDST(LANEID) = (TYPE)SRC0 >= (TYPE)SRC1
    143 7 (0x7)       | T        | SDST(LANEID) = 1
     1717 (0x7)       | TRU, T   | SDST(LANEID) = 1
    144172
    145173LANEID in description is lane id. TYPE is type of compared values (UINT32 for _U32,
     
    154182Table of class instructions:
    155183
    156 ### Tables of opcodes and their descriptions (GCN 1.2)
     184#### V_CMP_CLASS_F16
     185
     186Opcode: 20 (0x14) for GCN 1.2 
     187Syntax VOPC: V_CMP_CLASS_F16 VCC, SRC0, SRC1 
     188Syntax VOP3: V_CMP_CLASS_F16 SDST, SRC0, SRC1 
     189Operation: Check whether SSRC0 half floating point value belongs to one of specified class.
     190Classes are specified as set bits in SRC1. If that condition is satisfied then store
     1911 to bit of SDST with number of current lane id, otherwise clear that bit.
     192No flushing denormalized values for SRC0. List of classes:
     193
     194Bit | Description
     195----|----------------------------
     1960   | Signaling NaN
     1971   | quiet Nan
     1982   | -INF
     1993   | negative normalized value
     2004   | negative dernormalized value
     2015   | negative zero
     2026   | positive zero
     2037   | positive denormalized value
     2048   | positive normalized value
     2059   | +INF
     206
     207#### V_CMPX_CLASS_F16
     208
     209Opcode: 21 (0x15) for GCN 1.2 
     210Syntax VOPC: V_CMPX_CLASS_F16 VCC, SRC0, SRC1 
     211Syntax VOP3: V_CMPX_CLASS_F16 SDST, SRC0, SRC1 
     212Operation: Check whether SSRC0 half floating point value belongs to one of specified class.
     213Classes are specified as set bits in SRC1. If that condition is satisfied then store
     2141 to bit of SDST and EXEC with number of current lane id, otherwise clear that bit.
     215No flushing denormalized values for SRC0. List of classes:
     216
     217Bit | Description
     218----|----------------------------
     2190   | Signaling NaN
     2201   | quiet Nan
     2212   | -INF
     2223   | negative normalized value
     2234   | negative dernormalized value
     2245   | negative zero
     2256   | positive zero
     2267   | positive denormalized value
     2278   | positive normalized value
     2289   | +INF
    157229
    158230
    159231#### V_CMP_CLASS_F32
    160232
    161 Opcode: 0x88 
     233Opcode: 136 (0x88) for GCN 1.0/1.1; 16 (0x10) for GCN 1.2 
    162234Syntax VOPC: V_CMP_CLASS_F32 VCC, SRC0, SRC1 
    163235Syntax VOP3: V_CMP_CLASS_F32 SDST, SRC0, SRC1 
     
    182254#### V_CMPX_CLASS_F32
    183255
    184 Opcode: 0x98 
     256Opcode: 152 (0x98) for GCN 1.0/1.1; 17 (0x11) for GCN 1.2 
    185257Syntax VOPC: V_CMPX_CLASS_F32 VCC, SRC0, SRC1 
    186258Syntax VOP3: V_CMPX_CLASS_F32 SDST, SRC0, SRC1 
     
    205277#### V_CMP_CLASS_F64
    206278
    207 Opcode: 0xa8 
     279Opcode: 168 (0xa8) for GCN 1.0/1.1; 18 (0x12) for GCN 1.2 
    208280Syntax VOPC: V_CMP_CLASS_F64 VCC, SRC0, SRC1(2) 
    209281Syntax VOP3: V_CMP_CLASS_F64 SDST, SRC0(2), SRC1(2) 
     
    228300#### V_CMPX_CLASS_F64
    229301
    230 Opcode: 0xb8 
     302Opcode: 184 (0xb8) for GCN 1.01/1.1; 19 (0x13) for GCN 1.2 
    231303Syntax VOPC: V_CMPX_CLASS_F64 VCC, SRC0(2), SRC1(2) 
    232304Syntax VOP3: V_CMPX_CLASS_F64 SDST, SRC0(2), SRC1(2) 
Note: See TracChangeset for help on using the changeset viewer.