PATCH: Replace TARGET_64BIT with a pointer
Paolo Bonzini
bonzini@gnu.org
Mon Jun 2 12:55:00 GMT 2008
Uros Bizjak wrote:
> On Mon, Jun 2, 2008 at 10:26 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>
>>> i386.c has many codes like
>>>
>>> if (TARGET_64BIT)
>>> output_asm_insn ("pop{q}\t%0", xops);
>>> else
>>> output_asm_insn ("pop{l}\t%0", xops);
>>>
>>> On stack branch, there are more codes like that. This patch changes
>>> it to
>>>
>>> output_asm_insn (ix86_pop1, xops);
>>>
>>> It will simplify i386.c. There are no regressions on Linux/Intel64.
>>> OK for trunk?
>> IMHO it is less nice to not see what the asm is in the insn. Can't you
>> use a new % specifier that expands to either {q} or {l} dependent on
>> TARGET_64BIT?
>
> There already is %z modifier. I guess this one should be
> fixed/enhanced to also generate "q" for 64bit integer operands in the
> same way as "l" is generated for 32bit int operands.
Doesn't it do it already?
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_INT)
{
#ifdef GAS_MNEMONICS
putc ('q', file);
#else
putc ('l', file);
putc ('l', file);
#endif
}
else
putc ('l', file);
So the above should be written as
output_asm_insn ("pop%z0\t%0", xops);
?
Paolo
More information about the Gcc-patches
mailing list