On 11/19/20 8:34 PM, Maciej W. Rozycki wrote:
> The `c' operand format specifier is handled directly by the middle end
> in `output_asm_insn':
>
>    %cN means require operand N to be a constant
>       and print the constant expression with no punctuation.
>
> however it resorts to the target for constants that are not valid
> addresses:
>
>           else if (letter == 'c')
>             {
>               if (CONSTANT_ADDRESS_P (operands[opnum]))
>                 output_addr_const (asm_out_file, operands[opnum]);
>               else
>                 output_operand (operands[opnum], 'c');
>             }
>
> The VAX backend expects the fallback never to happen and overloads `c'
> with the branch condition code.  This is confusing however and it is not
> like we are short of letters, so instead make the branch condition code
> use `k', and then for consistency make `K' the reverse branch condition
> code format specifier.  This is safe to do as we provide no means to use
> a computed branch condition code in user `asm'.
>
>       gcc/
>       * config/vax/vax.c (print_operand): Replace `c' and `C' with
>       `k' and `K' respectively.
>       * config/vax/vax.md (*branch, *branch_reversed): Update
>       accordingly.
OK.

I wonder if other targets have the same problem.  But that doesn't
affect this patch.

Jeff

Reply via email to