This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [m68k] Convert CPP_SPEC to TARGET_CPU_CPP_BUILTINS
Gunther Nikl wrote:
I have no idea whether code used to test mc68030.
Adding that wouldn't be hard: I just need to allocate a new bit in
target_flags for MASK_68030, and use that just for the define.
That burns a bit without real need. If mc68030 shall come back I suggest
do add it aagin to CPP_SPEC like this:
"%{m68030:%{!ansi:%{!std=*:-Dmc68030}%{std=gnu*:-Dmc68030}}" \
" -D__mc68030 -D__mc68030__} "
This would defeat the whole point of the patch, which was getting rid
of CPP_SPEC as requested by Richard. CPP_SPEC has been obsoleted and
replaced by the TARGET_XXX_CPP_BUILTINS macros.
And no one complained about that so far, uh?
Maybe nobody uses my port ;-(
Isn't your GCC port in Geek Gadgets? Oh, wait... I'm quite uninformed
about the latest Amiga news. Does Geek Gadgets still exist?
By the way, don't you want any of your patches in mainline? Time is
running out... According to Mark Mitchell, GCC will switch to
stage 3 very soon.
The same considerations we've done for the __mc68030__ not being useful
would apply here.
There isn't a -m68010 switch in GCC at all. You don't need to worry about
it.
Oops!
If we really care about it, we could this:
if (TARGET_68040_ONLY)
{
if (TARGET_68060)
define_std("mc68060");
else
define_std("mc68040");
}
else if (TARGET_68060) /* -m68020-60 */
{
define_std("mc68060");
define_std("mc68040");
define_std("mc68020");
}
else if (TARGET_68040) /* -m68020-40 */
{
define_std("mc68040");
define_std("mc68020");
}
else if (TARGET_68020)
...
Yes, that seems to be a solution.
Ok, I'll post a patch.
Ouch, that's a problem then, becase TARGET_68881 means
"I can use any 68881 FP instruction".
There are places where TARGET_68881 is additionally probed against
!TARGET_680[46]0
That's ok, but it should never happen that an FP instruction gets
emitted when TARGET_68881 is off. I think the NetBSD/m68k kernel
relies on it to avoid the burden of saving and restoring FP
registers in syscalls and interrupts.
If you look at m68k.md, you'll see that GCC already generates some
FP instructions not supported by the 68060 (fsin, fcos, fsqrt).
I don't know which instructions are not directly supported in HW.
I think it was all transcendental instructions (this would include
fsin/fcos).
if TARGET_DEFAULT & MASK_68881:
gcc -m68060
TARGET_68060: true, TARGET_68881: true, __HAVE_68881__: defined
gcc -m68060 -msoft-float
TARGET_68060: true, TARGET_68881: false, __HAVE_68881__: undefined
else
gcc -m68060
TARGET_68060: true, TARGET_68881: true, __HAVE_68881__: undefined
gcc -m68060 -msoft-float
TARGET_68060: true, TARGET_68881: false, __HAVE_68881__: undefined
gcc -m68060 -m68881
TARGET_68060: true, TARGET_68881: true, __HAVE_68881__: defined
This doesn't look sane...
Nobody said that it was/is consistent.
If it's really needed for compatibility, I could add yet another target
flag such as TARGET_SOFTFP and use that.
--
// 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