harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Harmony Wiki] Update of "Jitrino OPT/stack" by Mikhail Fursov
Date Mon, 12 May 2008 09:39:44 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Harmony Wiki" for change notification.

The following page has been changed by Mikhail Fursov:
http://wiki.apache.org/harmony/Jitrino_OPT/stack

New page:
''' 'stack' ''' -  performs forming of stack memory for a method.
[[BR]][[BR]]
The transformation performs forming of stack memory for a method,[[BR]]
, e.g. allocates memory for stack variables and input arguments, inserts [[BR]]
saving/restoring callee-save registers. Also it fills StackInfo object [[BR]]
for runtime access to information about stack layout [[BR]]

[[BR]][[BR]] This transformer ensures that
{{{
   1)  All input argument operands and stack memory operands have appropriate
       displacements from stack pointer
   
   2)  There are save/restore instructions for all callee-save registers
 
   3)  There are save/restore instructions for all caller-save registers for
       all calls in method
 
   4)  ESP has appropriate value throughout whole method
 }}}
[[BR]]
Stack layout illustration:
{{{
 
   +-------------------------------+   inargEnd
   |                               |
   |                               |
   |                               |
   +-------------------------------+   inargBase, eipEnd
   |           eip                 |
   +-------------------------------+   eipBase,icalleeEnd      <--- "virtual" ESP
   |           EBX                 |
   |           EBP                 |
   |           ESI                 |
   |           EDI                 |
   +-------------------------------+   icalleeBase, fcalleeEnd
   |                               |
   |                               |
   |                               |
   +-------------------------------+   fcalleeBase, acalleeEnd
   |                               |
   |                               |
   |                               |
   +-------------------------------+   acalleeBase, localEnd
   |                               |
   |                               |
   |                               |
   +-------------------------------+   localBase    
   |      alignment padding        |
   |-------------------------------+   <--- "real" ESP
   |           EAX                 |
   |           ECX                 |
   |           EDX                 |
   +-------------------------------+   base of caller-save regs
   
}}}

Mime
View raw message