Re: Using inline assembly with specific register indices

2005-04-05 Thread Eric Christopher
> > Ok about the "r" convention I wrongfully used, it is assumed for the integer > register-file. > Correct. > 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 instruc

Re: Using inline assembly with specific register indices

2005-04-05 Thread nkavv
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

Re: Using inline assembly with specific register indices

2005-04-05 Thread Eric Christopher
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

Re: Using inline assembly with specific register indices

2005-04-05 Thread Richard Sandiford
[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 c

Re: Using inline assembly with specific register indices

2005-04-04 Thread nkavv
Thanks Daniel! actually my 2 messages were send back-to-back. I have just read both your responses and I can see that i could use stringify approach to force the assembly output of GCC to what I want. Nikolaos Kavvadias

Re: Using inline assembly with specific register indices

2005-04-04 Thread Daniel Jacobowitz
On Tue, Apr 05, 2005 at 07:27:00AM +0300, [EMAIL PROTECTED] wrote: > I was wondering... > > why not support asm templates THAT ARE NOT string constants??? And I > mean for static compilation cases only. > > For example: > > asm(instrx $%d, $%d\n",src1,src2 : "=r" (var1) : "r" (var2)); > > I ass

Re: Using inline assembly with specific register indices

2005-04-04 Thread Daniel Jacobowitz
On Tue, Apr 05, 2005 at 07:24:44AM +0300, [EMAIL PROTECTED] wrote: > Hi guys/ladies, > > I'm currently designing an ISA add-on to the MIPS architecture. My > intention is to use it (it is an algorithm accelerator actually) as a > COP2 (coprocessor #2). The corresponding microarchitecture is stable

Re: Using inline assembly with specific register indices

2005-04-04 Thread nkavv
I was wondering... why not support asm templates THAT ARE NOT string constants??? And I mean for static compilation cases only. For example: asm(instrx $%d, $%d\n",src1,src2 : "=r" (var1) : "r" (var2)); I assume printf-like formating. Or else you may need either write a double-nested switch (a

Using inline assembly with specific register indices

2005-04-04 Thread nkavv
Hi guys/ladies, I'm currently designing an ISA add-on to the MIPS architecture. My intention is to use it (it is an algorithm accelerator actually) as a COP2 (coprocessor #2). The corresponding microarchitecture is stable (works at register-transfer level, not subject to change). Plus, I would be