public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Synthetic register related: consequences of changing Frame layout.
@ 2003-01-04  7:04 Andy Walker
  2003-01-04 17:55 ` Denis Chertykov
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Walker @ 2003-01-04  7:04 UTC (permalink / raw)
  To: gcc

I am thinking about changing the frame layout for i386, but only when 
Synthetic registers are used.  

In particular, I want to align the hard-frame-pointer on a 32 byte boundary.

My instinct is that I will have to copy the old pc and old frame pointer to 
new locations to correspond to the modified hard-frame-pointer.   I will have 
to hunt down the place that points to the arguments above the 
hard-frame-pointer and adjust them so that the arguments are correctly found.

The saved registers will go below the hard-frame-pointer and the Synthetic 
registers, and I will have to modify the register save/restore processes to 
match the new layout.

What else am I likely to break in the process?

Andy

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Synthetic register related: consequences of changing Frame layout.
@ 2003-01-05 11:42 Robert Dewar
  2003-01-06  5:01 ` Andy Walker
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Dewar @ 2003-01-05 11:42 UTC (permalink / raw)
  To: denisc, ja_walker; +Cc: gcc

> In principle, you are correct.  The differences are small.  I believe that in 
> many instances, instructions accessing stack slots as spilled registers are 
> six bytes long, not three bytes long as for Synthetic registers.  I believe 
> that the compiler does not differentiate between spilled register stack slot 
> memory and any other kind of memory, and so generates unnecessary register 
> content motion between registers and stack slots, under the mistaken idea 
> that this is more efficient.  

This is completely wrong. Have you even looked at how code is currently
generated. Registers are spilled to the local stack frame, and of course
you get the normal 3-byte instructions to transfer to and from the spill
locations. There is too much general "I believe" guesswork in your approach
and not enough hard knowledge. I suggest that before you start hacking away
at the configuration file, you carefully examine actual generated code at
the machine level (gdb is quite nice for this).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-06  4:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-04  7:04 Synthetic register related: consequences of changing Frame layout Andy Walker
2003-01-04 17:55 ` Denis Chertykov
2003-01-05  5:44   ` Andy Walker
2003-01-05 11:42 Robert Dewar
2003-01-06  5:01 ` Andy Walker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).