6502 Emulation - The Jump Indirect Bug
6 points by markjamesm
6 points by markjamesm
There was a similar bug in the ARM Cortex-A8 processor where a 32bit thumb2 branch that spanned a page boundary would go wrong - IIRC it computed an incorrect branch target or something similar.
[edit: I actually looked it up, it's errata 657417 and apparently it could also deadlock the processor in some configurations]
Yeah, ARM 657417 is similar. It is worked around by ld --fix-cortex-a8.
Intel JCC Erratum (SKX102) is a related but less similar one involving jump instructions that span across 64-byte boundaries. To mitigate performance degradation after a microcode workaround, -mbranches-within-32B-boundaries is an assembler workaround that avoids branches crossing or against 32-byte boundaries.
JSC had a work around for it that I think lived on for a long, long time despite never shipping on hardware that had this errata (at least for anything I worked on). JSC's JIT used to support a lot of backends (even super h :D )