lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Re: `pushr' on SPARC


From: Ludovic Courtès
Subject: Re: [Lightning] Re: `pushr' on SPARC
Date: Tue, 14 Nov 2006 18:13:56 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Hi,

Paolo Bonzini <address@hidden> writes:

> No, they are actually caller-save registers but compilers provide a
> switch to disable them.  GCC says:
>
>   On non-v9 systems:
>   g1 is free to use as temporary.
>   g2-g4 are reserved for applications.  Gcc normally uses them as
>   temporaries, but this can be disabled via the -mno-app-regs option.
>   g5 through g7 are reserved for the operating system.
>
>   On v9 systems:
>   g1,g5 are free to use as temporaries, and are free to use between calls
>   if the call is to an external function via the PLT.
>   g4 is free to use as a temporary in the non-embedded case.
>   g4 is reserved in the embedded case.
>   g2-g3 are reserved for applications.  Gcc normally uses them as
>   temporaries, but this can be disabled via the -mno-app-regs option.
>   g6-g7 are reserved for the operating system (or application in
>   embedded case).

Ok, but isn't that too much tight to the current GCC version?

OTOH, even if it is, that's arguably not too much of an issue since all
this will vanish is the next release.

> I didn't understand if you would need to add something like "move %g0,
> %l0" to the prolog?

Yes (rather `mov %g0, %l7').

> If so, I think the best option is to provide a
> JIT_NEED_PUSH_POP #define that enables a 32-byte jit_pushr/jit_popr
> region.  If you do not define it, the frame is 104 bytes (plus the
> jit_allocai area), jit_pushr/jit_popr are not defined at all, and
> JIT_V_NUM is 8.  By default it is not defined, and NEWS warns about
> that.

Alright, let's do that (to be continued...).

Thanks,
Ludovic.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]