Lines Matching refs:loc
31 const uint8_t *loc) const override;
50 void relocate(uint8_t *loc, const Relocation &rel,
57 void relaxTlsGdToIe(uint8_t *loc, const Relocation &rel, uint64_t val) const;
58 void relaxTlsGdToLe(uint8_t *loc, const Relocation &rel, uint64_t val) const;
59 void relaxTlsLdToLe(uint8_t *loc, const Relocation &rel, uint64_t val) const;
60 void relaxTlsIeToLe(uint8_t *loc, const Relocation &rel, uint64_t val) const;
67 static uint32_t readFromHalf16(const uint8_t *loc) { in readFromHalf16() argument
68 return read32(config->isLE ? loc : loc - 2); in readFromHalf16()
71 static void writeFromHalf16(uint8_t *loc, uint32_t insn) { in writeFromHalf16() argument
72 write32(config->isLE ? loc : loc - 2, insn); in writeFromHalf16()
219 const uint8_t *loc) const { in getRelExpr()
266 error(getErrorLocation(loc) + "unknown relocation (" + Twine(type) + in getRelExpr()
310 void PPC::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const { in relocate() argument
315 checkIntUInt(loc, val, 16, rel); in relocate()
316 write16(loc, val); in relocate()
323 checkInt(loc, val, 16, rel); in relocate()
324 write16(loc, val); in relocate()
333 write16(loc, ha(val)); in relocate()
342 write16(loc, val >> 16); in relocate()
351 write16(loc, val); in relocate()
355 write32(loc, val); in relocate()
359 checkInt(loc, val, 16, rel); in relocate()
360 checkAlignment(loc, val, 4, rel); in relocate()
361 write32(loc, (read32(loc) & ~mask) | (val & mask)); in relocate()
369 checkInt(loc, val, 26, rel); in relocate()
370 checkAlignment(loc, val, 4, rel); in relocate()
371 write32(loc, (read32(loc) & ~mask) | (val & mask)); in relocate()
401 void PPC::relaxTlsGdToIe(uint8_t *loc, const Relocation &rel, in relaxTlsGdToIe() argument
406 uint32_t insn = readFromHalf16(loc); in relaxTlsGdToIe()
407 writeFromHalf16(loc, 0x80000000 | (insn & 0x03ff0000)); in relaxTlsGdToIe()
408 relocateNoSym(loc, R_PPC_GOT_TPREL16, val); in relaxTlsGdToIe()
413 write32(loc, 0x7c631214); in relaxTlsGdToIe()
420 void PPC::relaxTlsGdToLe(uint8_t *loc, const Relocation &rel, in relaxTlsGdToLe() argument
425 writeFromHalf16(loc, 0x3c620000 | ha(val)); in relaxTlsGdToLe()
429 write32(loc, 0x38630000 | lo(val)); in relaxTlsGdToLe()
436 void PPC::relaxTlsLdToLe(uint8_t *loc, const Relocation &rel, in relaxTlsLdToLe() argument
441 writeFromHalf16(loc, 0x3c620000); in relaxTlsLdToLe()
447 write32(loc, 0x38631000); in relaxTlsLdToLe()
453 relocate(loc, rel, val); in relaxTlsLdToLe()
460 void PPC::relaxTlsIeToLe(uint8_t *loc, const Relocation &rel, in relaxTlsIeToLe() argument
465 uint32_t rt = readFromHalf16(loc) & 0x03e00000; in relaxTlsIeToLe()
466 writeFromHalf16(loc, 0x3c020000 | rt | ha(val)); in relaxTlsIeToLe()
470 uint32_t insn = read32(loc); in relaxTlsIeToLe()
474 uint32_t dFormOp = getPPCDFormOp((read32(loc) & 0x000007fe) >> 1); in relaxTlsIeToLe()
477 write32(loc, (dFormOp << 26) | (insn & 0x03ff0000) | lo(val)); in relaxTlsIeToLe()
490 uint8_t *loc = buf + rel.offset; in relocateAlloc() local
497 relaxTlsGdToIe(loc, rel, val); in relocateAlloc()
500 relaxTlsGdToLe(loc, rel, val); in relocateAlloc()
503 relaxTlsLdToLe(loc, rel, val); in relocateAlloc()
506 relaxTlsIeToLe(loc, rel, val); in relocateAlloc()
509 relocate(loc, rel, val); in relocateAlloc()