Re: Can't use SImode as Pmode for x32

2011-03-24 Thread Richard Henderson
On 03/23/2011 08:40 PM, H.J. Lu wrote: > Are you suggesting that we should say that SP and BP are 32bits so > that x32 has 16 integer registers, 14 are 64 bites and 2 are 32 bits? No, merely that push/pop are valid with (reg:SI 7 sp). r~

Re: Can't use SImode as Pmode for x32

2011-03-23 Thread H.J. Lu
On Wed, Mar 23, 2011 at 12:06 PM, Richard Henderson wrote: > On 03/19/2011 08:46 AM, H.J. Lu wrote: >> Operations on stack and frame pointers, like push/pop, require stack >> and frame pointers in DImode.  Even if I use word_mode in gen_push >> and gen_pop, I got > > No they don't.  Not really.  A

Re: Can't use SImode as Pmode for x32

2011-03-23 Thread Richard Henderson
On 03/19/2011 08:46 AM, H.J. Lu wrote: > Operations on stack and frame pointers, like push/pop, require stack > and frame pointers in DImode. Even if I use word_mode in gen_push > and gen_pop, I got No they don't. Not really. Assuming the stack and frame pointer are properly zero extended, and

Re: Can't use SImode as Pmode for x32

2011-03-19 Thread H.J. Lu
On Fri, Mar 18, 2011 at 3:42 PM, Jakub Jelinek wrote: > On Fri, Mar 18, 2011 at 03:32:45PM -0700, H.J. Lu wrote: >> On Fri, Mar 18, 2011 at 3:18 PM, Richard Henderson wrote: >> > On 03/18/2011 02:56 PM, H.J. Lu wrote: >> >> X86 backend uses Pmode for hardware pointer size. Changes >> >> it to 32b

Re: Can't use SImode as Pmode for x32

2011-03-19 Thread H.J. Lu
On Fri, Mar 18, 2011 at 3:42 PM, Jakub Jelinek wrote: > On Fri, Mar 18, 2011 at 03:32:45PM -0700, H.J. Lu wrote: >> On Fri, Mar 18, 2011 at 3:18 PM, Richard Henderson wrote: >> > On 03/18/2011 02:56 PM, H.J. Lu wrote: >> >> X86 backend uses Pmode for hardware pointer size. Changes >> >> it to 32b

Re: Can't use SImode as Pmode for x32

2011-03-18 Thread Jakub Jelinek
On Fri, Mar 18, 2011 at 03:32:45PM -0700, H.J. Lu wrote: > On Fri, Mar 18, 2011 at 3:18 PM, Richard Henderson 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 > >> a

Re: Can't use SImode as Pmode for x32

2011-03-18 Thread Richard Henderson
On 03/18/2011 03:32 PM, H.J. Lu wrote: > I don't have a complete list. gen_push is one of them: ... > You can only push/pup 64bit in hardware 64bit mode. Ok, seems an easy enough place to use word_mode instead. r~

Re: Can't use SImode as Pmode for x32

2011-03-18 Thread H.J. Lu
On Fri, Mar 18, 2011 at 3:18 PM, Richard Henderson 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

Re: Can't use SImode as Pmode for x32

2011-03-18 Thread Richard Henderson
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

Re: Can't use SImode as Pmode for x32

2011-03-18 Thread H.J. Lu
On Fri, Mar 18, 2011 at 2:03 PM, Richard Henderson wrote: > On 03/17/2011 03:28 PM, H.J. Lu wrote: >> It will require very extensive changes to x86 backend since stack pointer >> and frame pointer are really in DImode for x32 as x32 process runs in >> 64bit mode. If you can make it to work, please

Re: Can't use SImode as Pmode for x32

2011-03-18 Thread Richard Henderson
On 03/17/2011 03:28 PM, H.J. Lu wrote: > It will require very extensive changes to x86 backend since stack pointer > and frame pointer are really in DImode for x32 as x32 process runs in > 64bit mode. If you can make it to work, please let me know. Yes, the stack pointer uses all 64 bits for e.g.