On Fri, Nov 20, 2020 at 03:34:16AM +0000, 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

There are 16 targets in trunk that overload the 'c' output modifier.
Most do it for something with condition codes (or comparisons).  This is
a well-established convention, confusing or not :-)

(I have nothing against the patch of course.)


Segher

Reply via email to