Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Ads

Discussion Groups

Discussion Groups | TMS320C54x | REg: inline assembly

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

REg: inline assembly - Giridhar Tammana - Jun 25 10:42:19 2006



Hi,
I'm using c64x simulator.
I want to use swap2 instruction.
For this there is no intrinsic.

How can I write inline asm if possible to use swap2 instruction?

{
....
unsigned int val;
asm("swap2 val, val");
.....
}

asm("swap2 val, val");
above statement is wrong.
I also tried _val for val.
And GCC like asm("swap2 %0,%0"
                 :"r" val);
also doesnt work?
Pls reply if some thing we can do.
Thanks,
Giri



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

RE: REg: inline assembly - Derk van de Velde - Jun 26 10:10:26 2006

giri,

you must!!! use a space or tab after the qoute.
asm ("space val1,val2");

  regards,
  derk
   -----Oorspronkelijk bericht-----
  Van: c...@yahoogroups.com [mailto:c...@yahoogroups.com]Namens Giridhar
Tammana
  Verzonden: zondag 25 juni 2006 16:39
  Aan: c...@yahoogroups.com
  Onderwerp: [c54x] REg: inline assembly
  Hi,
  I'm using c64x simulator.
  I want to use swap2 instruction.
  For this there is no intrinsic.

  How can I write inline asm if possible to use swap2 instruction?

  {
  ....
  unsigned int val;
  asm("swap2 val, val");
  .....
  }

  asm("swap2 val, val");
  above statement is wrong.
  I also tried _val for val.
  And GCC like asm("swap2 %0,%0"
  :"r" val);
  also doesnt work?
  Pls reply if some thing we can do.
  Thanks,
  Giri



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )