Re: -fstack-limit-register not work for ARM?

Ian Lance Taylor <[email protected]>
Newsgroups gmane.comp.gcc.devel,gmane.linux.ports.arm.general
Message-ID <[email protected]>
Haitao Zhang <[email protected]> writes:

> we recently use GCC 4.3.3 to build userland application use ARM EABI,
> for running on a ARM7TDMI, mmuless platform.
>
> after explicit compile application with -fstack-limit-register=R10,
> there is no binary change with or without this option. Does this option work?
>
> another thing, in old GCC 3.x series, there is a -mapcs-stack-check,
> but once GCC and ARM ABI upgraded to use AAPCS,
> seems there is no such option like -maapcs-stack-check.

This e-mail message is appropriate for the mailing list
[email protected], not [email protected].  Please take any followups to
[email protected].  Thanks.

-fstack-limit-register will affect the use of alloca and variable length
arrays on ARM.  However, it will not affect ordinary functions.  It
looks like the backend support for -fstack-limit-register was only ever
implemented for Blackfin, m68k, and PPC.  This seems like an omission
which should be documented.  It was added here:

http://gcc.gnu.org/ml/gcc-patches/1999-11/msg00739.html

and was never really carried forward.

I don't think it would be very difficult to add it to the ARM backend,
but somebody would have to actually do the work.

You're right that there is no -maacps-stack-check option, and in fact
-mapcs-stack-check doesn't work either.

Sorry that I don't have better news on this front.

Ian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.