Nikita Popov 4522448cd1
[PowerPC][MC] Diagnose out of range branch fixups (#165859)
Currently, out-of-range branch fixups will be silently miscompiled. GNU
as will instead print an "operand out of range" error instead.

Check that the branch target fixups fit into the proper range and have
low zero bits. The implementation is inspired by SystemZ:
0ed8e66f88/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp (L31)

(My actual interest here is not actually assembly usage, but LLVM
failing to use the correct branch kind for reasons I've not tracked down
yet. Currently this just silently truncates the branch target instead of
producing an error.)
2025-12-02 07:04:03 +01:00
..