Re: [PATCH 4/5] x86/asm/entry/32: Replace RESTORE_RSI_RDI[_RDX] with open-coded 32-bit reads

Andy Lutomirski
2015-06-09T19:01:35Z

On Tue, Jun 9, 2015 at 11:54 AM, Denys Vlasenko <dvlasenk@redhat.com> wrote:
> This doesn't change much, but this uses shorter 32-bit insns:
>
> -48 8b 74 24 68 mov 0x68(%rsp),%rsi
> -48 8b 7c 24 70 mov 0x70(%rsp),%rdi
> -48 8b 54 24 60 mov 0x60(%rsp),%rdx
> +8b 74 24 68 mov 0x68(%rsp),%esi
> +8b 7c 24 70 mov 0x70(%rsp),%edi
> +8b 54 24 60 mov 0x60(%rsp),%edx
>
> Since these are the only uses of RESTORE_RSI_RDI[_RDX], drop these macros.
>

It probably doesn't matter for these fast paths, but, for the full
slow path return, we really do need to restore the full pt_regs.
After all, the syscall we're returning from might be sigreturn.

--Andy