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

Lines Matching refs:loc

36                      const uint8_t *loc) const override;
48 void relocateOne(uint8_t *loc, RelType type, uint64_t val) const override;
51 void relaxTlsGdToLe(uint8_t *loc, RelType type, uint64_t val) const override;
52 void relaxTlsGdToIe(uint8_t *loc, RelType type, uint64_t val) const override;
53 void relaxTlsIeToLe(uint8_t *loc, RelType type, uint64_t val) const override;
80 const uint8_t *loc) const {
152 error(getErrorLocation(loc) + "unknown relocation (" + Twine(type) +
295 static void writeSMovWImm(uint8_t *loc, uint32_t imm) {
296 uint32_t inst = read32le(loc);
309 write32le(loc, inst | ((imm & 0xFFFF) << 5));
312 void AArch64::relocateOne(uint8_t *loc, RelType type, uint64_t val) const {
316 checkIntUInt(loc, val, 16, type);
317 write16le(loc, val);
321 checkIntUInt(loc, val, 32, type);
322 write32le(loc, val);
326 write64le(loc, val);
329 or32AArch64Imm(loc, val);
335 checkInt(loc, val, 33, type);
338 write32AArch64Addr(loc, val >> 12);
341 checkInt(loc, val, 21, type);
342 write32AArch64Addr(loc, val);
352 write32le(loc, 0x14000000);
355 checkInt(loc, val, 28, type);
356 or32le(loc, (val & 0x0FFFFFFC) >> 2);
360 checkAlignment(loc, val, 4, type);
361 checkInt(loc, val, 21, type);
362 or32le(loc, (val & 0x1FFFFC) << 3);
366 or32AArch64Imm(loc, getBits(val, 0, 11));
370 checkAlignment(loc, val, 2, type);
371 or32AArch64Imm(loc, getBits(val, 1, 11));
375 checkAlignment(loc, val, 4, type);
376 or32AArch64Imm(loc, getBits(val, 2, 11));
383 checkAlignment(loc, val, 8, type);
384 or32AArch64Imm(loc, getBits(val, 3, 11));
388 checkAlignment(loc, val, 16, type);
389 or32AArch64Imm(loc, getBits(val, 4, 11));
392 checkUInt(loc, val, 16, type);
395 or32le(loc, (val & 0xFFFF) << 5);
398 checkUInt(loc, val, 32, type);
401 or32le(loc, (val & 0xFFFF0000) >> 11);
404 checkUInt(loc, val, 48, type);
407 or32le(loc, (val & 0xFFFF00000000) >> 27);
410 or32le(loc, (val & 0xFFFF000000000000) >> 43);
415 checkInt(loc, val, 17, type);
419 writeSMovWImm(loc, val);
424 checkInt(loc, val, 33, type);
428 writeSMovWImm(loc, val >> 16);
433 checkInt(loc, val, 49, type);
436 writeSMovWImm(loc, val >> 32);
439 writeSMovWImm(loc, val >> 48);
442 checkInt(loc, val, 16, type);
443 or32le(loc, (val & 0xFFFC) << 3);
446 checkUInt(loc, val, 24, type);
447 or32AArch64Imm(loc, val >> 12);
451 or32AArch64Imm(loc, val);
458 void AArch64::relaxTlsGdToLe(uint8_t *loc, RelType type, uint64_t val) const {
470 checkUInt(loc, val, 32, type);
475 write32le(loc, 0xd503201f); // nop
478 write32le(loc, 0xd2a00000 | (((val >> 16) & 0xffff) << 5)); // movz
481 write32le(loc, 0xf2800000 | ((val & 0xffff) << 5)); // movk
488 void AArch64::relaxTlsGdToIe(uint8_t *loc, RelType type, uint64_t val) const {
504 write32le(loc, 0xd503201f); // nop
507 write32le(loc, 0x90000000); // adrp
508 relocateOne(loc, R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21, val);
511 write32le(loc, 0xf9400000); // ldr
512 relocateOne(loc, R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC, val);
519 void AArch64::relaxTlsIeToLe(uint8_t *loc, RelType type, uint64_t val) const {
520 checkUInt(loc, val, 32, type);
524 uint32_t regNo = read32le(loc) & 0x1f;
525 write32le(loc, (0xd2a00000 | regNo) | (((val >> 16) & 0xffff) << 5));
530 uint32_t regNo = read32le(loc) & 0x1f;
531 write32le(loc, (0xf2800000 | regNo) | ((val & 0xffff) << 5));