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: [m68k] Restore some original predefines and cleanup m68k targetflags


Gunther Nikl wrote:

Do you only use the target flag or you also needed the macros I've
removed? My first guess is that the way they worked doesn't seem
appropriate for the register parameters style used on the Amiga.

Of course, the macros were modified and other support code is added to m68k.c to make -mregparm work. AFAICT, this is really generic stuff and thats why its in m68k.c

[...]

Now I did a closer inspection and noticed that m68k.md actually
outputs RTD when current_function_pops_args is non-zero. RTD is
also emitted in m68k_output_function_epilogue(), so it actually
_could_ work.

Does anyone want to keep that functionality? Was it used by anyone?

I believe that you cannot remove a feature without deprecating it first. This is very bad practice.

Ok, I'll prepare a patch to restore both TARGET_REGPARM and TARGET_RTD.


Do you mean something like this?

 if (TARGET_68881 && (TARGET_DEFAULT & MASK_68881))
   builtin_define ("__HAVE_68881__");

Yes, with the TARGET_DEFAULT test first. But I suppose that doesn't really matter. If such a test is added then one would need an additional check to set the define and I don't have a suggestion for that.

Wait a moment... with this check there's no way to set __HAVE_68881__ on targets with no 68881 in TARGET_DEFAULT!

Are you sure you want that?

Wouldn't it be better to add another command line switch and target flag
to enable/disable those 68881 instructions that must be emulated on the
680[46]0? For instance:

-m68040fpu - only emit 040-060 floating point instructions (no 68881-only opcodes)

This would also turn on the __m68040fpu__ predefine to be used in math-68881.h.

--
 // 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]