[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Traditional cpp and assembler, revisited
On Thu, Dec 09, 2010 at 05:28:39PM +0000, David Laight wrote:
> On Thu, Dec 09, 2010 at 02:33:27AM +0100, Joerg Sonnenberger wrote:
> > (3) Stop using the C preprocessor for assembler sources and switch to
> > some other preprocessor like m4. This is more involved since it requires
> > changing assembler code that uses e.g. machine/asm.h. It can also lead
> > to some duplication between m4 macro library and C headers.
> Duplicating stuff in two files is really, really, really bad.
> Since there is stuff that is included in both C and asm files, they need
> to use the same pre-processor - or at least one that can follow the
> required syntax adequately for the shared files.
I agree on the former, but not on the latter. They don't have to use the
same files, it is enough if one set can be created easily from the
other. What kind of sharing are we looking at? It is mostly simple
defines and those are easy to describe in m4 and written out in C. Most
of the data structures involved already either use genassym or have
explicit layout dictated by hardware, so I don't think that would be a
big issue either.
Main Index |
Thread Index |