This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Change FRAME_GROWS_DOWNWARD from defined/undefined to 1/0


Hi!

This patch (needed by ppc stack guard port) allows FRAME_GROWS_DOWNARD
to be runtime selectable (e.g. based on compiler arguments).
Previously, if FRAME_GROWS_DOWNWARD was defined, frame grew downward,
if it was not defined, it grew upward.
With this patch, if FRAME_GROWS_DOWNWARD is defined to something that
evaluates to non-zero at runtime, frame grows downward, if it is
defined to something that evaluates to zero at runtime, it grows
upward.  If the macro is not defined, the default definition is 0.

This patch does not depend on the other SSP patches and even if
they are not going to be included, it is IMHO an improvement,
as both FRAME_GROWS_DOWNWARD and !FRAME_GROWS_DOWNWARD handling
will be checked by the compiler and if optimizing, the variant
that is never applicable on the target will be simply optimized
out.

	Jakub

Attachment: d-ssp-3
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]