Index: lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp =================================================================== --- lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp +++ lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp @@ -119,7 +119,7 @@ // Specifically ignore overflow/underflow as long as the leakage is // limited to the lower bits. This is to remain compatible with // other assemblers. - assert(isIntN(Size * 8 + 1, Value) && + assert(isIntN(Size * 8, Value) && "Value does not fit in the Fixup field"); for (unsigned i = 0; i != Size; ++i) Index: test/MC/X86/reloc-1-byte.s =================================================================== --- /dev/null +++ test/MC/X86/reloc-1-byte.s @@ -0,0 +1,11 @@ +// RUN: not --crash llvm-mc -triple x86_64-linux-gnu -filetype=obj %s 2>%t.err +// RUN: FileCheck < %t.err %s + + .code64 + .text + jrcxz 1f + .fill 128 +1: + ret + +// CHECK: "Value does not fit in the Fixup field"