Lines Matching +full:loc +full:- +full:code
1 //===- Target.h -------------------------------------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
34 const uint8_t *loc) const = 0;
43 // If lazy binding is supported, the first entry of the PLT has code
45 // they are called. This function writes that code.
77 // The function with a prologue starting at Loc was compiled with
78 // -fsplit-stack and it calls a function compiled without. Adjust the prologue
81 // offset to the split-stack prologue.
82 virtual bool adjustPrologueForCrossSplitStack(uint8_t *loc, uint8_t *end,
89 virtual void relocate(uint8_t *loc, const Relocation &rel,
91 void relocateNoSym(uint8_t *loc, RelType type, uint64_t val) const {
92 relocate(loc, Relocation{R_NONE, type, 0, 0, nullptr}, val);
101 virtual void applyJumpInstrMod(uint8_t *loc, JumpModType type,
135 unsigned gotEntrySize = config->wordsize;
155 // A 4-byte field corresponding to one or more trap instructions, used to pad
164 // __morestack_non_split when a split-stack enabled caller calls a
165 // non-split-stack callee this will return true. Otherwise returns false.
170 const uint8_t *loc) const;
198 std::string loc;
203 ErrorPlace getErrorPlace(const uint8_t *loc);
205 static inline std::string getErrorLocation(const uint8_t *loc) {
206 return getErrorPlace(loc).loc;
219 // point (LEP) which bypasses the TOC pointer initialization code. The
221 // This function will return the offset (in bytes) from the global entry-point
222 // to the local entry-point.
225 // Write a prefixed instruction, which is a 4-byte prefix followed by a 4-byte
228 void writePrefixedInstruction(uint8_t *loc, uint64_t insn);
249 void reportRangeError(uint8_t *loc, const Relocation &rel, const Twine &v,
251 void reportRangeError(uint8_t *loc, int64_t v, int n, const Symbol &sym,
255 inline void checkInt(uint8_t *loc, int64_t v, int n, const Relocation &rel) {
257 reportRangeError(loc, rel, Twine(v), llvm::minIntN(n), llvm::maxIntN(n));
261 inline void checkUInt(uint8_t *loc, uint64_t v, int n, const Relocation &rel) {
263 reportRangeError(loc, rel, Twine(v), 0, llvm::maxUIntN(n));
267 inline void checkIntUInt(uint8_t *loc, uint64_t v, int n,
272 reportRangeError(loc, rel, Twine((int64_t)v), llvm::minIntN(n),
276 inline void checkAlignment(uint8_t *loc, uint64_t v, int n,
278 if ((v & (n - 1)) != 0)
279 error(getErrorLocation(loc) + "improper alignment for relocation " +
284 // Endianness-aware read/write.
286 return llvm::support::endian::read16(p, config->endianness);
290 return llvm::support::endian::read32(p, config->endianness);
294 return llvm::support::endian::read64(p, config->endianness);
298 llvm::support::endian::write16(p, v, config->endianness);
302 llvm::support::endian::write32(p, v, config->endianness);
306 llvm::support::endian::write64(p, v, config->endianness);
322 #pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
325 switch (config->ekind) { \
339 llvm_unreachable("unknown config->ekind"); \