This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 8086 backend and stack problem
Erdem Guven <zuencap@yahoo.com> writes:
> I'm using the backend in a project. I want to compile
> some codes in 16 bits int mode and others in 32 bits
> int. I figured out that gcc uses int sized blocks to
> store arguments, passed to a function, in stack. I
> mean if function get a short (16 bits) as a parameter
> it pushes 4 bytes to stack in 32bits integer mode and
> just 2 bytes in 16 bits mode. Is there an easy way to
> force gcc to use another size?
How parameters are pushed on the stack is controlled by your backend,
via FUNCTION_ARG, PARM_BOUNDARY, PREFERRED_STACK_BOUNDARY, PUSH_ARGS,
PUSH_ROUNDING, and the like. The machine independent part of gcc
doesn't care at all.
Ian