Open jasonyu1996 opened 5 days ago
It's a good question - we'd need to look at all the ways a new PCC can be installed - so from JALR, Xepc, Xtvec. You can certainly check for the tag and X permission when using the PCC from those sources, as if it's missing it won't be possible to execute from the target PCC. After that point there's no reason to store X and the tag, as PC incrementing, branches and immediate offset jumps can't clear it, because they all check that the target is in bounds before jumping.
It's a good question - we'd need to look at all the ways a new PCC can be installed - so from JALR, Xepc, Xtvec. You can certainly check for the tag and X permission when using the PCC from those sources, as if it's missing it won't be possible to execute from the target PCC. After that point there's no reason to store X and the tag, as PC incrementing, branches and immediate offset jumps can't clear it, because they all check that the target is in bounds before jumping.
Yes that's also my understanding. Hence the question.
According to 3.2.1:
I'm wondering if this also holds for the other checks on
pcc
. For example, can an implementation omit checks on the tag / X permission ofpcc
(or even omit storing them), since it seems to me that instructions that changepcc
already check them as well.