Go to the documentation of this file.
22 if (Offset <= Data.
size())
25 "unexpected end of data at offset 0x%zx while reading [0x%" PRIx64
27 Data.
size(), Offset, Offset + Size);
31 " is beyond the end of data at 0x%zx",
47 if (!prepareRead(offset,
sizeof(T), Err))
54 *offset_ptr +=
sizeof(
val);
67 if (!prepareRead(offset,
sizeof(*dst) *
count, Err))
69 for (T *value_ptr = dst, *
end = dst +
count; value_ptr !=
end;
70 ++value_ptr, offset +=
sizeof(*dst))
71 *value_ptr = getU<T>(offset_ptr, Err);
80 return getU<uint8_t>(offset_ptr, Err);
85 return getUs<uint8_t>(offset_ptr, dst,
count,
nullptr);
89 return getUs<uint8_t>(&
C.Offset, Dst, Count, &
C.Err);
93 return getU<uint16_t>(offset_ptr, Err);
98 return getUs<uint16_t>(offset_ptr, dst,
count,
nullptr);
102 uint24_t ExtractedVal = getU<uint24_t>(OffsetPtr, Err);
108 return getU<uint32_t>(offset_ptr, Err);
113 return getUs<uint32_t>(offset_ptr, dst,
count,
nullptr);
117 return getU<uint64_t>(offset_ptr, Err);
122 return getUs<uint64_t>(offset_ptr, dst,
count,
nullptr);
129 return getU8(offset_ptr, Err);
131 return getU16(offset_ptr, Err);
133 return getU32(offset_ptr, Err);
135 return getU64(offset_ptr, Err);
144 return (int8_t)
getU8(offset_ptr);
146 return (int16_t)
getU16(offset_ptr);
148 return (int32_t)
getU32(offset_ptr);
150 return (int64_t)
getU64(offset_ptr);
163 *OffsetPtr = Pos + 1;
168 "no null terminated string at offset 0x%" PRIx64,
177 return Bytes.
trim(TrimChars);
186 if (!prepareRead(*OffsetPtr, Length, Err))
190 *OffsetPtr += Length;
194 template <
typename T>
196 T (&Decoder)(
const uint8_t *
p,
unsigned *
n,
197 const uint8_t *
end,
const char **
error)) {
207 Decoder(Bytes.
data() + *OffsetPtr, &bytes_read, Bytes.
end(), &
error);
211 "unable to decode LEB128 at offset 0x%8.8" PRIx64
216 *OffsetPtr += bytes_read;
233 if (prepareRead(
C.Offset, Length, &
C.Err))
This is an optimization pass for GlobalISel generic memory operations.
void swapByteOrder(T &Value)
An auxiliary type to facilitate extraction of 3-byte entities.
static constexpr size_t npos
LLVM_NODISCARD size_t find(char C, size_t From=0) const
Search for the first character C in the string.
const_iterator end(StringRef path)
Get end iterator over path.
the resulting code requires compare and branches when and if * p
It looks like we only need to define PPCfmarto for these because according to these instructions perform RTO on fma s result
LLVM_NODISCARD StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
uint64_t decodeULEB128(const uint8_t *p, unsigned *n=nullptr, const uint8_t *end=nullptr, const char **error=nullptr)
Utility function to decode a ULEB128 value.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
(vector float) vec_cmpeq(*A, *B) C
Helper for Errors used as out-parameters.
LLVM_NODISCARD StringRef trim(char Char) const
Return string with consecutive Char characters starting from the left and right removed.
The initial backend is deliberately restricted to z10 We should add support for later architectures at some point If an asm ties an i32 r result to an i64 the input will be treated as an leaving the upper bits uninitialised For i64 store i32 val
auto count(R &&Range, const E &Element)
Wrapper function around std::count to count the number of times an element Element occurs in the give...
uint32_t getAsUint32(bool IsLittleEndian) const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
<%struct.s * > cast struct s *S to sbyte *< sbyte * > sbyte uint cast struct s *agg result to sbyte *< sbyte * > sbyte uint cast struct s *memtmp to sbyte *< sbyte * > sbyte uint ret void llc ends up issuing two memcpy or custom lower memcpy(of small size) to be ldmia/stmia. I think option 2 is better but the current register allocator cannot allocate a chunk of registers at a time. A feasible temporary solution is to use specific physical registers at the lowering time for small(<
StringRef - Represent a constant reference to a string, i.e.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr LLVM_NODISCARD size_t size() const
size - Get the string size.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
Lightweight error class with error context and mandatory checking.
int64_t decodeSLEB128(const uint8_t *p, unsigned *n=nullptr, const uint8_t *end=nullptr, const char **error=nullptr)
Utility function to decode a SLEB128 value.
static const bool IsLittleEndianHost
size_t size() const
size - Get the array size.
const LLVM_NODISCARD char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
The same transformation can work with an even modulo with the addition of a and shrink the compare RHS by the same amount Unless the target supports that transformation probably isn t worthwhile The transformation can also easily be made to work with non zero equality for n