[M3devel] frame per procedure instead of frame per TRY?

Jay K jay.krell at cornell.edu
Mon Jul 20 09:21:18 CEST 2015

ps: translating to C for Win32 or C++ for any targets nets you whatever is the local optimized exception handling runtime, including certainly this stuff on NT.
Sometimes that might merely be a similar setjmp/longjmp based system, but often not.
But we need higher level m3cg operations for exception handling to do this (or some awful reverse induction in the backend..)
 - Jay

From: jay.krell at cornell.edu
CC: jay.krell at cornell.edu; m3devel at elegosoft.com
Subject: Re: [M3devel] frame per procedure instead of frame per TRY?
Date: Sun, 19 Jul 2015 10:46:36 -0700
To: estellnb at elstel.org

NT/amd64 & likely all NT architectures except x86: The pdata gives function boundaries and the xdata provides information to restore nonvolatile registers, including rsp and return address. Locals may be enregistered across function calls in nonvolatile registers. 

There is no linked list.There is a reliable stack walker including restoring nonvolatile registers provided by ther operating system (RtlUnwind, RtlVirtualUnwind).

 - Jay
On Jul 19, 2015, at 5:02 AM, Elmar Stellnberger <estellnb at elstel.org> wrote:


    Am 2015-07-19 um 12:19 schrieb Jay K:

        And all the other NT platforms are faster.
        They don't link/unlink anything.
        They have metadata describing prologs.
        The runtime can use that to restore nonvolatile registers
        the stack) at any point.

    including NT-AMD64 or not? - 

    but PowerPC, MIPS, Alpha, Itanium and ARM?


    interesting. What happens if I have a variable being kept in a

    like register int x? These registers would still need to be saved as

    a prolog could never tell us (i.e. we would then again need a linked

    list) ...


    ... and then if we have prologues we would not need to pin down

    any word that could refer as a refany to the traced heap in our 

    locales area but only those which really do (The question is of

    course what data is in these prologues and what data is not.).





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20150720/8c45a67f/attachment-0002.html>

More information about the M3devel mailing list