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 

seg fault with optimisation

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



Joined: 22 Jul 2005
Posts: 7

PostPosted: Fri Jul 22, 2005 10:01 pm    Post subject: seg fault with optimisation Reply with quote

Hi,
I tried to compile neocdpsp0.5 (http://yoyofr92.free.fr/psp/files/neocdpsp-0.5.src.zip), the original dev says he compiled it with svn 690, as I can't find a way to get this version, I compiled with the last psptoolchain stuff (svn 724) and I'm getting this error
with the original -O3
Code:
psp-gcc  -Isrc -Isrc/psp -Isrc/zip -Isrc/zlib -Isrc/68k -Isrc/z80 -Isrc/video -Isrc/libmad -I. -I/usr/local/pspdev/psp/s
dk/include -O3 -g -fstrict-aliasing -DINLINE="static inline" -DLOWERCASEFILES -include src/psp/floatonly.h -DCPU68K_USE_
C68K -D_PSPyo_ -DZ80_EMULATED  -DSOUND -DENABLE_CDDA -DUSE_PD4990A -DUSE_MEMCARD -DFPM_MIPS -DPSP_MODE -DVIDEO_PSP -c sr
c/68k/c68k/c68kexec.c -oobj/68k/c68k/c68kexec.o
src/68k/c68k/c68kexec.c: In function 'C68k_Exec':
src/68k/c68k/c68kexec.c:268: internal compiler error: Segmentation fault

I can only get this file compiled at -O0 and it's ultra slow ^^, so I compiled everything execpt c68kexec.o with -O3 but it's still a bit slower than the original.
Back to top
View user's profile Send private message
Agoln



Joined: 08 Jun 2005
Posts: 326
Location: Fort Wayne, IN

PostPosted: Fri Jul 22, 2005 11:08 pm    Post subject: Reply with quote

you can checkout 690 by doing a svn checkout -r 690 [url here]
_________________
Lego of my Ago!
Back to top
View user's profile Send private message AIM Address
radius



Joined: 22 Jul 2005
Posts: 7

PostPosted: Sat Jul 23, 2005 12:00 am    Post subject: Reply with quote

Agoln wrote:
you can checkout 690 by doing a svn checkout -r 690 [url here]

Eheh thanks Agoln :)
Back to top
View user's profile Send private message
radius



Joined: 22 Jul 2005
Posts: 7

PostPosted: Sat Jul 23, 2005 12:26 am    Post subject: Reply with quote

hum I downloaded 690 and done ./bootstrap; ./configure; ./make clean; ./make
I tried compiling again and i got the same, is it enought to replace the "old" one ?
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sat Jul 23, 2005 2:18 am    Post subject: Reply with quote

Just a note, excessive inlining (-O3) on the PSP is not a good idea. The reason is that the PSP has a tiny I-cache (16KB), so by the time you restart your inlined loop you're reloading that part into the cache anyway. I suspect C68k_Exec() is the main CPU loop, which is bigger than 16KB. I had problems in VisualBoyAdvance with a file that had tons of inlining (the compiler would run out of memory). I made a few of the heavily-used inline functions static, and it compiles that file fine now. That may work for you.

I'd recommend always using the -O2 option (or -Os) as that usually gives the right balance between size and speed. All of that -O3 inlining is only good for CPU's with large caches, such as the x86.
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