Issue with allocating stack space to local variables (frame pointer)

Ian Lance Taylor iant@google.com
Wed Oct 22 06:02:00 GMT 2008


"Sivaprasad.pv" <sivaprasad.pv@redpinesignals.com> writes:

> In our case inorder to push some value onto the stack , it place the
> value into the location pointed by stack pointer first and then
> decrement/increment the stack pointer (post operation).
> jump to sub- routine & return instructions are implemented  using
> above method.
> Initially our stack is bottom-up stack,currently we want to change it
> to top-down stack.
> Is it possible to do this in compiler with out changing our ISA(
> instruction set architecture).

Look at STACK_GROWS_DOWNWARD and STACK_PUSH_CODE.

Ian



More information about the Gcc-help mailing list