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

Re: Cleanups for the m68k backend


On Saturday 05 July 2003 18:38, Kaveh R. Ghazi wrote:

 > I think removing all those conditionals is a good thing.  However
 > looking at m68k.c, there seem to be many more assembler differences
 > than just a "."  as a size separator.

 Yes, unfortunately. Hmmm... I've looked what targets using the MITS
syntax are left. Surprisingly, very few:

 - m68k*-*-netbsd*
 - m68k*-*-openbsd*
 - m68k-*-coff*
 - m68k-*-aout*

NetBSD is no problem: they've migrated all m68k platforms to ELF
since release 1.6 and they're never going to upgrade the imported
copy of gcc in pre-1.6.

OpenBSD usually tracks changes in the NetBSD very closely, but I
couldn't find where in their release notes they say m68k platforms
have been switched to ELF.

I recall m68k-aout-* was still being used on the Amiga some time ago,
but they've probably switched to ELF now because their PPC compiler
is ELF too. Besides, the Amiga has favoured the Motorola syntax over
the MIT syntax, so it's likely they've turned on MOTOROLA in their
GCC patches.

About coff, I've never heard anyone using Microsoft's COFF format
with m68k ;-)

If we deprecate these remaining platforms, we can finally say goodbye
to this dual-syntax maintenance hell.


 > 2.  Another option would be to use a new specifier %P<punct_character>
 > where <punct_character> is passed by asm_fprintf to print_operand like
 > in option 1.  If you do that, then the above example becomes this:
 >  > asm_fprintf (stream, "\t%Omove%P.l %s,%P-\n", reg_names[15 - i]);

 Doesn't look too bad to me. I'd go for this, unless it turns out
just dropping the MIT syntax now is acceptable.

 > 3.  Another option is to use ASSEMBLER_DIALECTs:
 >  > asm_fprintf (stream, "\t{%Omove.l|movel} %s,{-(%Rsp)|%Rsp@-}\n",
 >  > reg_names[15 - i]);

 This could be used for the cases where option 2 can't help, such as:

  #ifdef MOTOROLA
        asm_fprintf (stream, "\tfpmovd %s,-(%Rsp)\n", reg_names[regno]);
  #else
        asm_fprintf (stream, "\tfpmoved %s,%Rsp@-\n", reg_names[regno]);
  #endif

becomes

        asm_fprintf (stream, "\t{fpmovd|fpmoved} %s,%Rsp@-\n", reg_names[regno]);


 > I'd be happy to help modify asm_fprintf or update the format checks
 > if you decide to use option 1 or 2.

 Thank you very much. I still know very little about gcc. Where should I look for
an example where format checks are documented or used cleanly?

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/

Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html



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