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]
Other format: [Raw text]

Re: sh64-elf (SH5) port


[Replying in public because I think these points are important; I hope
you don't mind, Richard.]

On Feb  5, 2002, Richard Sandiford <rsandifo@redhat.com> wrote:

> Alexandre Oliva <aoliva@redhat.com> writes:
>> To wit, see the ugliness of the clean up code I had to introduce in
>> OVERRIDE_OPTIONS to tell GCC that the sh-elf assembler does not
>> support `.quad':
>> 
>> {									\
>> /* Only the sh64-elf assembler fully supports .quad properly.  */\
>> targetm.asm_out.aligned_op.di = NULL;				\
>> targetm.asm_out.unaligned_op.di = NULL;				\
>> }									\

> Hmm, what's ugly about it?  (Apart from the fact that OVERRIDE_OPTIONS
> is still a macro rather than a function?)

Two reasons:

(i) it hides the actual values of these variables for certain
configurations, which is exactly what the targetm structure was
supposed to expose in a single place.

(i) it makes it harder for anyone to rearrange targetm into
sub-structures or so when (note, not if, when!) it becomes a Big Ball
of Mud, because then every single port (including
yet-to-be-contributed ones) have to be adjusted.  I.e., it becomes
more of a maintenance burden that if we still accessed this field as a
macro, like we do with DECLs, TREEs, RTXs, etc.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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