|
From: M. R. B. <mr...@0x...> - 2001-08-08 02:12:52
|
* NIIBE Yutaka <gn...@m1...> on Wed, Aug 08, 2001:
>
> Yes, I had thought that, and have been using -m4-nofpu with su. But
> looking the code deeply this time, it's SH-3 actually, and __sh3__
> definition seems correct. It's quite counter-intuitive, and confusing
> though. Well, I've objdump-ed the .o produced by -m4-nofpu, and found
> that the architecture is set to "SH3" not "SH4". Ummm...
>
This is correct.
> I don't know what is the actual definition of -m4-nofpu. I belive
> that it's Hitachi's request to RedHat/Cygnus, possibly for unreleased
> chips (or custom chips). I'd like to confirm Hitachi people. What'
> is that? If there's information you could provide us, please let me
> know. Nozawa-san?
>
See below.
> I think, it's not safe to rely on our assumption of the definition of
> -m4-nofpu, as current implementation is not consistent. It's good to
> have concrete one to specify "no FPU please" option for -m4.
Well, it's clear-cut what it does in gcc, it generates code for a sh3 and
below, but acts as if it had sh4 hardware:
{"4-nofpu", SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT, "" }
gcc won't generate code for anything higher than a sh3, and since the sh3
can't generate fpu code, this is (somewhat) of an alias for a sh4 without
fp support. So the __sh3__ predefine is correct, because if you define
__SH4__ you'll pull in fp code into libgcc, and you'll get link errors.
M. R.
|