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 

[QUESTION] How to flush instruction cache?

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



Joined: 30 Sep 2006
Posts: 65

PostPosted: Wed Dec 23, 2009 11:19 am    Post subject: [QUESTION] How to flush instruction cache? Reply with quote

Hi, i am trying to test the psx4all port for Dingoo on the PSP to learn about the mips recompiler it is using. But i found it uses the function cacheflush defined in sys/cachectl.h to flush the instruction cache, and it seems it isnīt available on the pspsdk. I found more about it here cacheflush

Is there an instruction to flush the instruction cache on the PSP?.

Thanks in advance.
Back to top
View user's profile Send private message
psPea



Joined: 01 Sep 2007
Posts: 64

PostPosted: Wed Dec 23, 2009 11:41 am    Post subject: Reply with quote

sceKernelIcacheInvalidateAll()
it requires kernel mode i believe
_________________
Click ME!
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Wed Dec 23, 2009 7:48 pm    Post subject: Reply with quote

Following the description of cacheflush, it would rather be
sceKernelDCacheInvalidateRange(*addr, size);
sceKernelICacheInvalidateRange(*addr, size);
or
sceKernelDCacheWritebackInvalidateRange(*addr, size);
sceKernelICacheWritebackInvalidateRange(*addr, size);
depending on need.

Write a wrapper function and and it should be ok.
_________________
<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
theHobbit



Joined: 30 Sep 2006
Posts: 65

PostPosted: Thu Dec 24, 2009 12:59 am    Post subject: Reply with quote

Thanks for your answers, i will test those :).
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Thu Dec 24, 2009 10:36 pm    Post subject: Reply with quote

sheeh, another guy trying to port it... a port of a port of a port... dude, it's like redoing ps1p or psxp...
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