From: NIIBE Y. <gn...@m1...> - 2001-08-08 06:58:35
|
Greg Banks wrote: > Firstly, the gcc I have here (rather old) doesn't define __sh3__ > when you give it -m4-nofpu. This might be because we have one of > Kaz' patches. Yes, this is because of our patch, perhaps I did that. Original implementaiton defines __sh3__ for -m4-nofpu (not __SH4__). I thought that it was mistake, but it seems it is intentional. > sh-linux-gnu-gcc --verbose -m3 -o foo-m3.o -c foo.c > [...] -D__SH3__ -D__sh3__ -ml -m3 > > sh-linux-gnu-gcc --verbose -m4 -o foo-m4.o -c foo.c > [...] -D__SH4__ -ml -m4 > > sh-linux-gnu-gcc --verbose -m4-nofpu -o foo-m4-nofpu.o -c foo.c > [...] -D__SH4__ -D__SH4_NOFPU__ -ml -m4-nofpu > > Which looks pretty sensible to me. Yes, we do that. But the definition seems not that. So, I'd like to ask Hitachi what was the order/request (specification) to RedHat/Cygnus about -m4-nofpu. > The -m4-nofpu option uses the same integer division millicode as > -m3, which is correct. Yes, that's _our_ intention. > Secondly, defining __sh3__ is the *wrong* thing to do for the kernel. Yes. Because we distingush with it. It's not just a kernel for all program, because we share header files of kernel or C library among SH3 and SH4. > What the kernel needs is an option that generates SH4 code with __SH4__ > defined, but no FPU code used from libgcc.a. With the gcc I'm using here, > -m4-nofpu is that option. Yes. > So I'm very confused. Niibe-san, does your gcc behave differently to mine? Mine works exactly as yours. But the original GCC does not. And it seems that it is my misunderstanding that -m4-nofpu is the one for our demands (SH-4 with no FPU division). At that time -m4-nofpu was introduced, because we really wanted such a option, we're just hurry to adopt this option (assuming this *is* for us), changing CPP macro. Now, I think that it's not. I think what we should use is -m4 and say, -fno-fpudiv or -fidiv. The option -m4-nofpu would be the option for some custom model, variant of SH, perhaps. BTW, thanks for the logos. It looks pretty good. -- |