This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Converting tm.h macros to functions
- To: gcc at gcc dot gnu dot org
- Subject: Re: Converting tm.h macros to functions
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Tue, 19 Jun 2001 21:48:49 +0100
- Cc: jsm28 at cam dot ac dot uk, Mark Mitchell <mark at codesourcery dot com>,mike stump <mrs at windriver dot com>
mike stump wrote:-
> Here is an example of what should go into it, and why:
>
> $ cat */*.h | grep TARGET_FF | sort | uniq -c | sort -nr
> 25 #define TARGET_FF 014
> 7 #define TARGET_FF 014
> 2 #define TARGET_FF 0xc
> 1 #define TARGET_FF 014
> 1 #define TARGET_FF '\f'
> 1 #define TARGET_FF 12
> 1 #define TARGET_FF 0xc /* '\f' */
> 1 #define TARGET_FF 014
How far do we want to go with putting stuff in structures? For
example, should the target escapes like TARGET_FF go in? Or do we
just leave that as a macro? If we leave it as a macro, we would
probably have to put them in "target.h" rather than our "target-def.h"
so that the whole compiler sees the macro. Then we would need to be
sure to #include "target.h" before the port-specific header (which I
think comes in via #include "config.h" at present). Maybe "config.h"
should include "target.h" for us?
Another issue: how do stand-alone executables other than the front
ends access this information? At present, we're defining the target
structures in config/cpu/cpu.c. However, those files aren't linked
against tradcpp and cpp0, for example. We're going to want cpp0 to
have information about the target word sizes for doing CPP arithmetic,
at least when we get this stuff right in the future. How do we handle
that?
Neil.