30 auto isValidIndexForEncoding = [&](
size_t Idx) {
31 return Idx <
N && Table[
Idx].Encoding == Encoding &&
32 !Table[
Idx].Name.empty() &&
33 (!Table[
Idx].Cond || Table[
Idx].Cond(STI));
39 if (isValidIndexForEncoding(Encoding))
40 return Table[Encoding].
Name;
43 if (isValidIndexForEncoding(
Idx))
56 if (Entry.Name !=
Name)
59 if (!Entry.Cond || Entry.Cond(STI))
60 return Entry.Encoding;
65 return InvalidEncoding;
74 {{
"depctr_sa_sdst"}, 1, 1, 0, 1},
75 {{
"depctr_va_vdst"}, 15, 15, 12, 4},
76 {{
"depctr_va_sdst"}, 7, 7, 9, 3},
77 {{
"depctr_va_ssrc"}, 1, 1, 8, 1},
78 {{
"depctr_va_vcc"}, 1, 1, 1, 1},
79 {{
"depctr_vm_vsrc"}, 7, 7, 2, 3},
242namespace MTBUFFormat {
245 "BUF_DATA_FORMAT_INVALID",
247 "BUF_DATA_FORMAT_16",
248 "BUF_DATA_FORMAT_8_8",
249 "BUF_DATA_FORMAT_32",
250 "BUF_DATA_FORMAT_16_16",
251 "BUF_DATA_FORMAT_10_11_11",
252 "BUF_DATA_FORMAT_11_11_10",
253 "BUF_DATA_FORMAT_10_10_10_2",
254 "BUF_DATA_FORMAT_2_10_10_10",
255 "BUF_DATA_FORMAT_8_8_8_8",
256 "BUF_DATA_FORMAT_32_32",
257 "BUF_DATA_FORMAT_16_16_16_16",
258 "BUF_DATA_FORMAT_32_32_32",
259 "BUF_DATA_FORMAT_32_32_32_32",
260 "BUF_DATA_FORMAT_RESERVED_15"
264 "BUF_NUM_FORMAT_UNORM",
265 "BUF_NUM_FORMAT_SNORM",
266 "BUF_NUM_FORMAT_USCALED",
267 "BUF_NUM_FORMAT_SSCALED",
268 "BUF_NUM_FORMAT_UINT",
269 "BUF_NUM_FORMAT_SINT",
271 "BUF_NUM_FORMAT_FLOAT"
275 "BUF_NUM_FORMAT_UNORM",
276 "BUF_NUM_FORMAT_SNORM",
277 "BUF_NUM_FORMAT_USCALED",
278 "BUF_NUM_FORMAT_SSCALED",
279 "BUF_NUM_FORMAT_UINT",
280 "BUF_NUM_FORMAT_SINT",
281 "BUF_NUM_FORMAT_SNORM_OGL",
282 "BUF_NUM_FORMAT_FLOAT"
286 "BUF_NUM_FORMAT_UNORM",
287 "BUF_NUM_FORMAT_SNORM",
288 "BUF_NUM_FORMAT_USCALED",
289 "BUF_NUM_FORMAT_SSCALED",
290 "BUF_NUM_FORMAT_UINT",
291 "BUF_NUM_FORMAT_SINT",
292 "BUF_NUM_FORMAT_RESERVED_6",
293 "BUF_NUM_FORMAT_FLOAT"
308 "BUF_FMT_16_USCALED",
309 "BUF_FMT_16_SSCALED",
316 "BUF_FMT_8_8_USCALED",
317 "BUF_FMT_8_8_SSCALED",
325 "BUF_FMT_16_16_UNORM",
326 "BUF_FMT_16_16_SNORM",
327 "BUF_FMT_16_16_USCALED",
328 "BUF_FMT_16_16_SSCALED",
329 "BUF_FMT_16_16_UINT",
330 "BUF_FMT_16_16_SINT",
331 "BUF_FMT_16_16_FLOAT",
333 "BUF_FMT_10_11_11_UNORM",
334 "BUF_FMT_10_11_11_SNORM",
335 "BUF_FMT_10_11_11_USCALED",
336 "BUF_FMT_10_11_11_SSCALED",
337 "BUF_FMT_10_11_11_UINT",
338 "BUF_FMT_10_11_11_SINT",
339 "BUF_FMT_10_11_11_FLOAT",
341 "BUF_FMT_11_11_10_UNORM",
342 "BUF_FMT_11_11_10_SNORM",
343 "BUF_FMT_11_11_10_USCALED",
344 "BUF_FMT_11_11_10_SSCALED",
345 "BUF_FMT_11_11_10_UINT",
346 "BUF_FMT_11_11_10_SINT",
347 "BUF_FMT_11_11_10_FLOAT",
349 "BUF_FMT_10_10_10_2_UNORM",
350 "BUF_FMT_10_10_10_2_SNORM",
351 "BUF_FMT_10_10_10_2_USCALED",
352 "BUF_FMT_10_10_10_2_SSCALED",
353 "BUF_FMT_10_10_10_2_UINT",
354 "BUF_FMT_10_10_10_2_SINT",
356 "BUF_FMT_2_10_10_10_UNORM",
357 "BUF_FMT_2_10_10_10_SNORM",
358 "BUF_FMT_2_10_10_10_USCALED",
359 "BUF_FMT_2_10_10_10_SSCALED",
360 "BUF_FMT_2_10_10_10_UINT",
361 "BUF_FMT_2_10_10_10_SINT",
363 "BUF_FMT_8_8_8_8_UNORM",
364 "BUF_FMT_8_8_8_8_SNORM",
365 "BUF_FMT_8_8_8_8_USCALED",
366 "BUF_FMT_8_8_8_8_SSCALED",
367 "BUF_FMT_8_8_8_8_UINT",
368 "BUF_FMT_8_8_8_8_SINT",
370 "BUF_FMT_32_32_UINT",
371 "BUF_FMT_32_32_SINT",
372 "BUF_FMT_32_32_FLOAT",
374 "BUF_FMT_16_16_16_16_UNORM",
375 "BUF_FMT_16_16_16_16_SNORM",
376 "BUF_FMT_16_16_16_16_USCALED",
377 "BUF_FMT_16_16_16_16_SSCALED",
378 "BUF_FMT_16_16_16_16_UINT",
379 "BUF_FMT_16_16_16_16_SINT",
380 "BUF_FMT_16_16_16_16_FLOAT",
382 "BUF_FMT_32_32_32_UINT",
383 "BUF_FMT_32_32_32_SINT",
384 "BUF_FMT_32_32_32_FLOAT",
385 "BUF_FMT_32_32_32_32_UINT",
386 "BUF_FMT_32_32_32_32_SINT",
387 "BUF_FMT_32_32_32_32_FLOAT"
496 "BUF_FMT_16_USCALED",
497 "BUF_FMT_16_SSCALED",
504 "BUF_FMT_8_8_USCALED",
505 "BUF_FMT_8_8_SSCALED",
513 "BUF_FMT_16_16_UNORM",
514 "BUF_FMT_16_16_SNORM",
515 "BUF_FMT_16_16_USCALED",
516 "BUF_FMT_16_16_SSCALED",
517 "BUF_FMT_16_16_UINT",
518 "BUF_FMT_16_16_SINT",
519 "BUF_FMT_16_16_FLOAT",
521 "BUF_FMT_10_11_11_FLOAT",
523 "BUF_FMT_11_11_10_FLOAT",
525 "BUF_FMT_10_10_10_2_UNORM",
526 "BUF_FMT_10_10_10_2_SNORM",
527 "BUF_FMT_10_10_10_2_UINT",
528 "BUF_FMT_10_10_10_2_SINT",
530 "BUF_FMT_2_10_10_10_UNORM",
531 "BUF_FMT_2_10_10_10_SNORM",
532 "BUF_FMT_2_10_10_10_USCALED",
533 "BUF_FMT_2_10_10_10_SSCALED",
534 "BUF_FMT_2_10_10_10_UINT",
535 "BUF_FMT_2_10_10_10_SINT",
537 "BUF_FMT_8_8_8_8_UNORM",
538 "BUF_FMT_8_8_8_8_SNORM",
539 "BUF_FMT_8_8_8_8_USCALED",
540 "BUF_FMT_8_8_8_8_SSCALED",
541 "BUF_FMT_8_8_8_8_UINT",
542 "BUF_FMT_8_8_8_8_SINT",
544 "BUF_FMT_32_32_UINT",
545 "BUF_FMT_32_32_SINT",
546 "BUF_FMT_32_32_FLOAT",
548 "BUF_FMT_16_16_16_16_UNORM",
549 "BUF_FMT_16_16_16_16_SNORM",
550 "BUF_FMT_16_16_16_16_USCALED",
551 "BUF_FMT_16_16_16_16_SSCALED",
552 "BUF_FMT_16_16_16_16_UINT",
553 "BUF_FMT_16_16_16_16_SINT",
554 "BUF_FMT_16_16_16_16_FLOAT",
556 "BUF_FMT_32_32_32_UINT",
557 "BUF_FMT_32_32_32_SINT",
558 "BUF_FMT_32_32_32_FLOAT",
559 "BUF_FMT_32_32_32_32_UINT",
560 "BUF_FMT_32_32_32_32_SINT",
561 "BUF_FMT_32_32_32_32_FLOAT"
663namespace VGPRIndexMode {
680 static const GFXVersion Versions[] = {{
"UC_VERSION_GFX7", 0},
681 {
"UC_VERSION_GFX10", 4},
682 {
"UC_VERSION_GFX11", 6},
683 {
"UC_VERSION_GFX12", 9}};
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
static std::vector< std::pair< int, unsigned > > Swizzle(std::vector< std::pair< int, unsigned > > Src, R600InstrInfo::BankSwizzle Swz)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Generic base class for all target subtargets.
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
StringRef - Represent a constant reference to a string, i.e.
const CustomOperandVal DepCtrInfo[]
@ 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
StringRef getHwreg(uint64_t Encoding, const MCSubtargetInfo &STI)
int64_t getHwregId(StringRef Name, const MCSubtargetInfo &STI)
static constexpr CustomOperand Operands[]
int64_t getMsgOpId(int64_t MsgId, StringRef Name, const MCSubtargetInfo &STI)
Map from a symbolic name for a sendmsg operation to the operation portion of the immediate encoding.
int64_t getMsgId(StringRef Name, const MCSubtargetInfo &STI)
Map from a symbolic name for a msg_id to the message portion of the immediate encoding.
static constexpr CustomOperand SysMsgOperands[]
@ ID_DEALLOC_VGPRS_GFX11Plus
@ ID_HS_TESSFACTOR_GFX11Plus
static constexpr CustomOperand StreamMsgOperands[]
@ OP_SYS_ECC_ERR_INTERRUPT
StringRef getMsgName(uint64_t Encoding, const MCSubtargetInfo &STI)
Map from an encoding to the symbolic name for a msg_id immediate.
static constexpr CustomOperand MsgOperands[]
StringRef getMsgOpName(int64_t MsgId, uint64_t Encoding, const MCSubtargetInfo &STI)
Map from an encoding to the symbolic name for a sendmsg operation.
bool msgRequiresOp(int64_t MsgId, const MCSubtargetInfo &STI)
const char *const IdSymbolic[]
ArrayRef< GFXVersion > getGFXVersions()
const char *const IdSymbolic[]
bool isGFX10_BEncoding(const MCSubtargetInfo &STI)
bool isGFX10_GFX11(const MCSubtargetInfo &STI)
bool isGFX10Before1030(const MCSubtargetInfo &STI)
const int OPR_ID_UNSUPPORTED
bool isGFX10(const MCSubtargetInfo &STI)
static int64_t getEncodingFromOperandTable(const CustomOperand(&Table)[N], StringRef Name, const MCSubtargetInfo &STI)
Map from a symbolic name for a sendmsg/hwreg asm operand to it's encoding.
bool isGFX12Plus(const MCSubtargetInfo &STI)
bool isGFX940(const MCSubtargetInfo &STI)
bool isGFX11(const MCSubtargetInfo &STI)
bool isGFX10_3_GFX11(const MCSubtargetInfo &STI)
bool isGFX8_GFX9_GFX10(const MCSubtargetInfo &STI)
bool isNotGFX10Plus(const MCSubtargetInfo &STI)
static StringRef getNameFromOperandTable(const CustomOperand(&Table)[N], unsigned Encoding, const MCSubtargetInfo &STI)
Map from the encoding of a sendmsg/hwreg asm operand to it's name.
bool isNotGFX11Plus(const MCSubtargetInfo &STI)
bool isGFX11Plus(const MCSubtargetInfo &STI)
bool isGFX10Plus(const MCSubtargetInfo &STI)
bool isNotGFX9Plus(const MCSubtargetInfo &STI)
bool isGFX9Plus(const MCSubtargetInfo &STI)
bool isNotGFX12Plus(const MCSubtargetInfo &STI)
bool isGFX9_GFX10_GFX11(const MCSubtargetInfo &STI)
bool isGFX9_GFX10(const MCSubtargetInfo &STI)