help for inline asm

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

help for inline asm

Post by sauron_le_noir »

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
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Re: help for inline asm

Post by Raphael »

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
Because those ops are not standard mips, but special commands for the PSP-custom VFPU coprocessor.
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
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

raphael you again you are omnipresent on the psp scene (joke)
thx for the link
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

a nice tuto and sample for inline asm with gcc for psp
http://www.psp-programming.com/forums/i ... ?topic=935
Post Reply