Lines Matching +full:25 +full:g
60 /// Encode 25-bit immediate value for branch instructions with J1J2 range
74 /// Decode 25-bit immediate value for branch instructions with J1J2 range
85 return SignExtend64<25>(S << 14 | I1 | I2 | Imm10 << 12 | Imm11 << 1);
239 Error makeUnexpectedOpcodeError(const LinkGraph &G, const ThumbRelocation &R,
244 G.getEdgeKindName(Kind)));
247 Error makeUnexpectedOpcodeError(const LinkGraph &G, const ArmRelocation &R,
251 static_cast<uint32_t>(R.Wd), G.getEdgeKindName(Kind)));
315 static Error checkOpcode(LinkGraph &G, const ArmRelocation &R,
323 return makeUnexpectedOpcodeError(G, R, Kind);
328 static Error checkOpcode(LinkGraph &G, const ThumbRelocation &R,
336 return makeUnexpectedOpcodeError(G, R, Kind);
390 Expected<int64_t> readAddendData(LinkGraph &G, Block &B, Edge::OffsetT Offset,
392 endianness Endian = G.getEndianness();
405 "In graph " + G.getName() + ", section " + B.getSection().getName() +
407 G.getEdgeKindName(Kind));
411 Expected<int64_t> readAddendArm(LinkGraph &G, Block &B, Edge::OffsetT Offset,
414 if (Error Err = checkOpcode(G, R, Kind))
428 "In graph " + G.getName() + ", section " + B.getSection().getName() +
430 G.getEdgeKindName(Kind));
434 Expected<int64_t> readAddendThumb(LinkGraph &G, Block &B, Edge::OffsetT Offset,
437 if (Error Err = checkOpcode(G, R, Kind))
459 "In graph " + G.getName() + ", section " + B.getSection().getName() +
461 G.getEdgeKindName(Kind));
465 Error applyFixupData(LinkGraph &G, Block &B, const Edge &E) {
483 return makeTargetOutOfRangeError(G, B, E);
484 if (LLVM_LIKELY(G.getEndianness() == endianness::little))
493 return makeTargetOutOfRangeError(G, B, E);
494 if (LLVM_LIKELY(G.getEndianness() == endianness::little))
503 return makeTargetOutOfRangeError(G, B, E);
504 if (LLVM_LIKELY(G.getEndianness() == endianness::little)) {
517 "In graph " + G.getName() + ", section " + B.getSection().getName() +
519 G.getEdgeKindName(E.getKind()));
523 Error applyFixupArm(LinkGraph &G, Block &B, const Edge &E) {
526 if (Error Err = checkOpcode(G, R, Kind))
539 StringRef(G.getEdgeKindName(Kind)));
544 return makeTargetOutOfRangeError(G, B, E);
554 StringRef(G.getEdgeKindName(Kind)));
574 return makeTargetOutOfRangeError(G, B, E);
591 "In graph " + G.getName() + ", section " + B.getSection().getName() +
593 G.getEdgeKindName(E.getKind()));
597 Error applyFixupThumb(LinkGraph &G, Block &B, const Edge &E,
602 if (Error Err = checkOpcode(G, R, Kind))
615 StringRef(G.getEdgeKindName(Kind)));
619 if (!isInt<25>(Value))
620 return makeTargetOutOfRangeError(G, B, E);
624 return makeTargetOutOfRangeError(G, B, E);
652 if (!isInt<25>(Value))
653 return makeTargetOutOfRangeError(G, B, E);
657 return makeTargetOutOfRangeError(G, B, E);
690 "In graph " + G.getName() + ", section " + B.getSection().getName() +
692 G.getEdgeKindName(E.getKind()));
705 static Block &allocPointer(LinkGraph &G, Section &S,
710 return G.createContentBlock(S, Init, orc::ExecutorAddr(), Alignment, 0);
713 Symbol &GOTBuilder::createEntry(LinkGraph &G, Symbol &Target) {
715 GOTSection = &G.createSection(getSectionName(), orc::MemProt::Read);
716 Block &B = allocPointer(G, *GOTSection, GOTEntryInit);
719 return G.addAnonymousSymbol(B, 0, B.getSize(), false, false);
722 bool GOTBuilder::visitEdge(LinkGraph &G, Block *B, Edge &E) {
732 LLVM_DEBUG(dbgs() << " Transforming " << G.getEdgeKindName(E.getKind())
736 << G.getEdgeKindName(KindToSet) << "\n");
738 E.setTarget(getEntryForTarget(G, E.getTarget()));
763 static Block &allocStub(LinkGraph &G, Section &S, const uint8_t (&Code)[Size]) {
766 return G.createContentBlock(S, Template, orc::ExecutorAddr(), Alignment, 0);
769 static Block &createStubPrev7(LinkGraph &G, Section &S, Symbol &Target) {
770 Block &B = allocStub(G, S, ArmThumbv5LdrPc);
775 static Block &createStubThumbv7(LinkGraph &G, Section &S, Symbol &Target) {
776 Block &B = allocStub(G, S, Thumbv7ABS);
788 static Block &createStubArmv7(LinkGraph &G, Section &S, Symbol &Target) {
789 Block &B = allocStub(G, S, Armv7ABS);
835 Symbol *StubsManager_prev7::getOrCreateSlotEntrypoint(LinkGraph &G,
842 &G.addAnonymousSymbol(*Slot.B, ThumbEntrypointOffset, 4, true, false);
847 &G.addAnonymousSymbol(*Slot.B, ArmEntrypointOffset, 8, true, false);
851 bool StubsManager_prev7::visitEdge(LinkGraph &G, Block *B, Edge &E) {
861 StubsSection = &G.createSection(getSectionName(),
867 Slot->B = &createStubPrev7(G, *StubsSection, Target);
874 Symbol *StubEntrypoint = getOrCreateSlotEntrypoint(G, *Slot, UseThumb);
886 bool StubsManager_v7::visitEdge(LinkGraph &G, Block *B, Edge &E) {
894 << " stub for " << G.getEdgeKindName(E.getKind())
905 StubsSection = &G.createSection(getSectionName(),
907 Block &B = MakeThumb ? createStubThumbv7(G, *StubsSection, Target)
908 : createStubArmv7(G, *StubsSection, Target);
909 StubSymbol = &G.addAnonymousSymbol(B, 0, B.getSize(), true, false);