Home | History | Annotate | Download | only in MCTargetDesc

Lines Matching refs:Fixup

202 const char *ARMAsmBackend::reasonForFixupRelaxation(const MCFixup &Fixup,
204 switch ((unsigned)Fixup.getKind()) {
214 return "out of range pc-relative fixup value";
226 return "out of range pc-relative fixup value";
235 return "misaligned pc-relative fixup value";
237 return "out of range pc-relative fixup value";
250 llvm_unreachable("Unexpected fixup kind in reasonForFixupRelaxation()!");
255 bool ARMAsmBackend::fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
258 return reasonForFixupRelaxation(Fixup, Value);
336 // so we need to swap the fixup value here to map properly.
359 unsigned ARMAsmBackend::adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
363 unsigned Kind = Fixup.getKind();
366 llvm_unreachable("Unknown fixup kind!");
416 Ctx->reportError(Fixup.getLoc(), "out of range pc-relative fixup value");
437 Ctx->reportError(Fixup.getLoc(), "out of range pc-relative fixup value");
468 dyn_cast<MCSymbolRefExpr>(Fixup.getValue()))
516 // to transpose the fixup value here to map properly.
543 // to transpose the fixup value here to map properly.
545 Ctx->reportError(Fixup.getLoc(), "misaligned ARM call destination");
551 dyn_cast<MCSymbolRefExpr>(Fixup.getValue()))
572 const char *FixupDiagnostic = reasonForFixupRelaxation(Fixup, Value);
574 Ctx->reportError(Fixup.getLoc(), FixupDiagnostic);
590 const char *FixupDiagnostic = reasonForFixupRelaxation(Fixup, Value);
592 Ctx->reportError(Fixup.getLoc(), FixupDiagnostic);
600 const char *FixupDiagnostic = reasonForFixupRelaxation(Fixup, Value);
602 Ctx->reportError(Fixup.getLoc(), FixupDiagnostic);
617 Ctx->reportError(Fixup.getLoc(), "out of range pc-relative fixup value");
638 Ctx->reportError(Fixup.getLoc(), "out of range pc-relative fixup value");
664 Ctx->reportError(Fixup.getLoc(), "invalid value for this fixup");
669 Ctx->reportError(Fixup.getLoc(), "out of range pc-relative fixup value");
684 Ctx->reportError(Fixup.getLoc(), "out of range immediate fixup value");
693 const MCFixup &Fixup,
701 if ((unsigned)Fixup.getKind() != ARM::fixup_arm_ldst_pcrel_12 &&
702 (unsigned)Fixup.getKind() != ARM::fixup_t2_ldst_pcrel_12 &&
703 (unsigned)Fixup.getKind() != ARM::fixup_arm_adr_pcrel_12 &&
704 (unsigned)Fixup.getKind() != ARM::fixup_thumb_adr_pcrel_10 &&
705 (unsigned)Fixup.getKind() != ARM::fixup_t2_adr_pcrel_12 &&
706 (unsigned)Fixup.getKind() != ARM::fixup_arm_thumb_cp) {
712 if (IsResolved && (unsigned)Fixup.getKind() == ARM::fixup_arm_thumb_bl) {
726 if (A && ((unsigned)Fixup.getKind() == ARM::fixup_arm_thumb_blx ||
727 (unsigned)Fixup.getKind() == ARM::fixup_arm_blx ||
728 (unsigned)Fixup.getKind() == ARM::fixup_arm_uncondbl ||
729 (unsigned)Fixup.getKind() == ARM::fixup_arm_condbl))
732 // Try to get the encoded value for the fixup as-if we're mapping it into
735 (void)adjustFixupValue(Fixup, Value, false, &Asm.getContext(),
739 /// getFixupKindNumBytes - The number of bytes the fixup may change.
743 llvm_unreachable("Unknown fixup kind!");
796 llvm_unreachable("Unknown fixup kind!");
839 void ARMAsmBackend::applyFixup(const MCFixup &Fixup, char *Data,
842 unsigned NumBytes = getFixupKindNumBytes(Fixup.getKind());
844 adjustFixupValue(Fixup, Value, IsPCRel, nullptr, IsLittleEndian, true);
848 unsigned Offset = Fixup.getOffset();
849 assert(Offset + NumBytes <= DataSize && "Invalid fixup offset!");
854 FullSizeBytes = getFixupKindContainerSizeBytes(Fixup.getKind());
855 assert((Offset + FullSizeBytes) <= DataSize && "Invalid fixup size!");
856 assert(NumBytes <= FullSizeBytes && "Invalid fixup size!");
859 // For each byte of the fragment that the fixup touches, mask in the bits from
860 // the fixup value. The Value has been "split up" into the appropriate