Mail Archives: djgpp/2000/04/09/16:39:24
buers AT gmx DOT de (Dieter Buerssner) writes:
> Alexei A. Frounze wrote:
> >might even optimize it!). Other commonly used constraints are "r" (load
> >into any available register), "a" (ax/eax), "b" (bx/ebx), "c" (cx/ecx),
> >"d" (dx/edx), "D" (di/edi), "S" (si/esi), etc.
>
> You might want to mention "q" for one of eax/ebx/ecx/edx as well.
Actually, "q" means one of al/ah/bl/bh/cl/ch/dl/dh, though this is not
explained well in the docs. The "q" stands for "quarter-word", i.e. 8
bits.
And AFAIK the register constraints you list always use the 32 bit
form, ie "a" is always %eax and never %ax. If you want %ax you have
to use an (AFAICT) undocumented feature that changes the "mode" of the
operand. So if you have an operand 1 with the "a" constraint:
"%w0" is %ax
"%b0" is %al
"%k0" is %eax
"%h0" is %ah
See line 2400 of config/i386.h in the gcc source.
Yes, I agree this should be in the manual. Feel like sending a patch?
--
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -