[RFA PATCH, i386]: Warn for 64-bit values in general-reg asm operands and error out for 8-bit values in invalid GR asm operand
Wed Mar 1 08:48:00 GMT 2017
On Wed, Mar 01, 2017 at 09:34:53AM +0100, Uros Bizjak wrote:
> Some more thoughts on 64-bit reg on 32-bit targets warning.
> Actually, we never *print* register name for instruction that use "A"
> constraint, since %eax/%edx is always implicit The warning does not
> deal with constraints, so unless we want to output DImode register
> name, there is no warning.
Ah, indeed, we don't have a modifier that would print the high register
of a register pair (i.e. essentially print REGNO (x) + 1 instead of REGNO
(x)), guess that might be useful not just for 64-bit GPR operands in 32-bit
code, but also 128-bit GPR operands in 64-bit code.
While looking at ix86_print_operand, I've noticed duplication in the
w -- print the operand as if it's a "word" (HImode) even if it isn't.
s -- print a shift double count, followed by the assemblers argument
b -- print the QImode name of the register for the indicated operand.
%b0 would print %al if operands is reg 0.
w -- likewise, print the HImode name of the register.
k -- likewise, print the SImode name of the register.
q -- likewise, print the DImode name of the register.
x -- likewise, print the V4SFmode name of the register.
t -- likewise, print the V8SFmode name of the register.
g -- likewise, print the V16SFmode name of the register.
w is documented twice, guess the first line should be removed.
More information about the Gcc-patches