Differences between revisions 3 and 4
Revision 3 as of 2008-05-14 11:39:05
Size: 2446
Comment:
Revision 4 as of 2009-09-20 21:55:03
Size: 2448
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
[[BR]][[BR]] <<BR>><<BR>>
Line 6: Line 6:
[[BR]][[BR]] This transformer ensures that <<BR>><<BR>> This transformer ensures that
Line 18: Line 18:
[[BR]] <<BR>>
Line 55: Line 55:
implementation file: [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp?view=markup http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp] [[BR]] implementation file: [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp?view=markup|http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp]] <<BR>>

'stack' - performs forming of stack memory for a method.

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



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


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

implementation file: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackLayout.cpp

Jitrino_OPT/stack (last edited 2009-09-20 21:55:03 by localhost)