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: SH: use register names instead of numbers


> For this specific problem, I'd like to see a construct like this:
> 
> (define_constants [
>    (foo 12)
>    (bar 23)
>    (baz 34)
>    ...
> ])

That'd be alright with me from an rtl interface standpoint, and it should
be easy to modify my rtl.c patch to get there...
however, Alexandre's patch highlighted the desirability to be able to share
constants with C files.  So it would be nice to be able to include a
header file and pick out #defines from there.

How about:

(read_c_include_file "foo.h")

It could than use the #defines it finds and ignore lines that start with
other stuff, so you can use whatever comment style you like.

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