On 10/25/21 2:24 AM, LIU Zhiwei wrote:
I think extending on write is the correct thing.

Thanks. I will pick this way.

Jumps, exception entry and return, gdb write.

If we carefully process jumps and gdb write, I think we can omit exception entry and return. Is it right?

No, though you'd probably have to create a special test case to see it.

On exception return, a 64-bit OS can write a 64-bit value into SEPC. But when SEPC is copied to PC during SRET, UXL should be examined and the assignment should extend for a 32-bit user program.

Exception entry would seem to be limited on its face by SXLEN; STVEC will always contain the same number of bits as PC, so no (additional) extension would be required. But we do have to be careful to interpret the target_ulong value properly for the current SXLEN.


r~

Reply via email to