• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/lld/ELF/Arch/

Lines Matching refs:loc

29                      const uint8_t *loc) const override;
47 void relocateOne(uint8_t *loc, RelType type, uint64_t val) const override;
51 void relaxTlsGdToIe(uint8_t *loc, RelType type, uint64_t val) const override;
52 void relaxTlsGdToLe(uint8_t *loc, RelType type, uint64_t val) const override;
53 void relaxTlsLdToLe(uint8_t *loc, RelType type, uint64_t val) const override;
54 void relaxTlsIeToLe(uint8_t *loc, RelType type, uint64_t val) const override;
61 static uint32_t readFromHalf16(const uint8_t *loc) {
62 return read32(config->isLE ? loc : loc - 2);
65 static void writeFromHalf16(uint8_t *loc, uint32_t insn) {
66 write32(config->isLE ? loc : loc - 2, insn);
215 const uint8_t *loc) const {
261 error(getErrorLocation(loc) + "unknown relocation (" + Twine(type) +
291 void PPC::relocateOne(uint8_t *loc, RelType type, uint64_t val) const {
296 checkIntUInt(loc, val, 16, type);
297 write16(loc, val);
304 checkInt(loc, val, 16, type);
305 write16(loc, val);
314 write16(loc, ha(val));
323 write16(loc, val >> 16);
332 write16(loc, val);
336 write32(loc, val);
340 checkInt(loc, val, 16, type);
341 checkAlignment(loc, val, 4, type);
342 write32(loc, (read32(loc) & ~mask) | (val & mask));
349 checkInt(loc, val, 26, type);
350 checkAlignment(loc, val, 4, type);
351 write32(loc, (read32(loc) & ~mask) | (val & mask));
382 void PPC::relaxTlsGdToIe(uint8_t *loc, RelType type, uint64_t val) const {
386 uint32_t insn = readFromHalf16(loc);
387 writeFromHalf16(loc, 0x80000000 | (insn & 0x03ff0000));
388 relocateOne(loc, R_PPC_GOT_TPREL16, val);
393 write32(loc, 0x7c631214);
400 void PPC::relaxTlsGdToLe(uint8_t *loc, RelType type, uint64_t val) const {
404 writeFromHalf16(loc, 0x3c620000 | ha(val));
408 write32(loc, 0x38630000 | lo(val));
415 void PPC::relaxTlsLdToLe(uint8_t *loc, RelType type, uint64_t val) const {
419 writeFromHalf16(loc, 0x3c620000);
425 write32(loc, 0x38631000);
431 relocateOne(loc, type, val);
438 void PPC::relaxTlsIeToLe(uint8_t *loc, RelType type, uint64_t val) const {
442 uint32_t rt = readFromHalf16(loc) & 0x03e00000;
443 writeFromHalf16(loc, 0x3c020000 | rt | ha(val));
447 uint32_t insn = read32(loc);
451 uint32_t dFormOp = getPPCDFormOp((read32(loc) & 0x000007fe) >> 1);
454 write32(loc, (dFormOp << 26) | (insn & 0x03ff0000) | lo(val));