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]
Other format: [Raw text]

Re: i386 string patterns vs global registers


On Wed, Feb 12, 2003 at 07:42:17PM +1100, Fergus Henderson wrote:
> Does this mean that global register variables are now supported again?
> (When I say "supported", I mean in the sense of being an official part of
> the GNU C language; I don't mean that I expect free support from anyone.)

Well, they always have been supported, with the caveat that you can't
expect to be able to appropriate arbitrary registers.  What registers
you can use are constrained by and funny uses the architecture might
have for the thing, and the ABI.

As it happens, x86 is the worst case because *every* register has a
funny architecture-specific use.

> If someone introduces a patch which breaks such code, and I ask for the
> patch to be reverted, can I expect that the request will be honoured?

I think that would depend on the patch, but probably yes.

> Also, if the answer for esi and edi is yes, what about ebx?

Non-pic, I think you can get away with this.

That's all of them though; eax and edx are required for various
multiplications and divisions, ecx is required for variable shifts,
ebp is required for the frame pointer (note that -fomit-frame-pointer
is a suggestion, not a command).

BTW, how are things working out with the tail-call stuff?  Seems
like the code I looked at would work out much nicer if each of those
pieces were a separate function for which we tail called to the next.
That would let you use eax, edx, ecx as well, since you'd be able to
pass them as parameters from one function to the next (via regparm(3)).
And since they'd be parameters, they'd get copied to pseudos at function
entry and thense register allocated.


r~


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