Quoting Eric Christopher <[EMAIL PROTECTED]>:

> On Tue, 2005-04-05 at 22:25 +0100, Richard Sandiford wrote:
> > [EMAIL PROTECTED] writes:
> > > asm("cop2a %0, %1;", :: "r" (cp2rb(i)) : "r" (cp2rb(j)));
> >
> > In addition to Daniel's reply: you wouldn't want to use "r" here.
> > That's for general registers only.
> >
> > The MIPS port does in theory support coprocessors, but the functionality
> > isn't tested much (if at all).  The constraint for coprocessor 2 registers
> > is "C".
>
> Definitely not tested much. There were good arguments over adding the
> work into gas and so it wasn't added. The tests are still in gcc:
>
> ./gcc.c-torture/compile/mipscop-4.c
> ./gcc.c-torture/compile/mipscop-3.c
> ./gcc.c-torture/compile/mipscop-2.c
> ./gcc.c-torture/compile/mipscop-1.c
>
> At some point it might be good to collate all of the mips specific tests
> into the gcc.target directory. I doubt that cvs history is particularly
> important for tests.
>
> -eric
>
>

Eric,

Ok about the "r" convention I wrongfully used, it is assumed for the integer
register-file.

I am currently using MIPS + soft-float + some other functionalities in
Coprocessor #2 with success (somewhat tested in a functional simulator). About
10-12 special-purpose instructions are implemented in COP2 plus the
ctc2,cfc2,... etc instructions that are detailed in the MIPS ISA documents. All
added instructions are faithful to the COP2 convention (6-bit opcode + 26
implementation specific bits).

I have used Matt Hiller's patch on binutils, for supporting coprocessor register
names, which was uploaded at gcc-patch ml circa June 2002. It works, at least
for the things I have used it. Actually the patch doesn't correspond exactly to
either versions 2.13,2.14 or 2.15 but to some CVS snapshot (I suppose).

My question on the usage of inline assembly regards omitting writing long jump
tables (e.g. with nested switches). This is not usually necessary but it is
when dealing with dynamic code generation.

Plus: can gcc co-operate with dynamic code generation tools e.g. the GNU
lightning? I have also heard of another tool, dcg (if i spell it correctly).

Thanks a lot for your responce!

Regards
Nikolaos Kavvadias

Reply via email to