8086 backend and stack problem
Ian Lance Taylor
iant@google.com
Thu Jul 20 15:25:00 GMT 2006
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
More information about the Gcc
mailing list