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]

Re: Patch for having internal macros as functions, take 2


| 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.

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