Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - this option causes the code generator to ensure that the first reference to http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
This option causes the code generator to ensure that the first reference to
the stack in a function is to the stack "bottom" using the SS register.  If
the memory for this part of the stack is not mapped to the task, a memory
fault will occur involving the SS register.  This permits an operating
system to allocate additional stack space to the faulting task.
Suppose that a function requires 100 bytes of stack space.  The code
generator usually emits an instruction sequence to reduce the stack pointer
by the required number of bytes of stack space, thereby establishing a new
stack bottom.  When the "st" option is specified, the code generator will
ensure that the first reference to the stack is to a memory location with
the lowest address.  If a memory fault occurs, the operating system can
determine that it was a stack reference (since the SS register is involved)
and also how much additional stack space is required.

See the description of the "sg" option for a more general solution to the
stack allocation problem.  The macro __SW_ST will be predefined if "st" is
selected.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson