forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help for inline asm

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Mon Aug 18, 2008 9:11 pm    Post subject: help for inline asm Reply with quote

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
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Mon Aug 18, 2008 9:45 pm    Post subject: Re: help for inline asm Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Tue Aug 19, 2008 6:20 am    Post subject: Reply with quote

raphael you again you are omnipresent on the psp scene (joke)
thx for the link
Back to top
View user's profile Send private message Send e-mail MSN Messenger
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Tue Aug 19, 2008 7:42 am    Post subject: Reply with quote

a nice tuto and sample for inline asm with gcc for psp
http://www.psp-programming.com/forums/index.php?topic=935
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group