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 instructions crash

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



Joined: 15 Apr 2009
Posts: 7

PostPosted: Wed Apr 15, 2009 5:16 am    Post subject: VFPU instructions crash Reply with quote

Hi. Today i decided to rewrite some of my code to use VFPU and accidentally got a strange behavior. As soon as i add any VFPU instruction, code is crashed upon execution.
For testing, i modified GU/Lights sample from PSPSDK to compile into .PRX, added PSP_MAIN_THREAD_ATTR(THREAD_ATTR_VFPU) there, linked with pspmath library etc. And after all, i inserted single VFPU instruction "vfpu_srand(542.0f);". And as soon as i try to execute it - i get a crash :

Code:
host0:/> lights.prx
Load/Start host0:/lights.prx UID: 0x0426F813 Name: Lights Sample
host0:/> Exception - Coprocessor unusable
Thread ID - 0x0426731F
Th Name   - main_thread
Module ID - 0x0426F813
Mod Name  - Lights Sample
EPC       - 0x08807228
Cause     - 0x2000002C
BadVAddr  - 0xFFEFFDBE
Status    - 0x20088613
zr:0x00000000 at:0x2008FF00 v0:0x00000001 v1:0x00000000
a0:0x0000021E a1:0x00000008 a2:0x880E0000 a3:0x00000008
t0:0x00000001 t1:0x00000035 t2:0x00000200 t3:0x880E57F0
t4:0x0BBBFE20 t5:0x00003E0C t6:0x08805F10 t7:0x20088600
s0:0x00110000 s1:0x08810000 s2:0x00000000 s3:0xDEADBEEF
s4:0x08820000 s5:0x08920000 s6:0x08920000 s7:0x08810000
t8:0x880E5818 t9:0x00000028 k0:0x0BBBFF00 k1:0x00000000
gp:0x08821B40 sp:0x0BBBFE28 fp:0x08930000 ra:0x088042F8
0x08807228: 0x48E20000 '...H' - mtv        $v0, S000


What could cause this ? Maybe VFPU need some kind of initialization ?

P.S. Sorry for bad english.
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Wed Apr 15, 2009 5:37 am    Post subject: Reply with quote

you seem to execute an VFPU instruction in a thread where THREAD_ATTR_VFPU was not set. Which is weird since you seem to be in the main thread. :/
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