This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for having internal macros as functions, take 2
- To: hp at bitrange dot com, vonbrand at sleipnir dot valparaiso dot cl
- Subject: Re: Patch for having internal macros as functions, take 2
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Mon, 3 Jan 2000 00:27:01 -0500
- Cc: gcc-patches at gcc dot gnu dot org
| Mmm, yes, it will not help debug *that* class of bugs, which I believe
| are rare *in gcc*. The idea is about easier debugging of other problems
| in gcc where macros are used. Debugging brittle or buggy macros was never
| the intention.
| You also cannot "functionalize" macros that use alloca, or where a
| parameter is code or a label, like GO_IF_LEGITIMIZE_ADDRESS. So you can't
| add a PROVIDE_MACRO_FUNCTION marker for them. However, the vast majority
| of macros in gcc are function-like.
You can move most of the GO_IF_LEGITIMATE_ADDRESS handling into a function that
returns TRUE/FALSE on whether it should goto to the label or not. For
LEGITIMATIZE_ADDRESS, you have the function return the RTX value or NULL. Look
at i386.c or i90.c for details of how to do it. I will be submitting patches
shortly that does this for the alpha.