22 OS <<
format(
"[0x%*.*" PRIx64
", ", AddressSize * 2, AddressSize * 2,
Address)
23 <<
format(
" 0x%*.*" PRIx64
")", AddressSize * 2, AddressSize * 2,
30 ArangeDescriptors.clear();
36 ArangeDescriptors.clear();
53 HeaderData.Length = data.
getU32(offset_ptr);
54 HeaderData.Version = data.
getU16(offset_ptr);
55 HeaderData.CuOffset = data.
getU32(offset_ptr);
56 HeaderData.AddrSize = data.
getU8(offset_ptr);
57 HeaderData.SegSize = data.
getU8(offset_ptr);
61 (HeaderData.AddrSize != 4 && HeaderData.AddrSize != 8)) {
70 const uint32_t header_size = *offset_ptr - Offset;
71 const uint32_t tuple_size = HeaderData.AddrSize * 2;
73 while (first_tuple_offset < header_size)
74 first_tuple_offset += tuple_size;
76 *offset_ptr = Offset + first_tuple_offset;
80 static_assert(
sizeof(arangeDescriptor.
Address) ==
81 sizeof(arangeDescriptor.
Length),
82 "Different datatypes for addresses and sizes!");
83 assert(
sizeof(arangeDescriptor.
Address) >= HeaderData.AddrSize);
92 ArangeDescriptors.push_back(arangeDescriptor);
97 return !ArangeDescriptors.empty();
103 OS <<
format(
"Address Range Header: length = 0x%8.8x, version = 0x%4.4x, ",
104 HeaderData.Length, HeaderData.Version)
105 <<
format(
"cu_offset = 0x%8.8x, addr_size = 0x%2.2x, seg_size = 0x%2.2x\n",
106 HeaderData.CuOffset, HeaderData.AddrSize, HeaderData.SegSize);
108 for (
const auto &Desc : ArangeDescriptors) {
109 Desc.dump(OS, HeaderData.AddrSize);
This class represents lattice values for constants.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
void dump(raw_ostream &OS) const
void dump(raw_ostream &OS, uint32_t AddressSize) const
bool extract(DataExtractor data, uint32_t *offset_ptr)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
uint64_t getEndAddress() const