This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using inline assembly with specific register indices


On Tue, 2005-04-05 at 22:25 +0100, Richard Sandiford wrote:
> nkavv@physics.auth.gr 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]