From: Paul M. <le...@li...> - 2003-06-12 15:47:32
|
On Thu, Jun 12, 2003 at 05:35:23PM +0900, kaz Kojima wrote: > The problem is the meaning of the macro __sh3__ and __SH4__. If they > simply means CPU, you are right. But if they means ABI, the current > -m4-nofpu does the correct thing, because the purpose of -m4-nofpu is > to make programs having SH-3 like ABI and working on SH-4 CPU. > It would be better to separate these two meanings. >=20 It would also be better to more clearly define -m4-nofpu. The whole __sh3__= and __SH4_NOFPU__ thing as it stands right now is one giant mess. The name itse= lf is utterly misleading, though is likely quite a bit cleaner than something like using -mtune to adjust the ABI level. I definitely like the SHmedia definitions quite a bit better. I would also presume that SH-4 without FP should be mostly ABI compatible w= ith the SH-3. In which case, applications built with -m3 should presumably work= to some degree. (I'm at least able to run -m2 and -m3 compiled applications). Either way, I suppose going the -mno-implicit-fp route is probably the way = to go. It would be nice to get this merged with 3.3/3.4 definitely, as this sh= ould leave us with a working toolchain from stock gcc. > >As a workaround for some of this stupidity, I went through and changed m= ost of > >the __sh3__ and __SH4__ checks to CONFIG_CPU_SH3 and CONFIG_CPU_SH4 -- s= ince > >obviously we can't rely on GCC to be correct. >=20 > So, it might be not only a workaround but also the Right Thing.=20 >=20 I'll do this for the 2.4 branch as well then and see if things still work. |