10#ifndef LLVM_LIB_TARGET_AMDGPU_SIDEFINES_H
11#define LLVM_LIB_TARGET_AMDGPU_SIDEFINES_H
32namespace SIEncodingFamily {
51namespace SIInstrFlags {
308namespace VGPRIndexMode {
333namespace AMDGPUAsmVariants {
369namespace HWEncoding {
581namespace MTBUFFormat {
1024namespace VOP3PEncoding {
1034namespace ImplicitArg {
1063namespace VirtRegFlag {
1089#define R_00B028_SPI_SHADER_PGM_RSRC1_PS 0x00B028
1090#define S_00B028_VGPRS(x) (((x) & 0x3F) << 0)
1091#define S_00B028_SGPRS(x) (((x) & 0x0F) << 6)
1092#define S_00B028_MEM_ORDERED(x) (((x) & 0x1) << 25)
1093#define G_00B028_MEM_ORDERED(x) (((x) >> 25) & 0x1)
1094#define C_00B028_MEM_ORDERED 0xFDFFFFFF
1096#define R_00B02C_SPI_SHADER_PGM_RSRC2_PS 0x00B02C
1097#define S_00B02C_EXTRA_LDS_SIZE(x) (((x) & 0xFF) << 8)
1098#define R_00B128_SPI_SHADER_PGM_RSRC1_VS 0x00B128
1099#define S_00B128_MEM_ORDERED(x) (((x) & 0x1) << 27)
1100#define G_00B128_MEM_ORDERED(x) (((x) >> 27) & 0x1)
1101#define C_00B128_MEM_ORDERED 0xF7FFFFFF
1103#define R_00B228_SPI_SHADER_PGM_RSRC1_GS 0x00B228
1104#define S_00B228_WGP_MODE(x) (((x) & 0x1) << 27)
1105#define G_00B228_WGP_MODE(x) (((x) >> 27) & 0x1)
1106#define C_00B228_WGP_MODE 0xF7FFFFFF
1107#define S_00B228_MEM_ORDERED(x) (((x) & 0x1) << 25)
1108#define G_00B228_MEM_ORDERED(x) (((x) >> 25) & 0x1)
1109#define C_00B228_MEM_ORDERED 0xFDFFFFFF
1111#define R_00B328_SPI_SHADER_PGM_RSRC1_ES 0x00B328
1112#define R_00B428_SPI_SHADER_PGM_RSRC1_HS 0x00B428
1113#define S_00B428_WGP_MODE(x) (((x) & 0x1) << 26)
1114#define G_00B428_WGP_MODE(x) (((x) >> 26) & 0x1)
1115#define C_00B428_WGP_MODE 0xFBFFFFFF
1116#define S_00B428_MEM_ORDERED(x) (((x) & 0x1) << 24)
1117#define G_00B428_MEM_ORDERED(x) (((x) >> 24) & 0x1)
1118#define C_00B428_MEM_ORDERED 0xFEFFFFFF
1120#define R_00B528_SPI_SHADER_PGM_RSRC1_LS 0x00B528
1122#define R_00B84C_COMPUTE_PGM_RSRC2 0x00B84C
1123#define S_00B84C_SCRATCH_EN(x) (((x) & 0x1) << 0)
1124#define G_00B84C_SCRATCH_EN(x) (((x) >> 0) & 0x1)
1125#define C_00B84C_SCRATCH_EN 0xFFFFFFFE
1126#define S_00B84C_USER_SGPR(x) (((x) & 0x1F) << 1)
1127#define G_00B84C_USER_SGPR(x) (((x) >> 1) & 0x1F)
1128#define C_00B84C_USER_SGPR 0xFFFFFFC1
1129#define S_00B84C_TRAP_HANDLER(x) (((x) & 0x1) << 6)
1130#define G_00B84C_TRAP_HANDLER(x) (((x) >> 6) & 0x1)
1131#define C_00B84C_TRAP_HANDLER 0xFFFFFFBF
1132#define S_00B84C_TGID_X_EN(x) (((x) & 0x1) << 7)
1133#define G_00B84C_TGID_X_EN(x) (((x) >> 7) & 0x1)
1134#define C_00B84C_TGID_X_EN 0xFFFFFF7F
1135#define S_00B84C_TGID_Y_EN(x) (((x) & 0x1) << 8)
1136#define G_00B84C_TGID_Y_EN(x) (((x) >> 8) & 0x1)
1137#define C_00B84C_TGID_Y_EN 0xFFFFFEFF
1138#define S_00B84C_TGID_Z_EN(x) (((x) & 0x1) << 9)
1139#define G_00B84C_TGID_Z_EN(x) (((x) >> 9) & 0x1)
1140#define C_00B84C_TGID_Z_EN 0xFFFFFDFF
1141#define S_00B84C_TG_SIZE_EN(x) (((x) & 0x1) << 10)
1142#define G_00B84C_TG_SIZE_EN(x) (((x) >> 10) & 0x1)
1143#define C_00B84C_TG_SIZE_EN 0xFFFFFBFF
1144#define S_00B84C_TIDIG_COMP_CNT(x) (((x) & 0x03) << 11)
1145#define G_00B84C_TIDIG_COMP_CNT(x) (((x) >> 11) & 0x03)
1146#define C_00B84C_TIDIG_COMP_CNT 0xFFFFE7FF
1148#define S_00B84C_EXCP_EN_MSB(x) (((x) & 0x03) << 13)
1149#define G_00B84C_EXCP_EN_MSB(x) (((x) >> 13) & 0x03)
1150#define C_00B84C_EXCP_EN_MSB 0xFFFF9FFF
1152#define S_00B84C_LDS_SIZE(x) (((x) & 0x1FF) << 15)
1153#define G_00B84C_LDS_SIZE(x) (((x) >> 15) & 0x1FF)
1154#define C_00B84C_LDS_SIZE 0xFF007FFF
1155#define S_00B84C_EXCP_EN(x) (((x) & 0x7F) << 24)
1156#define G_00B84C_EXCP_EN(x) (((x) >> 24) & 0x7F)
1157#define C_00B84C_EXCP_EN 0x80FFFFFF
1159#define R_0286CC_SPI_PS_INPUT_ENA 0x0286CC
1160#define R_0286D0_SPI_PS_INPUT_ADDR 0x0286D0
1162#define R_00B848_COMPUTE_PGM_RSRC1 0x00B848
1163#define S_00B848_VGPRS(x) (((x) & 0x3F) << 0)
1164#define G_00B848_VGPRS(x) (((x) >> 0) & 0x3F)
1165#define C_00B848_VGPRS 0xFFFFFFC0
1166#define S_00B848_SGPRS(x) (((x) & 0x0F) << 6)
1167#define G_00B848_SGPRS(x) (((x) >> 6) & 0x0F)
1168#define C_00B848_SGPRS 0xFFFFFC3F
1169#define S_00B848_PRIORITY(x) (((x) & 0x03) << 10)
1170#define G_00B848_PRIORITY(x) (((x) >> 10) & 0x03)
1171#define C_00B848_PRIORITY 0xFFFFF3FF
1172#define S_00B848_FLOAT_MODE(x) (((x) & 0xFF) << 12)
1173#define G_00B848_FLOAT_MODE(x) (((x) >> 12) & 0xFF)
1174#define C_00B848_FLOAT_MODE 0xFFF00FFF
1175#define S_00B848_PRIV(x) (((x) & 0x1) << 20)
1176#define G_00B848_PRIV(x) (((x) >> 20) & 0x1)
1177#define C_00B848_PRIV 0xFFEFFFFF
1178#define S_00B848_DX10_CLAMP(x) (((x) & 0x1) << 21)
1179#define G_00B848_DX10_CLAMP(x) (((x) >> 21) & 0x1)
1180#define C_00B848_DX10_CLAMP 0xFFDFFFFF
1181#define S_00B848_RR_WG_MODE(x) (((x) & 0x1) << 21)
1182#define G_00B848_RR_WG_MODE(x) (((x) >> 21) & 0x1)
1183#define C_00B848_RR_WG_MODE 0xFFDFFFFF
1184#define S_00B848_DEBUG_MODE(x) (((x) & 0x1) << 22)
1185#define G_00B848_DEBUG_MODE(x) (((x) >> 22) & 0x1)
1186#define C_00B848_DEBUG_MODE 0xFFBFFFFF
1187#define S_00B848_IEEE_MODE(x) (((x) & 0x1) << 23)
1188#define G_00B848_IEEE_MODE(x) (((x) >> 23) & 0x1)
1189#define C_00B848_IEEE_MODE 0xFF7FFFFF
1190#define S_00B848_WGP_MODE(x) (((x) & 0x1) << 29)
1191#define G_00B848_WGP_MODE(x) (((x) >> 29) & 0x1)
1192#define C_00B848_WGP_MODE 0xDFFFFFFF
1193#define S_00B848_MEM_ORDERED(x) (((x) & 0x1) << 30)
1194#define G_00B848_MEM_ORDERED(x) (((x) >> 30) & 0x1)
1195#define C_00B848_MEM_ORDERED 0xBFFFFFFF
1196#define S_00B848_FWD_PROGRESS(x) (((x) & 0x1) << 31)
1197#define G_00B848_FWD_PROGRESS(x) (((x) >> 31) & 0x1)
1198#define C_00B848_FWD_PROGRESS 0x7FFFFFFF
1201#define FP_ROUND_ROUND_TO_NEAREST 0
1202#define FP_ROUND_ROUND_TO_INF 1
1203#define FP_ROUND_ROUND_TO_NEGINF 2
1204#define FP_ROUND_ROUND_TO_ZERO 3
1208#define FP_ROUND_MODE_SP(x) ((x) & 0x3)
1209#define FP_ROUND_MODE_DP(x) (((x) & 0x3) << 2)
1211#define FP_DENORM_FLUSH_IN_FLUSH_OUT 0
1212#define FP_DENORM_FLUSH_OUT 1
1213#define FP_DENORM_FLUSH_IN 2
1214#define FP_DENORM_FLUSH_NONE 3
1219#define FP_DENORM_MODE_SP(x) (((x) & 0x3) << 4)
1220#define FP_DENORM_MODE_DP(x) (((x) & 0x3) << 6)
1222#define R_00B860_COMPUTE_TMPRING_SIZE 0x00B860
1223#define S_00B860_WAVESIZE_PreGFX11(x) (((x) & 0x1FFF) << 12)
1224#define S_00B860_WAVESIZE_GFX11(x) (((x) & 0x7FFF) << 12)
1225#define S_00B860_WAVESIZE_GFX12Plus(x) (((x) & 0x3FFFF) << 12)
1227#define R_0286E8_SPI_TMPRING_SIZE 0x0286E8
1228#define S_0286E8_WAVESIZE_PreGFX11(x) (((x) & 0x1FFF) << 12)
1229#define S_0286E8_WAVESIZE_GFX11(x) (((x) & 0x7FFF) << 12)
1230#define S_0286E8_WAVESIZE_GFX12Plus(x) (((x) & 0x3FFFF) << 12)
1232#define R_028B54_VGT_SHADER_STAGES_EN 0x028B54
1233#define S_028B54_HS_W32_EN(x) (((x) & 0x1) << 21)
1234#define S_028B54_GS_W32_EN(x) (((x) & 0x1) << 22)
1235#define S_028B54_VS_W32_EN(x) (((x) & 0x1) << 23)
1236#define R_0286D8_SPI_PS_IN_CONTROL 0x0286D8
1237#define S_0286D8_PS_W32_EN(x) (((x) & 0x1) << 15)
1238#define R_00B800_COMPUTE_DISPATCH_INITIATOR 0x00B800
1239#define S_00B800_CS_W32_EN(x) (((x) & 0x1) << 15)
1241#define R_SPILLED_SGPRS 0x4
1242#define R_SPILLED_VGPRS 0x8
static std::vector< std::pair< int, unsigned > > Swizzle(std::vector< std::pair< int, unsigned > > Src, R600InstrInfo::BankSwizzle Swz)
@ BARRIER_SCOPE_WORKGROUP
@ INLINE_INTEGER_C_POSITIVE_MAX
@ ET_DUAL_SRC_BLEND_MAX_IDX
@ ID_PERF_SNAPSHOT_PC_HI_gfx11
@ ID_PERF_SNAPSHOT_PC_LO_gfx11
@ ID_SQ_PERF_SNAPSHOT_PC_LO
@ ID_SQ_PERF_SNAPSHOT_DATA1
@ ID_SQ_PERF_SNAPSHOT_DATA
@ ID_PERF_SNAPSHOT_PC_LO_gfx12
@ ID_PERF_SNAPSHOT_DATA_gfx12
@ ID_PERF_SNAPSHOT_DATA_gfx11
@ ID_PERF_SNAPSHOT_PC_HI_gfx12
@ ID_SQ_PERF_SNAPSHOT_PC_HI
@ EXCP_EN_FLOAT_DIV0_MASK
@ EXCP_EN_INPUT_DENORMAL_MASK
@ COMPLETION_ACTION_OFFSET
@ MULTIGRID_SYNC_ARG_OFFSET
@ ID_DEALLOC_VGPRS_GFX11Plus
@ ID_HS_TESSFACTOR_GFX11Plus
@ OP_SYS_ECC_ERR_INTERRUPT
@ UFMT_16_16_16_16_USCALED
@ UFMT_10_10_10_2_USCALED
@ UFMT_2_10_10_10_USCALED
@ UFMT_2_10_10_10_SSCALED
@ UFMT_16_16_16_16_SSCALED
@ UFMT_10_10_10_2_SSCALED
@ UFMT_16_16_16_16_USCALED
@ UFMT_2_10_10_10_SSCALED
@ UFMT_2_10_10_10_USCALED
@ UFMT_16_16_16_16_SSCALED
@ OPERAND_KIMM32
Operand with 32-bit immediate that uses the constant bus.
@ OPERAND_REG_INLINE_C_LAST
@ OPERAND_REG_INLINE_AC_V2FP32
@ OPERAND_REG_INLINE_AC_V2INT32
@ OPERAND_REG_INLINE_C_V2INT32
@ OPERAND_REG_INLINE_C_FP64
@ OPERAND_REG_INLINE_C_BF16
@ OPERAND_REG_INLINE_C_V2BF16
@ OPERAND_REG_IMM_V2INT16
@ OPERAND_REG_INLINE_AC_V2FP16
@ OPERAND_REG_IMM_INT32
Operands with register or 32-bit immediate.
@ OPERAND_REG_INLINE_AC_FIRST
@ OPERAND_REG_IMM_BF16_DEFERRED
@ OPERAND_REG_INLINE_C_INT64
@ OPERAND_REG_INLINE_AC_BF16
@ OPERAND_REG_INLINE_C_INT16
Operands with register or inline constant.
@ OPERAND_REG_INLINE_AC_INT16
Operands with an AccVGPR register or inline constant.
@ OPERAND_REG_INLINE_C_V2FP16
@ OPERAND_REG_INLINE_AC_V2INT16
@ OPERAND_REG_INLINE_AC_FP16
@ OPERAND_REG_INLINE_AC_INT32
@ OPERAND_REG_INLINE_AC_FP32
@ OPERAND_REG_INLINE_AC_V2BF16
@ OPERAND_REG_IMM_V2INT32
@ OPERAND_REG_INLINE_C_FIRST
@ OPERAND_REG_INLINE_C_FP32
@ OPERAND_REG_INLINE_AC_LAST
@ OPERAND_REG_INLINE_C_INT32
@ OPERAND_REG_INLINE_C_V2INT16
@ OPERAND_REG_INLINE_AC_FP64
@ OPERAND_REG_INLINE_C_FP16
@ OPERAND_REG_INLINE_C_V2FP32
@ OPERAND_INLINE_SPLIT_BARRIER_INT32
@ OPERAND_REG_IMM_FP32_DEFERRED
@ OPERAND_REG_IMM_FP16_DEFERRED
This is an optimization pass for GlobalISel generic memory operations.
@ RegTupleAlignUnitsWidth