This is the mail archive of the gcc@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: Converting tm.h macros to functions



> Yes.  The problem with just one or two structs is it limits your
> granularity - if you want to spread functions over more than one file
> they need to have external linkage again.  I imagine 4 or 5
> well-chosen groupings would be ideal.  Or one file may be good enough;
> I'm not sure.

I suggest we start with an `an_asm_output' struct, designed to contain
all the bits that are currently part of the ASM_OUTPUT macros.  That's
certainly a self-contained unit -- but still large enough to give us
a real feel for how this would work.  A `a_target' struct could then
simply contain an `an_asm_output' as a field.

Some functions *will* need external linkage -- that's how we'll get
sharing between all ELF platforms, for example.  Where to put these
functions will be a little tricky.  Ideally, we would create an `elf.c',
that got linked in with `i386.c', say.  We could also #include it,
I guess, even though that's nasty beyond belief.  I'm not sure if
our configury stuff currently supports linking in multiple .c files.

Thanks,

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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