Hello, I am a new user of this forum and developper from PSP. Nice to meet this forum.
I have to use an asm inline within C using a register passed as a parameter. The idea is using a different register depending on some conditions, so I pass the name of the register wich I want to use .I have followed GCC manual to do it but always get the same result. This is what I want to do (Example):
register int* REG __asm__ ("t0");
__asm__ ("li %0, 0xFF\n" : "=r" (REG) :
;
As far as the manual is concerned it should be:
$t0 <-- 0xFF
However when I am debugging always do:
$a0 <-- 0xFF
How could I use an asm inline code passing the register what I want to use in that moment correctly? Does anyone could give me some help?
Kind Regards.
Diego Torres.
I have to use an asm inline within C using a register passed as a parameter. The idea is using a different register depending on some conditions, so I pass the name of the register wich I want to use .I have followed GCC manual to do it but always get the same result. This is what I want to do (Example):
register int* REG __asm__ ("t0");
__asm__ ("li %0, 0xFF\n" : "=r" (REG) :
;As far as the manual is concerned it should be:
$t0 <-- 0xFF
However when I am debugging always do:
$a0 <-- 0xFF
How could I use an asm inline code passing the register what I want to use in that moment correctly? Does anyone could give me some help?
Kind Regards.
Diego Torres.