ia64/xen-unstable

changeset 13611:e68bf334ecb8

32-on-64: All argument registers must be zero extended to 64 bits
(%rdx was missed).
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Jan 24 18:20:24 2007 +0000 (2007-01-24)
parents 2932d0e7c554
children bc7363b9b892
files xen/arch/x86/x86_64/compat/entry.S
line diff
     1.1 --- a/xen/arch/x86/x86_64/compat/entry.S	Wed Jan 24 18:06:14 2007 +0000
     1.2 +++ b/xen/arch/x86/x86_64/compat/entry.S	Wed Jan 24 18:20:24 2007 +0000
     1.3 @@ -16,7 +16,8 @@ ENTRY(compat_hypercall)
     1.4          jae   compat_bad_hypercall
     1.5  #ifndef NDEBUG
     1.6          /* Deliberately corrupt parameter regs not used by this hypercall. */
     1.7 -        pushq UREGS_rbx(%rsp); pushq %rcx; pushq %rdx; pushq %rsi; pushq %rdi; pushq UREGS_rbp+5*8(%rsp)
     1.8 +        pushq UREGS_rbx(%rsp); pushq %rcx; pushq %rdx; pushq %rsi; pushq %rdi
     1.9 +        pushq UREGS_rbp+5*8(%rsp)
    1.10          leaq  compat_hypercall_args_table(%rip),%r10
    1.11          movq  $6,%rcx
    1.12          subb  (%r10,%rax,1),%cl
    1.13 @@ -28,11 +29,13 @@ ENTRY(compat_hypercall)
    1.14          pushq %rax
    1.15          pushq UREGS_rip+8(%rsp)
    1.16  #else
    1.17 -        movl  %eax,%eax
    1.18 -        movl  %ebp,%r9d
    1.19 -        movl  %edi,%r8d
    1.20 -        xchgl  %ecx,%esi
    1.21 -        movl  UREGS_rbx(%rsp),%edi
    1.22 +        /* Relocate argument registers and zero-extend to 64 bits. */
    1.23 +        movl  %eax,%eax              /* Hypercall #  */
    1.24 +        movl  UREGS_rbx(%rsp),%edi   /* Arg 1        */
    1.25 +        xchgl %ecx,%esi              /* Arg 2, Arg 4 */
    1.26 +        movl  %edx,%edx              /* Arg 3        */
    1.27 +        movl  %edi,%r8d              /* Arg 5        */
    1.28 +        movl  %ebp,%r9d              /* Arg 6        */
    1.29  #endif
    1.30          leaq  compat_hypercall_table(%rip),%r10
    1.31          PERFC_INCR(PERFC_hypercalls, %rax)