This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Can't use SImode as Pmode for x32
On Fri, Mar 18, 2011 at 3:18 PM, Richard Henderson <rth@redhat.com> wrote:
> On 03/18/2011 02:56 PM, H.J. Lu wrote:
>> X86 backend uses Pmode for hardware pointer size. Changes
>> it to 32bit for x32, which is really 64bit process, breaks many
>> assumptions of x86 backend. push/pop/call is just the tip of
>> the iceberg.
>
> Please enumerate "many assumptions". ?I can't think of any off
> the top of my head.
>
I don't have a complete list. gen_push is one of them:
static rtx
gen_push (rtx arg)
{
struct machine_function *m = cfun->machine;
if (m->fs.cfa_reg == stack_pointer_rtx)
m->fs.cfa_offset += UNITS_PER_WORD;
m->fs.sp_offset += UNITS_PER_WORD;
return gen_rtx_SET (VOIDmode,
gen_rtx_MEM (Pmode,
gen_rtx_PRE_DEC (Pmode,
stack_pointer_rtx)),
arg);
}
You can only push/pup 64bit in hardware 64bit mode.
--
H.J.