This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Automatic MMX/x87 FPU mode switching


On Tue, Jun 28, 2005 at 10:38:06AM +0200, Uros Bizjak wrote:
> It looks that we have to invent some other way to tell reg allocator,
> which register set is active.

Ug.  Yes, it certainly looks like it.

> Perhaps we could introduce a
> machine_function variable, that is initialized depending on function
> start FPU mode and changed dynamically by emms and efpu patterns?

Not quite.  We'd need a graph, not a plain variable.

If the cfg doesn't change between optimize-mode-switching and
register allocation, it might be possible to have a bitmap that
records the initial value at the beginning of each block, and
then track the changes in mode via emms/efpu/call insns.

What we want, I think, is to adjust struct insn_chain.live_throughout
to make live the registers that we don't want to use.  There's
existing precidence for hacks in this area: maybe_fix_stack_asms.
Which, I'll note, is already protected by STACK_REGS, which seems
convenient...



r~


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