10#ifndef LLVM_LIB_TARGET_AMDGPU_SIDEFINES_H
11#define LLVM_LIB_TARGET_AMDGPU_SIDEFINES_H
204template <
typename...
T>
constexpr bool isSALU(
const T &...O) {
207template <
typename...
T>
constexpr bool isVALU(
const T &...O) {
210template <
typename...
T>
constexpr bool isSOP1(
const T &...O) {
213template <
typename...
T>
constexpr bool isSOP2(
const T &...O) {
216template <
typename...
T>
constexpr bool isSOPC(
const T &...O) {
219template <
typename...
T>
constexpr bool isSOPK(
const T &...O) {
222template <
typename...
T>
constexpr bool isSOPP(
const T &...O) {
225template <
typename...
T>
constexpr bool isVOP1(
const T &...O) {
228template <
typename...
T>
constexpr bool isVOP2(
const T &...O) {
231template <
typename...
T>
constexpr bool isVOPC(
const T &...O) {
234template <
typename...
T>
constexpr bool isVOP3(
const T &...O) {
237template <
typename...
T>
constexpr bool isVOP3P(
const T &...O) {
240template <
typename...
T>
constexpr bool isVINTRP(
const T &...O) {
243template <
typename...
T>
constexpr bool isSDWA(
const T &...O) {
246template <
typename...
T>
constexpr bool isDPP(
const T &...O) {
249template <
typename...
T>
constexpr bool isTRANS(
const T &...O) {
252template <
typename...
T>
constexpr bool isMUBUF(
const T &...O) {
255template <
typename...
T>
constexpr bool isMTBUF(
const T &...O) {
258template <
typename...
T>
constexpr bool isSMRD(
const T &...O) {
261template <
typename...
T>
constexpr bool isMIMG(
const T &...O) {
264template <
typename...
T>
constexpr bool isVIMAGE(
const T &...O) {
270template <
typename...
T>
constexpr bool isEXP(
const T &...O) {
273template <
typename...
T>
constexpr bool isFLAT(
const T &...O) {
276template <
typename...
T>
constexpr bool isDS(
const T &...O) {
279template <
typename...
T>
constexpr bool isSpill(
const T &...O) {
282template <
typename...
T>
constexpr bool isLDSDIR(
const T &...O) {
288template <
typename...
T>
constexpr bool isWQM(
const T &...O) {
327template <
typename...
T>
constexpr bool isPacked(
const T &...O) {
330template <
typename...
T>
constexpr bool isD16Buf(
const T &...O) {
342template <
typename...
T>
constexpr bool isMAI(
const T &...O) {
345template <
typename...
T>
constexpr bool isDOT(
const T &...O) {
357template <
typename...
T>
constexpr bool isWMMA(
const T &...O) {
366template <
typename...
T>
constexpr bool isGWS(
const T &...O) {
369template <
typename...
T>
constexpr bool isSWMMAC(
const T &...O) {
380template <
typename...
T>
constexpr bool isAtomic(
const T &...O) {
387template <
typename...
T>
constexpr bool isImage(
const T &...O) {
391template <
typename...
T>
constexpr bool isVMEM(
const T &...O) {
1358#define R_00B028_SPI_SHADER_PGM_RSRC1_PS 0x00B028
1359#define S_00B028_VGPRS(x) (((x) & 0x3F) << 0)
1360#define S_00B028_SGPRS(x) (((x) & 0x0F) << 6)
1361#define S_00B028_MEM_ORDERED(x) (((x) & 0x1) << 25)
1362#define G_00B028_MEM_ORDERED(x) (((x) >> 25) & 0x1)
1363#define C_00B028_MEM_ORDERED 0xFDFFFFFF
1365#define R_00B02C_SPI_SHADER_PGM_RSRC2_PS 0x00B02C
1366#define S_00B02C_EXTRA_LDS_SIZE(x) (((x) & 0xFF) << 8)
1367#define R_00B128_SPI_SHADER_PGM_RSRC1_VS 0x00B128
1368#define S_00B128_MEM_ORDERED(x) (((x) & 0x1) << 27)
1369#define G_00B128_MEM_ORDERED(x) (((x) >> 27) & 0x1)
1370#define C_00B128_MEM_ORDERED 0xF7FFFFFF
1372#define R_00B228_SPI_SHADER_PGM_RSRC1_GS 0x00B228
1373#define S_00B228_WGP_MODE(x) (((x) & 0x1) << 27)
1374#define G_00B228_WGP_MODE(x) (((x) >> 27) & 0x1)
1375#define C_00B228_WGP_MODE 0xF7FFFFFF
1376#define S_00B228_MEM_ORDERED(x) (((x) & 0x1) << 25)
1377#define G_00B228_MEM_ORDERED(x) (((x) >> 25) & 0x1)
1378#define C_00B228_MEM_ORDERED 0xFDFFFFFF
1380#define R_00B328_SPI_SHADER_PGM_RSRC1_ES 0x00B328
1381#define R_00B428_SPI_SHADER_PGM_RSRC1_HS 0x00B428
1382#define S_00B428_WGP_MODE(x) (((x) & 0x1) << 26)
1383#define G_00B428_WGP_MODE(x) (((x) >> 26) & 0x1)
1384#define C_00B428_WGP_MODE 0xFBFFFFFF
1385#define S_00B428_MEM_ORDERED(x) (((x) & 0x1) << 24)
1386#define G_00B428_MEM_ORDERED(x) (((x) >> 24) & 0x1)
1387#define C_00B428_MEM_ORDERED 0xFEFFFFFF
1389#define R_00B528_SPI_SHADER_PGM_RSRC1_LS 0x00B528
1391#define R_00B84C_COMPUTE_PGM_RSRC2 0x00B84C
1392#define S_00B84C_SCRATCH_EN(x) (((x) & 0x1) << 0)
1393#define G_00B84C_SCRATCH_EN(x) (((x) >> 0) & 0x1)
1394#define C_00B84C_SCRATCH_EN 0xFFFFFFFE
1395#define S_00B84C_USER_SGPR(x) (((x) & 0x1F) << 1)
1396#define G_00B84C_USER_SGPR(x) (((x) >> 1) & 0x1F)
1397#define C_00B84C_USER_SGPR 0xFFFFFFC1
1398#define S_00B84C_TRAP_HANDLER(x) (((x) & 0x1) << 6)
1399#define G_00B84C_TRAP_HANDLER(x) (((x) >> 6) & 0x1)
1400#define C_00B84C_TRAP_HANDLER 0xFFFFFFBF
1401#define S_00B84C_TGID_X_EN(x) (((x) & 0x1) << 7)
1402#define G_00B84C_TGID_X_EN(x) (((x) >> 7) & 0x1)
1403#define C_00B84C_TGID_X_EN 0xFFFFFF7F
1404#define S_00B84C_TGID_Y_EN(x) (((x) & 0x1) << 8)
1405#define G_00B84C_TGID_Y_EN(x) (((x) >> 8) & 0x1)
1406#define C_00B84C_TGID_Y_EN 0xFFFFFEFF
1407#define S_00B84C_TGID_Z_EN(x) (((x) & 0x1) << 9)
1408#define G_00B84C_TGID_Z_EN(x) (((x) >> 9) & 0x1)
1409#define C_00B84C_TGID_Z_EN 0xFFFFFDFF
1410#define S_00B84C_TG_SIZE_EN(x) (((x) & 0x1) << 10)
1411#define G_00B84C_TG_SIZE_EN(x) (((x) >> 10) & 0x1)
1412#define C_00B84C_TG_SIZE_EN 0xFFFFFBFF
1413#define S_00B84C_TIDIG_COMP_CNT(x) (((x) & 0x03) << 11)
1414#define G_00B84C_TIDIG_COMP_CNT(x) (((x) >> 11) & 0x03)
1415#define C_00B84C_TIDIG_COMP_CNT 0xFFFFE7FF
1417#define S_00B84C_EXCP_EN_MSB(x) (((x) & 0x03) << 13)
1418#define G_00B84C_EXCP_EN_MSB(x) (((x) >> 13) & 0x03)
1419#define C_00B84C_EXCP_EN_MSB 0xFFFF9FFF
1421#define S_00B84C_LDS_SIZE(x) (((x) & 0x1FF) << 15)
1422#define G_00B84C_LDS_SIZE(x) (((x) >> 15) & 0x1FF)
1423#define C_00B84C_LDS_SIZE 0xFF007FFF
1424#define S_00B84C_EXCP_EN(x) (((x) & 0x7F) << 24)
1425#define G_00B84C_EXCP_EN(x) (((x) >> 24) & 0x7F)
1426#define C_00B84C_EXCP_EN 0x80FFFFFF
1428#define S_00B84C_USER_SGPR_GFX1250(x) (((x) & 0x3F) << 1)
1429#define G_00B84C_USER_SGPR_GFX1250(x) (((x) >> 1) & 0x3F)
1430#define C_00B84C_USER_SGPR_GFX1250 0xFFFFFF81
1432#define R_0286CC_SPI_PS_INPUT_ENA 0x0286CC
1433#define R_0286D0_SPI_PS_INPUT_ADDR 0x0286D0
1435#define R_00B848_COMPUTE_PGM_RSRC1 0x00B848
1436#define S_00B848_VGPRS(x) (((x) & 0x3F) << 0)
1437#define G_00B848_VGPRS(x) (((x) >> 0) & 0x3F)
1438#define C_00B848_VGPRS 0xFFFFFFC0
1439#define S_00B848_SGPRS(x) (((x) & 0x0F) << 6)
1440#define G_00B848_SGPRS(x) (((x) >> 6) & 0x0F)
1441#define C_00B848_SGPRS 0xFFFFFC3F
1442#define S_00B848_PRIORITY(x) (((x) & 0x03) << 10)
1443#define G_00B848_PRIORITY(x) (((x) >> 10) & 0x03)
1444#define C_00B848_PRIORITY 0xFFFFF3FF
1445#define S_00B848_FLOAT_MODE(x) (((x) & 0xFF) << 12)
1446#define G_00B848_FLOAT_MODE(x) (((x) >> 12) & 0xFF)
1447#define C_00B848_FLOAT_MODE 0xFFF00FFF
1448#define S_00B848_PRIV(x) (((x) & 0x1) << 20)
1449#define G_00B848_PRIV(x) (((x) >> 20) & 0x1)
1450#define C_00B848_PRIV 0xFFEFFFFF
1451#define S_00B848_DX10_CLAMP(x) (((x) & 0x1) << 21)
1452#define G_00B848_DX10_CLAMP(x) (((x) >> 21) & 0x1)
1453#define C_00B848_DX10_CLAMP 0xFFDFFFFF
1454#define S_00B848_RR_WG_MODE(x) (((x) & 0x1) << 21)
1455#define G_00B848_RR_WG_MODE(x) (((x) >> 21) & 0x1)
1456#define C_00B848_RR_WG_MODE 0xFFDFFFFF
1457#define S_00B848_DEBUG_MODE(x) (((x) & 0x1) << 22)
1458#define G_00B848_DEBUG_MODE(x) (((x) >> 22) & 0x1)
1459#define C_00B848_DEBUG_MODE 0xFFBFFFFF
1460#define S_00B848_IEEE_MODE(x) (((x) & 0x1) << 23)
1461#define G_00B848_IEEE_MODE(x) (((x) >> 23) & 0x1)
1462#define C_00B848_IEEE_MODE 0xFF7FFFFF
1463#define S_00B848_WGP_MODE(x) (((x) & 0x1) << 29)
1464#define G_00B848_WGP_MODE(x) (((x) >> 29) & 0x1)
1465#define C_00B848_WGP_MODE 0xDFFFFFFF
1466#define S_00B848_MEM_ORDERED(x) (((x) & 0x1) << 30)
1467#define G_00B848_MEM_ORDERED(x) (((x) >> 30) & 0x1)
1468#define C_00B848_MEM_ORDERED 0xBFFFFFFF
1469#define S_00B848_FWD_PROGRESS(x) (((x) & 0x1) << 31)
1470#define G_00B848_FWD_PROGRESS(x) (((x) >> 31) & 0x1)
1471#define C_00B848_FWD_PROGRESS 0x7FFFFFFF
1474#define FP_ROUND_ROUND_TO_NEAREST 0
1475#define FP_ROUND_ROUND_TO_INF 1
1476#define FP_ROUND_ROUND_TO_NEGINF 2
1477#define FP_ROUND_ROUND_TO_ZERO 3
1481#define FP_ROUND_MODE_SP(x) ((x) & 0x3)
1482#define FP_ROUND_MODE_DP(x) (((x) & 0x3) << 2)
1484#define FP_DENORM_FLUSH_IN_FLUSH_OUT 0
1485#define FP_DENORM_FLUSH_OUT 1
1486#define FP_DENORM_FLUSH_IN 2
1487#define FP_DENORM_FLUSH_NONE 3
1492#define FP_DENORM_MODE_SP(x) (((x) & 0x3) << 4)
1493#define FP_DENORM_MODE_DP(x) (((x) & 0x3) << 6)
1495#define R_00B860_COMPUTE_TMPRING_SIZE 0x00B860
1496#define S_00B860_WAVESIZE_PreGFX11(x) (((x) & 0x1FFF) << 12)
1497#define S_00B860_WAVESIZE_GFX11(x) (((x) & 0x7FFF) << 12)
1498#define S_00B860_WAVESIZE_GFX12Plus(x) (((x) & 0x3FFFF) << 12)
1500#define R_0286E8_SPI_TMPRING_SIZE 0x0286E8
1501#define S_0286E8_WAVESIZE_PreGFX11(x) (((x) & 0x1FFF) << 12)
1502#define S_0286E8_WAVESIZE_GFX11(x) (((x) & 0x7FFF) << 12)
1503#define S_0286E8_WAVESIZE_GFX12Plus(x) (((x) & 0x3FFFF) << 12)
1505#define R_028B54_VGT_SHADER_STAGES_EN 0x028B54
1506#define S_028B54_HS_W32_EN(x) (((x) & 0x1) << 21)
1507#define S_028B54_GS_W32_EN(x) (((x) & 0x1) << 22)
1508#define S_028B54_VS_W32_EN(x) (((x) & 0x1) << 23)
1509#define R_0286D8_SPI_PS_IN_CONTROL 0x0286D8
1510#define S_0286D8_PS_W32_EN(x) (((x) & 0x1) << 15)
1511#define R_00B800_COMPUTE_DISPATCH_INITIATOR 0x00B800
1512#define S_00B800_CS_W32_EN(x) (((x) & 0x1) << 15)
1514#define R_SPILLED_SGPRS 0x4
1515#define R_SPILLED_VGPRS 0x8
AMDGPU address space definition.
Instances of this class represent a single low-level machine instruction.
unsigned getOpcode() const
Describe properties that are true of each instruction in the target description file.
Interface to description of machine instruction set.
const MCInstrDesc & get(unsigned Opcode) const
Return the machine instruction descriptor that corresponds to the specified instruction opcode.
@ 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_RTN_GET_CLUSTER_BARRIER_STATE
@ ID_DEALLOC_VGPRS_GFX11Plus
@ ID_RTN_SAVE_WAVE_HAS_TDM
@ 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_C_FP64
@ OPERAND_REG_INLINE_C_BF16
@ OPERAND_REG_INLINE_C_V2BF16
@ OPERAND_REG_IMM_V2INT64
@ OPERAND_REG_IMM_V2INT16
@ OPERAND_REG_IMM_INT32
Operands with register, 32-bit, or 64-bit immediate.
@ OPERAND_REG_INLINE_AC_FIRST
@ OPERAND_REG_IMM_V2FP16_SPLAT
@ OPERAND_REG_INLINE_C_INT64
@ OPERAND_REG_INLINE_C_INT16
Operands with register or inline constant.
@ OPERAND_REG_IMM_NOINLINE_V2FP16
@ OPERAND_REG_INLINE_C_V2FP16
@ OPERAND_REG_INLINE_AC_INT32
Operands with an AccVGPR register or inline constant.
@ OPERAND_REG_INLINE_AC_FP32
@ 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_INLINE_C_AV64_PSEUDO
@ OPERAND_REG_INLINE_AC_FP64
@ OPERAND_REG_INLINE_C_FP16
@ OPERAND_INLINE_SPLIT_BARRIER_INT32
constexpr bool isAtomicRet(const T &...O)
constexpr bool isVOPC(const T &...O)
constexpr bool isVOP3(const T &...O)
constexpr bool isScalarStore(const T &...O)
constexpr bool hasVOP3OpSel(const T &...O)
constexpr bool isVOP1(const T &...O)
constexpr bool isFPAtomic(const T &...O)
constexpr bool usesVM_CNT(const T &...O)
constexpr bool usesTENSOR_CNT(const T &...O)
constexpr bool isD16Buf(const T &...O)
constexpr bool isMAI(const T &...O)
constexpr bool isVOP2(const T &...O)
constexpr bool isMaybeAtomic(const T &...O)
constexpr bool isSWMMAC(const T &...O)
constexpr bool isTRANS(const T &...O)
constexpr bool isSOP2(const T &...O)
constexpr bool isFLAT(const T &...O)
constexpr bool isVOP3P(const T &...O)
constexpr bool usesFPDPRounding(const T &...O)
constexpr bool isDisableWQM(const T &...O)
constexpr bool hasIntClamp(const T &...O)
constexpr bool isAtomicNoRet(const T &...O)
constexpr bool isMTBUF(const T &...O)
constexpr bool isVIMAGE(const T &...O)
constexpr bool isSMRD(const T &...O)
constexpr bool isFlatScratch(const T &...O)
constexpr bool isSpill(const T &...O)
constexpr uint64_t getTSFlags(const MCInstrDesc &Desc)
constexpr bool isMIMG(const T &...O)
constexpr bool isVMEM(const T &...O)
constexpr bool hasFPClamp(const T &...O)
constexpr bool isNeverUniform(const T &...O)
constexpr bool isImage(const T &...O)
constexpr bool isWMMA(const T &...O)
constexpr bool isVALU(const T &...O)
constexpr bool isWQM(const T &...O)
constexpr bool hasClampLo(const T &...O)
constexpr bool isGWS(const T &...O)
constexpr bool isFlatGlobal(const T &...O)
constexpr bool usesASYNC_CNT(const T &...O)
constexpr bool isMUBUF(const T &...O)
constexpr bool isSDWA(const T &...O)
constexpr bool isTiedSourceNotRead(const T &...O)
constexpr bool isEXP(const T &...O)
constexpr bool usesLGKM_CNT(const T &...O)
constexpr bool isSOPK(const T &...O)
constexpr bool isSOPC(const T &...O)
constexpr bool isSOPP(const T &...O)
constexpr bool isDOT(const T &...O)
constexpr bool isVINTRP(const T &...O)
constexpr bool isVINTERP(const T &...O)
constexpr bool isVSAMPLE(const T &...O)
constexpr bool isDS(const T &...O)
constexpr bool isAtomic(const T &...O)
constexpr bool isLDSDIR(const T &...O)
constexpr bool isSALU(const T &...O)
constexpr bool isGather4(const T &...O)
constexpr bool isPacked(const T &...O)
constexpr bool hasClampHi(const T &...O)
constexpr bool isDPP(const T &...O)
constexpr bool isSOP1(const T &...O)
constexpr bool isSegmentSpecificFLAT(const T &...O)
constexpr bool isFixedSize(const T &...O)
This is an optimization pass for GlobalISel generic memory operations.
@ RegTupleAlignUnitsWidth