BSP for MIPS32 4KC
Ralf Corsepius
corsepiu at faw.uni-ulm.de
Wed Sep 10 21:21:43 UTC 2003
On Wed, 2003-09-10 at 21:55, mikeci at acm.org wrote:
> Hi!
>
> See the inline answers:
>
> >
> > OK, it seems we have some problems communicating. I know you have a
> > working BSP, but we can't just commit changes without understanding the
> > implications. I think we really must identify what MIPS32 means, so
> > please answer the following questions;
> >
> > - What revision is your processor, R3000 or R4000?
> My processor is MIPS 4Kc which is based on MIPS32 architecture.
>
> > - What is the Register width? (this is 32, from above)
>
> 32 bit registers.
>
> > - Why will __mips == 3 not work?
>
> Problem is that you can mix modules compiled with mips=1 and mips2 with
> modules compiled with mips=3 and mips=4. Anyway, this makes life difficult
> because than you need to pass cpu= to gcc. By using mips=32 you can
> support all MIPS32 cpus. All the gcc libraries are compiled with mips=1,
> and you can't mix them. Then, again I don't know how can you distinguish
> between libraries compiled with mips=3 and mips=1. Is there a support in
> the gcc for this?
Yes, it's called multilibs.
# mips-rtems4.7-gcc --print-multi-lib
.;
mips3;@mips3
soft-float;@msoft-float
single;@msingle-float
el;@EL
soft-float/el;@msoft-float at EL
single/el;@msingle-float at EL
mips3/soft-float;@mips3 at msoft-float
mips3/single;@mips3 at msingle-float
mips3/el;@mips3 at EL
mips3/soft-float/el;@mips3 at msoft-float@EL
mips3/single/el;@mips3 at msingle-float@EL
The problem with -mips3 and gcc < 3.3 was that gcc did not compile at
all for -mips3. gcc-3.3.x (finally) compiles with a mips3 multilib
variant added, but now it triggers problems at other places (RTEMS +
binutils)
> > - Do you need CP1 support or not? Your patch simply deletes the
> > mathco support, which isn't appropriate for commiting into RTEMS
> > because other MIPS bsp's use it. To resolve this, I think we'll need
> > to do bsp #includes in the cpukit code, or test for
> > -msoft-float, which shouldn't be all that horrible, but we have to
> > know what we're doing.
-msoft-float also is a multilib variant and already had been implemented
in mips-rtems4.6-gcc/gcc-3.2.3
# mips-rtems4.6-gcc --print-multi-lib
.;
soft-float;@msoft-float
single;@msingle-float
el;@EL
soft-float/el;@msoft-float at EL
single/el;@msingle-float at EL
Ralf
>
> My processor doesn't have CP1, and I had problems with the code dealing
> with floating point. I don't know why this code was included in my code
> even when defining -msoft-float and setting appropriate constants in cpu.h
> (MIPS_HAS_FPU).
> This is the reason why I deleted that part. For all
> other, this must be left in.
>
>
> > Thanks,
> >
> > Gregm
>
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu at faw.uni-ulm.de FAX: +49/731/501-999
http://www.faw.uni-ulm.de
More information about the users
mailing list