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
REg: inline assembly
Started by ●June 25, 2006
Reply by ●June 26, 20062006-06-26
giri,
you must!!! use a space or tab after the qoute.
asm ("space val1,val2");
regards,
derk
-----Oorspronkelijk bericht-----
Van: c... [mailto:c...]Namens Giridhar
Tammana
Verzonden: zondag 25 juni 2006 16:39
Aan: c...
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 must!!! use a space or tab after the qoute.
asm ("space val1,val2");
regards,
derk
-----Oorspronkelijk bericht-----
Van: c... [mailto:c...]Namens Giridhar
Tammana
Verzonden: zondag 25 juni 2006 16:39
Aan: c...
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