Re: -fstack-limit-register not work for ARM?
Jun Sun <[email protected]>
| Newsgroups | gmane.comp.gcc.devel,gmane.linux.ports.arm.general |
|---|---|
| Message-ID | <[email protected]> |
Ian Lance Taylor wrote: > 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. > Thanks for the confirmation. If you or someone could point out where are the code section is for adding this support for those arches, or even better, provide some hints for us to search the related svn history, that would be really helpful. We might get brave enough to add this code for ARM (probably after drinking some volka ;0) Cheers. Jun