int test(int couleur)
{
int c;
__asm__ (
".set push\n"
".set noreorder\n"
"lv.s s000,%1\n"
"mfv %0, s000\n"
".set pop\n"
: "=&r"(c)
: "m"(couleur)
);
return (c);
}
this function just return the param couleur as the function result ok
but in my myps assembler documentation i don't find any trace of lv.s, mvfv etc...
where can i find documentation about inline assembler
help for inline asm
Re: help for inline asm
Because those ops are not standard mips, but special commands for the PSP-custom VFPU coprocessor.sauron_le_noir wrote:int test(int couleur)
{
int c;
__asm__ (
".set push\n"
".set noreorder\n"
"lv.s s000,%1\n"
"mfv %0, s000\n"
".set pop\n"
: "=&r"(c)
: "m"(couleur)
);
return (c);
}
this function just return the param couleur as the function result ok
but in my myps assembler documentation i don't find any trace of lv.s, mvfv etc...
where can i find documentation about inline assembler
There is no official documentation on that part. The only documentation for it is here:
http://forums.ps2dev.org/viewtopic.php?t=6929
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
-
- Posts: 203
- Joined: Sat Jul 05, 2008 8:03 am
-
- Posts: 203
- Joined: Sat Jul 05, 2008 8:03 am
a nice tuto and sample for inline asm with gcc for psp
http://www.psp-programming.com/forums/i ... ?topic=935
http://www.psp-programming.com/forums/i ... ?topic=935