On Tue, 23 Nov 2021 at 17:40, Richard Henderson <[email protected]> wrote: > > We don't need a register that can live across the syscall; > we only need a register that can live until the syscall.
What about the case where: * we execute the sc instruction (r11 trashed) * the syscall is one that from the host kernel point of view is restartable * the kernel arranges to restart the syscall by rewinding the PC to point to the start of the 'sc' instruction * our rewind_if_in_safe_syscall() rewinds PC further to point at safe_syscall_start * we want to use r11 again, but it was trashed in step 1 ? Put another way, this patch is effectively a revert of commit 5d9f3ea081721, which was a fix to an observed bug. -- PMM
