Currently mentioning any symbols in immediate asm operands is not
supported, for example:
error: invalid operand for instruction lghi %r4,foo_end-foo
The immediate problem is that is*Imm() and print*Operand() functions do
not accept MCExprs, but simply relaxing these checks is not enough:
after symbol addresses are computed, range checks need to run against
resolved values.
Add a number of SystemZ::FixupKind members for each kind of immediate
value and process them in SystemZMCAsmBackend::applyFixup(). Only
perform the range checks, do not change anything.
In order to create fixups, one needs to know the operand offsets.
Unfortunately the existing LLVM infrastructure does not provide this
information. Implement generating getOperandBitOffset(), which provides
this information. It does not return useful values for multi-lit
operands, such as SystemZ vector registers, but this is not important
for its intended use case.
Finally, adjust the tests: move previously failing cases like the
one shown above out of insn-bad.s.
I don't think we should have the "imm" markup for expressions.