30 std::lower_bound(Table, Table +
N, Encoding,
32 return Entry.Encoding < TargetEncoding;
36 for (
auto It =
First; It != Table +
N && It->Encoding == Encoding; ++It) {
37 if (It->Encoding == Encoding && (!It->Cond || It->Cond(STI)))
51 if (Entry.Name != Name)
54 if (!Entry.Cond || Entry.Cond(STI))
55 return Entry.Encoding;
60 return InvalidEncoding;
69 {{
"depctr_sa_sdst"}, 1, 1, 0, 1},
70 {{
"depctr_va_vdst"}, 15, 15, 12, 4},
71 {{
"depctr_va_sdst"}, 7, 7, 9, 3},
72 {{
"depctr_va_ssrc"}, 1, 1, 8, 1},
73 {{
"depctr_va_vcc"}, 1, 1, 1, 1},
74 {{
"depctr_vm_vsrc"}, 7, 7, 2, 3},
241namespace MTBUFFormat {
244 "BUF_DATA_FORMAT_INVALID",
246 "BUF_DATA_FORMAT_16",
247 "BUF_DATA_FORMAT_8_8",
248 "BUF_DATA_FORMAT_32",
249 "BUF_DATA_FORMAT_16_16",
250 "BUF_DATA_FORMAT_10_11_11",
251 "BUF_DATA_FORMAT_11_11_10",
252 "BUF_DATA_FORMAT_10_10_10_2",
253 "BUF_DATA_FORMAT_2_10_10_10",
254 "BUF_DATA_FORMAT_8_8_8_8",
255 "BUF_DATA_FORMAT_32_32",
256 "BUF_DATA_FORMAT_16_16_16_16",
257 "BUF_DATA_FORMAT_32_32_32",
258 "BUF_DATA_FORMAT_32_32_32_32",
259 "BUF_DATA_FORMAT_RESERVED_15"
263 "BUF_NUM_FORMAT_UNORM",
264 "BUF_NUM_FORMAT_SNORM",
265 "BUF_NUM_FORMAT_USCALED",
266 "BUF_NUM_FORMAT_SSCALED",
267 "BUF_NUM_FORMAT_UINT",
268 "BUF_NUM_FORMAT_SINT",
270 "BUF_NUM_FORMAT_FLOAT"
274 "BUF_NUM_FORMAT_UNORM",
275 "BUF_NUM_FORMAT_SNORM",
276 "BUF_NUM_FORMAT_USCALED",
277 "BUF_NUM_FORMAT_SSCALED",
278 "BUF_NUM_FORMAT_UINT",
279 "BUF_NUM_FORMAT_SINT",
280 "BUF_NUM_FORMAT_SNORM_OGL",
281 "BUF_NUM_FORMAT_FLOAT"
285 "BUF_NUM_FORMAT_UNORM",
286 "BUF_NUM_FORMAT_SNORM",
287 "BUF_NUM_FORMAT_USCALED",
288 "BUF_NUM_FORMAT_SSCALED",
289 "BUF_NUM_FORMAT_UINT",
290 "BUF_NUM_FORMAT_SINT",
291 "BUF_NUM_FORMAT_RESERVED_6",
292 "BUF_NUM_FORMAT_FLOAT"
307 "BUF_FMT_16_USCALED",
308 "BUF_FMT_16_SSCALED",
315 "BUF_FMT_8_8_USCALED",
316 "BUF_FMT_8_8_SSCALED",
324 "BUF_FMT_16_16_UNORM",
325 "BUF_FMT_16_16_SNORM",
326 "BUF_FMT_16_16_USCALED",
327 "BUF_FMT_16_16_SSCALED",
328 "BUF_FMT_16_16_UINT",
329 "BUF_FMT_16_16_SINT",
330 "BUF_FMT_16_16_FLOAT",
332 "BUF_FMT_10_11_11_UNORM",
333 "BUF_FMT_10_11_11_SNORM",
334 "BUF_FMT_10_11_11_USCALED",
335 "BUF_FMT_10_11_11_SSCALED",
336 "BUF_FMT_10_11_11_UINT",
337 "BUF_FMT_10_11_11_SINT",
338 "BUF_FMT_10_11_11_FLOAT",
340 "BUF_FMT_11_11_10_UNORM",
341 "BUF_FMT_11_11_10_SNORM",
342 "BUF_FMT_11_11_10_USCALED",
343 "BUF_FMT_11_11_10_SSCALED",
344 "BUF_FMT_11_11_10_UINT",
345 "BUF_FMT_11_11_10_SINT",
346 "BUF_FMT_11_11_10_FLOAT",
348 "BUF_FMT_10_10_10_2_UNORM",
349 "BUF_FMT_10_10_10_2_SNORM",
350 "BUF_FMT_10_10_10_2_USCALED",
351 "BUF_FMT_10_10_10_2_SSCALED",
352 "BUF_FMT_10_10_10_2_UINT",
353 "BUF_FMT_10_10_10_2_SINT",
355 "BUF_FMT_2_10_10_10_UNORM",
356 "BUF_FMT_2_10_10_10_SNORM",
357 "BUF_FMT_2_10_10_10_USCALED",
358 "BUF_FMT_2_10_10_10_SSCALED",
359 "BUF_FMT_2_10_10_10_UINT",
360 "BUF_FMT_2_10_10_10_SINT",
362 "BUF_FMT_8_8_8_8_UNORM",
363 "BUF_FMT_8_8_8_8_SNORM",
364 "BUF_FMT_8_8_8_8_USCALED",
365 "BUF_FMT_8_8_8_8_SSCALED",
366 "BUF_FMT_8_8_8_8_UINT",
367 "BUF_FMT_8_8_8_8_SINT",
369 "BUF_FMT_32_32_UINT",
370 "BUF_FMT_32_32_SINT",
371 "BUF_FMT_32_32_FLOAT",
373 "BUF_FMT_16_16_16_16_UNORM",
374 "BUF_FMT_16_16_16_16_SNORM",
375 "BUF_FMT_16_16_16_16_USCALED",
376 "BUF_FMT_16_16_16_16_SSCALED",
377 "BUF_FMT_16_16_16_16_UINT",
378 "BUF_FMT_16_16_16_16_SINT",
379 "BUF_FMT_16_16_16_16_FLOAT",
381 "BUF_FMT_32_32_32_UINT",
382 "BUF_FMT_32_32_32_SINT",
383 "BUF_FMT_32_32_32_FLOAT",
384 "BUF_FMT_32_32_32_32_UINT",
385 "BUF_FMT_32_32_32_32_SINT",
386 "BUF_FMT_32_32_32_32_FLOAT"
495 "BUF_FMT_16_USCALED",
496 "BUF_FMT_16_SSCALED",
503 "BUF_FMT_8_8_USCALED",
504 "BUF_FMT_8_8_SSCALED",
512 "BUF_FMT_16_16_UNORM",
513 "BUF_FMT_16_16_SNORM",
514 "BUF_FMT_16_16_USCALED",
515 "BUF_FMT_16_16_SSCALED",
516 "BUF_FMT_16_16_UINT",
517 "BUF_FMT_16_16_SINT",
518 "BUF_FMT_16_16_FLOAT",
520 "BUF_FMT_10_11_11_FLOAT",
522 "BUF_FMT_11_11_10_FLOAT",
524 "BUF_FMT_10_10_10_2_UNORM",
525 "BUF_FMT_10_10_10_2_SNORM",
526 "BUF_FMT_10_10_10_2_UINT",
527 "BUF_FMT_10_10_10_2_SINT",
529 "BUF_FMT_2_10_10_10_UNORM",
530 "BUF_FMT_2_10_10_10_SNORM",
531 "BUF_FMT_2_10_10_10_USCALED",
532 "BUF_FMT_2_10_10_10_SSCALED",
533 "BUF_FMT_2_10_10_10_UINT",
534 "BUF_FMT_2_10_10_10_SINT",
536 "BUF_FMT_8_8_8_8_UNORM",
537 "BUF_FMT_8_8_8_8_SNORM",
538 "BUF_FMT_8_8_8_8_USCALED",
539 "BUF_FMT_8_8_8_8_SSCALED",
540 "BUF_FMT_8_8_8_8_UINT",
541 "BUF_FMT_8_8_8_8_SINT",
543 "BUF_FMT_32_32_UINT",
544 "BUF_FMT_32_32_SINT",
545 "BUF_FMT_32_32_FLOAT",
547 "BUF_FMT_16_16_16_16_UNORM",
548 "BUF_FMT_16_16_16_16_SNORM",
549 "BUF_FMT_16_16_16_16_USCALED",
550 "BUF_FMT_16_16_16_16_SSCALED",
551 "BUF_FMT_16_16_16_16_UINT",
552 "BUF_FMT_16_16_16_16_SINT",
553 "BUF_FMT_16_16_16_16_FLOAT",
555 "BUF_FMT_32_32_32_UINT",
556 "BUF_FMT_32_32_32_SINT",
557 "BUF_FMT_32_32_32_FLOAT",
558 "BUF_FMT_32_32_32_32_UINT",
559 "BUF_FMT_32_32_32_32_SINT",
560 "BUF_FMT_32_32_32_32_FLOAT"
662namespace VGPRIndexMode {
679 static const GFXVersion Versions[] = {{
"UC_VERSION_GFX7", 0},
680 {
"UC_VERSION_GFX10", 4},
681 {
"UC_VERSION_GFX11", 6},
682 {
"UC_VERSION_GFX12", 9}};
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static std::vector< std::pair< int, unsigned > > Swizzle(std::vector< std::pair< int, unsigned > > Src, R600InstrInfo::BankSwizzle Swz)
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_RTN_GET_CLUSTER_BARRIER_STATE
@ 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 isGFX1250(const MCSubtargetInfo &STI)
bool isNotGFX12Plus(const MCSubtargetInfo &STI)
bool isGFX9_GFX10_GFX11(const MCSubtargetInfo &STI)
bool isGFX9_GFX10(const MCSubtargetInfo &STI)
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.