BigEd wrote:
But branches have two possible successor PCs. Is there a tricky case with the byte following a taken branch? If the branch is never taken, that might be data, already speculatively copied because of indexing. But it might be code, if the branch will later not to be taken, and yet it's now non-zero so it won't be trapped.
Quote:
Is there another tricky case with an RTS that uses pushed constants? You'll capture the first case you see, but later cases with different constants could miss the trap, for the same reason: the destination was speculatively copied because there's nearby data accessed with an index mode.
Quote:
(There's another trick people use, but I don't think it causes any trouble: a JSR which is followed by constant data, read by pulling the PC and adjusting it.)
Dangit, I don't have the time to start a new project, but this one is very tempting. It all seems to check out, and isn't super complex. It's very RAM-heavy, though.