[Larceny-users] SCE_BUFFER?

Felix S Klock II (Larceny-users list proxy) felixluser at pnkfx.org
Wed Jul 11 11:22:40 EDT 2012


Follow-up with relevant wiki links (roughly in order of supposed relevance):

  https://trac.ccs.neu.edu/trac/larceny/wiki/ContIsEsp

  https://trac.ccs.neu.edu/trac/larceny/wiki/SassyInvoke

  https://trac.ccs.neu.edu/trac/larceny/wiki/IntelsOptimizationRules

  https://trac.ccs.neu.edu/trac/larceny/wiki/IAssassinSetrtnInvoke

Cheers,
-Felix

On Wed, Jul 11, 2012 at 11:08 AM, Felix S Klock II (Larceny-users list
proxy) <felixluser at pnkfx.org> wrote:
> Lars (cc'ing larceny-users)-
>
> If I recall correctly, Jesse Tov and I introduced the SCE_BUFFER to
> support using the $esp register on Intel as the stack-cache pointer
> (rather than the globals pointer, which I think was its role back when
> you first developed the Petit/Nasm backend).
>
> The reason to use $esp as the stack-cache pointer is that it enables a
> significantly faster call/return instruction sequence on Intel; see:
>
>   https://trac.ccs.neu.edu/trac/larceny/changeset/4000
>
> The reason we need a red-zone between the stack-cache and the nursery
> is that you need some space above $esp in order to properly handle
> interrupts or asynchronous signals or something along those lines.
> (The notes on changeset:4000 don't actually 100% coincide with this
> assertion, so I'm sure I'm getting the details wrong in this email.)
>
> The reason its only present on some realizations is that you only need
> this red zone on Native Intel backends (Petit/Nasm and Sassy/IA32 aka
> IAssassin), because that's the only place where $esp is being used in
> this way.
>
> Cheers,
> -Felix
>
> On Wed, Jul 11, 2012 at 10:10 AM, Lars T Hansen <lth at acm.org> wrote:
>> Can somebody tell me why SCE_BUFFER (aka $sce.buffer), which appears
>> to be some kind of red zone for the stack, was introduced into the
>> runtime and why it was only done in some realizations?  Neither Sparc
>> nor Standard-C make use of it.  I'm looking at code in a recent SVN
>> checkout but I've not attempted to find out when it was introduced.
>>
>> --lars
>>
>> _______________________________________________
>> Larceny-users mailing list
>> Larceny-users at lists.ccs.neu.edu
>> https://lists.ccs.neu.edu/bin/listinfo/larceny-users



More information about the Larceny-users mailing list