Intel ARCHITECTURE IA-32 User Manual Page 537

  • Download
  • Add to my manuals
  • Print
  • Page
    / 568
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 536
D-1
D
Stack Alignment
This appendix details on the alignment of the stacks of data for
Streaming SIMD Extensions and Streaming SIMD Extensions 2.
Stack Frames
This section describes the stack alignment conventions for both
esp-based (normal), and ebp-based (debug) stack frames. A stack frame
is a contiguous block of memory allocated to a function for its local
memory needs. It contains space for the function’s parameters, return
address, local variables, register spills, parameters needing to be passed
to other functions that a stack frame may call, and possibly others. It is
typically delineated in memory by a stack frame pointer (
esp) that
points to the base of the frame for the function and from which all data
are referenced via appropriate offsets. The convention on IA-32 is to use
the
esp register as the stack frame pointer for normal optimized code,
and to use
ebp in place of esp when debug information must be kept.
Debuggers use the
ebp register to find the information about the
function via the stack frame.
It is important to ensure that the stack frame is aligned to a 16-byte
boundary upon function entry to keep local
__m128 data, parameters,
and
xmm register spill locations aligned throughout a function
invocation.The Intel C++ Compiler for Win32* Systems supports
conventions presented here help to prevent memory references from
incurring penalties due to misaligned data by keeping them aligned to
16-byte boundaries. In addition, this scheme supports improved
Page view 536
1 2 ... 532 533 534 535 536 537 538 539 540 541 542 ... 567 568

Comments to this Manuals

No comments