This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dangerous cleverness? ppc int<->float conversions, subreg


Zack Weinberg wrote:
> On Thu, Oct 25, 2001 at 04:29:45PM +0100, Joern Rennecke wrote:
> > in elf flags or similar?  FWIW the SH gas alrweady has to do this, to keep
> 
> ... keep what?

keep sh3e and sh-dsp opcodes apart.

> In addition to the block move issue, I need to figure out how to fix
> the old varargs implementation and sjlj eh so they don't touch
> floating point registers unless absolutely necessary.  Clues in that
> direction would be appreciated too.

For the old varargs implementation, you could always use statement
expressions in the macor definitions, and call magic builtin functions
when a floating point argument is used; you can then have the compiler
set a flag when the magic builtin is seen.  And then you'd still have to
track when an entire va_list is passed.

However, I'm not sure it's really worth that trouble to avoid using the
new varags scheme.

OTOH, if you can get the compiler to understand the varargs call sites enough
to determine if fp is used or not, you'll get more milage by having two
entry points for varargs functions: one that does fp regs varargs setup
and register saves where appropriate, and one that elides them.  If floating
point registers need to be restored at the end of the function, the
fp-enabled entry point can save the fp regs and return address first,
and set the return address to a piece of stub code that restores the
fp regs and does the actual return.

-- 
Joern Rennecke                  |            gcc expert for hire
amylaar@onetel.net.uk           |  send enquiries to: jwr_jobs@onetel.net.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]