| View previous topic :: View next topic |
| Author |
Message |
radius
Joined: 22 Jul 2005 Posts: 7
|
Posted: Fri Jul 22, 2005 10:01 pm Post subject: seg fault with optimisation |
|
|
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 |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Fri Jul 22, 2005 11:08 pm Post subject: |
|
|
you can checkout 690 by doing a svn checkout -r 690 [url here] _________________ Lego of my Ago! |
|
| Back to top |
|
 |
radius
Joined: 22 Jul 2005 Posts: 7
|
Posted: Sat Jul 23, 2005 12:00 am Post subject: |
|
|
| Agoln wrote: | | you can checkout 690 by doing a svn checkout -r 690 [url here] |
Eheh thanks Agoln :) |
|
| Back to top |
|
 |
radius
Joined: 22 Jul 2005 Posts: 7
|
Posted: Sat Jul 23, 2005 12:26 am Post subject: |
|
|
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 |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Sat Jul 23, 2005 2:18 am Post subject: |
|
|
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 |
|
 |
|