Error while booting the system on MorphOS and MacOSX: unexplained cache miss
E-UAE Amiga emulation PowerPC JIT compiling implementation
Brought to you by:
racsdragon
While AmigaOS3.9 is booting the emulation quits suddenly with an error message in the console:
"JIT: Unexplained cache miss [pointer] [pointer]".
This bug cannot be reproduced on AmigaOS4, only on MorphOS and MacOSX. Probably it is related to the memory layout of these systems and it is working on AmigaOS4 by accident.
The bug is not related to any instruction emulation, it can be reproduced if only a few instructions are enabled for the JIT compiling and all the others fall back to the interpretive emulation.
I don't see this error message here on OS X.
Instead I get endless resets and a console output like this:
"reset at 0
JIT: Compiling reset
JIT: Change cache emulation: disabled
PAL mode, 50Hz (h=227 v=312)
chipmem cleared
SERIAL: period=372, baud=9600, hsyncs=16 PC=f8018a
JIT: Change cache emulation: enabled
JIT: Change cache emulation: enabled
B-Trap f201 at 00f80ca0 (0x854aca0)
reset at f80dc8
JIT: Compiling reset
JIT: Change cache emulation: disabled
PAL mode, 50Hz (h=227 v=312)
reset at f800d0
JIT: Compiling reset
JIT: Change cache emulation: disabled
PAL mode, 50Hz (h=227 v=312)
JIT: Change cache emulation: enabled
JIT: Change cache emulation: enabled
B-Trap f201 at 00f80cac (0x854aca0)
reset at f80dc8
JIT: Compiling reset
JIT: Change cache emulation: disabled
PAL mode, 50Hz (h=227 v=312)
reset at f800d0
JIT: Compiling reset
JIT: Change cache emulation: disabled
PAL mode, 50Hz (h=227 v=312)
JIT: Change cache emulation: enabled
JIT: Change cache emulation: enabled
B-Trap f201 at 00f80cac (0x854aca0)
"
Hi Tobias,
Yes, the exact manifestation of the error depends on the build environment
as it seems. Probably somehow related to either the used/preserved
registers in the code or the distances between the various parts inside the
binary/memory.
I am still investigating what is going on. I can reproduce it luckily.
Cheers,
Almos
On Feb 24, 2014 10:33 AM, "Tobias Netzel" internetzel@users.sf.net wrote:
Related
Tickets:
#30This was a tricky one. It was triggered by the distance between the main code and the code buffer: an indirect jump was compiled if the distance between the target and the jump instruction was larger than 32k. For this indirect jump the LR register was used, so this register was trashed, but the block sent the return address in the LR register. So the execution kept falling back to the block, because it couldn't get the proper return address.
This bug could also cause crashes or infinite loops as Tobias mentioned.
Still getting that infinite reset loop even after updating to the latest revision, when trying to boot Kickstart 3.1 .
It does boot when turning off macroblock optimization. I don't know if it would have booted without the fix to this bug, but it seems to be another issue.
Other testing ROMs work fine with macroblock optimization.
Just noticed that the README says that optimization currently doesn't work correctly.
Yep, that is covered in ticket #14.