|
Same issue here with x86-64. Revision 230 also doesn't compile because of what appears to be a header that accidentally didn't get changed.
To narrow the issue down further, if you take revision 230, change line 29 of PsxCounters.h to:
extern psxCounter psxCounters[9];
(to match PcxCounters.c), and then change line 44 of x86/iR5900.h to:
#ifdef __x86_64__
#define EE_FPU_REGCACHING 1
#else
#define EE_FPU_REGCACHING 0
#endif
This prevents it from segfaulting on a 64-bit processor. I'm not saying this fixes the issue, partially because I'm sure there's a good reason why they changed that define, and partially because after doing this, Run->Execute seems to hang (You have to choose Run CD or Launch Elf instead).
This is what my own backtrace of the issue showed (after undoing the define change I mentioned):
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) backtrace
#0 0x0000000000000000 in ?? ()
#1 0x0000000000557a1d in eeFPURecompileCode (xmmcode=0x561e02 <recADDA_S_xmm>, fpucode=0, xmminfo=1216)
at ix86-64/iR5900-64.c:1221
#2 0x0000000000561e4b in recADDA_S () at iFPU.c:1010
#3 0x0000000000560e07 in recCOP1_S () at iFPU.c:323
#4 0x000000000056324d in recCOP1 () at ir5900tables.c:84
#5 0x0000000000559b20 in recompileNextInstruction (delayslot=0) at ix86-64/iR5900-64.c:2149
#6 0x000000000055ac6b in recRecompile (startpc=2147542256) at ix86-64/iR5900-64.c:2639
#7 0x000000000055e2a0 in Dispatcher () at ix86-64/aR5900-64.S:97
#8 0x000000000d02cb04 in ?? ()
#9 0x000000000055e251 in Execute_Function () at ix86-64/aR5900-64.S:59
#10 0x00002ae5289e5f50 in ?? () from /usr/local/lib/libgobject-2.0.so.0
#11 0x0000000000000000 in ?? ()
(gdb) quit
The program is running. Exit anyway? (y or n) y
One thing that seems clear, looking at the code, is that fpucode should not have equaled 0 in eeFPURecompileCode, given that it's called as a function.
In fact, looking through the code, it looks to me like the fpu isn't supposed to be used on a 64 bit processor, since it's only called as NULL on a 64 bit processor, and all the FPU functions aren't defined under x86_64. So perhaps my workaround is the way to go, after all.
Nice seeing the KH1 bug fixed in SVN, btw...
--Shanoah
Last edited by shanoah; December 8th, 2007 at 07:02.
Reason: Automerged Doublepost
|