s390: Fix operand modifier c
Currently, operand modifier c truncates and extends any integer constant
to a signed 8-bit constant whereas the common code implementation just
prints the constant unmodified. The modifier was introduced in
r0-87728-g963fc8d00baeca matching the new constraint C which ensures
that a constant is an 8-bit signed integer.
In the machine description, operand modifier c is only used for operands
with constraint C. Therefore, there is no immediate need for some
special constant printing.
Since print_operand() is also used by output_asm_insn(), inline asm is
also affected by this. Note, in output_asm_insn() we cannot utilize
output_addr_const() since not every CONST_INT is a valid address, i.e.,
we have up to 32-bit immediates and at most 20-bit (long) displacements.
In fact, %cN should behave the same as %N for any CONST_INT operand N,
although, this literally means that the output modifier accepts and
prints immediates which might be larger than any instruction accepts.
Though, regarding accepting or rejecting immediates, this is what
constraints et al. are for. Therefore, align %cN and %N.
gcc/ChangeLog:
* config/s390/s390.cc (print_operand): Align %cN with %N.
* config/s390/s390.md: Remove comment.
gcc/testsuite/ChangeLog:
* gcc.target/s390/asm-constant-1.c: New test.