9#ifndef LLVM_DEBUGINFO_MSF_MSFCOMMON_H
10#define LLVM_DEBUGINFO_MSF_MSFCOMMON_H
23static const char Magic[] = {
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
24 't',
' ',
'C',
'/',
'C',
'+',
'+',
' ',
25 'M',
'S',
'F',
' ',
'7',
'.',
'0',
'0',
26 '\r',
'\n',
'\x1a',
'D',
'S',
'\0',
'\0',
'\0'};
68 std::vector<ArrayRef<support::ulittle32_t>>
StreamMap;
80 std::vector<support::ulittle32_t>
Blocks;
87 bool IncludeUnusedFpmData =
false,
140 return L.SB->BlockSize;
156 bool IncludeUnusedFpmData,
int FpmNumber) {
157 assert(FpmNumber == 1 || FpmNumber == 2);
158 if (IncludeUnusedFpmData) {
172 bool IncludeUnusedFpmData =
false,
173 bool AltFpm =
false) {
175 IncludeUnusedFpmData,
176 AltFpm ? L.alternateFpmBlock() : L.mainFpmBlock());
This file implements the BitVector class.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static const int BlockSize
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Describes the layout of a stream in an MSF layout.
std::vector< support::ulittle32_t > Blocks
uint32_t getMinimumBlockCount()
Error validateSuperBlock(const SuperBlock &SB)
uint32_t getFpmIntervalLength(const MSFLayout &L)
uint64_t blockToOffset(uint64_t BlockNumber, uint64_t BlockSize)
uint64_t getMaxFileSizeFromBlockSize(uint32_t Size)
Given the specified block size, returns the maximum possible file size.
bool isValidBlockSize(uint32_t Size)
MSFStreamLayout getFpmStreamLayout(const MSFLayout &Msf, bool IncludeUnusedFpmData=false, bool AltFpm=false)
Determine the layout of the FPM stream, given the MSF layout.
uint64_t bytesToBlocks(uint64_t NumBytes, uint64_t BlockSize)
uint32_t getFirstUnreservedBlock()
uint32_t getNumFpmIntervals(uint32_t BlockSize, uint32_t NumBlocks, bool IncludeUnusedFpmData, int FpmNumber)
Given an MSF with the specified block size and number of blocks, determine how many pieces the specif...
static const char Magic[]
This is an optimization pass for GlobalISel generic memory operations.
constexpr T divideCeil(U Numerator, V Denominator)
Returns the integer ceil(Numerator / Denominator).
uint32_t alternateFpmBlock() const
ArrayRef< support::ulittle32_t > StreamSizes
uint32_t mainFpmBlock() const
ArrayRef< support::ulittle32_t > DirectoryBlocks
std::vector< ArrayRef< support::ulittle32_t > > StreamMap
support::ulittle32_t NumBlocks
support::ulittle32_t BlockSize
support::ulittle32_t Unknown1
char MagicBytes[sizeof(Magic)]
support::ulittle32_t NumDirectoryBytes
support::ulittle32_t BlockMapAddr
support::ulittle32_t FreeBlockMapBlock