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 

VFPU ulv.q on FAT PSPs

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



Joined: 31 Aug 2009
Posts: 22

PostPosted: Mon Mar 01, 2010 8:39 am    Post subject: VFPU ulv.q on FAT PSPs Reply with quote

Hi!

As there's lot of silence about this topic I want to reopen it a little.
I've done some research and I noticed that ulv.q corrupts FPU registers (as we all know) in this way:

ulv.q C000 --> $f0
ulv.q R000 --> $f0
ulv.q C010 --> $f1
ulv.q R001 --> $f1
...

I've tested to registers R500 so it seems to affect all FPU registers (0-31) depending on the Row/Col destination number.

Another topic that was discussed here is the problematic with clobering the registers in inline asm. My results (I don't know how gcc works) are that gcc doesn't use or assume the value after clobering the registers.

To be more specific I had a function which was failing in FAT because I was loading R101 and gcc was using the $f5 register after this instruction without restoring it's value from the stack. After the changes gcc is now using $f6 instead 5, so *I think* it's working as expected.

Why do you think/know? Do you think a better solution is to use lv.s instead ulv.q? I'm using 3 component vectors, so it's only 1 more instruction!

Thank you all!
Back to top
View user's profile Send private message
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