[PATCH] D75300: Support prefix padding for alignment purposes (Relaxable instructions only)
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 19:42:08 PDT 2020
skan added a comment.
Encountered a compile error when building SPEC with option `-fno-lto -mllvm --x86-align-branch-boundary=32 -mllvm -x86-align-branch=fused+jcc+jmp -mllvm -x86-pad-max-prefix-size=5`.
fatal error: error in backend: value of -130 is too large for field of 1 byte.
This error is reported when applying fixups
void X86AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
const MCValue &Target,
MutableArrayRef<char> Data,
uint64_t Value, bool IsResolved,
const MCSubtargetInfo *STI) const {
unsigned Size = getFixupKindSize(Fixup.getKind());
assert(Fixup.getOffset() + Size <= Data.size() && "Invalid fixup offset!");
int64_t SignedValue = static_cast<int64_t>(Value);
if ((Target.isAbsolute() || IsResolved) &&
getFixupKindInfo(Fixup.getKind()).Flags &
MCFixupKindInfo::FKF_IsPCRel) {
// check that PC relative fixup fits into the fixup size.
if (Size > 0 && !isIntN(Size * 8, SignedValue))
Asm.getContext().reportError(
Fixup.getLoc(), "value of " + Twine(SignedValue) +
" is too large for field of " + Twine(Size) +
((Size == 1) ? " byte." : " bytes."));
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75300/new/
https://reviews.llvm.org/D75300
More information about the llvm-commits
mailing list