[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 05/10] x86/HVM: use unambiguous register names



On 20/12/2016 10:39, Jan Beulich wrote:
> @@ -3032,16 +3032,16 @@ void hvm_task_switch(
>      if ( hvm_set_cr3(tss.cr3, 1) )
>          goto out;
>  
> -    regs->eip    = tss.eip;
> -    regs->eflags = tss.eflags | 2;
> -    regs->eax    = tss.eax;
> -    regs->ecx    = tss.ecx;
> -    regs->edx    = tss.edx;
> -    regs->ebx    = tss.ebx;
> -    regs->esp    = tss.esp;
> -    regs->ebp    = tss.ebp;
> -    regs->esi    = tss.esi;
> -    regs->edi    = tss.edi;
> +    regs->rip    = tss.eip;
> +    regs->rflags = tss.eflags | 2;

As you are modifying this anyway, mind avoiding this opencoding?

~Andrew

> +    regs->rax    = tss.eax;
> +    regs->rcx    = tss.ecx;
> +    regs->rdx    = tss.edx;
> +    regs->rbx    = tss.ebx;
> +    regs->rsp    = tss.esp;
> +    regs->rbp    = tss.ebp;
> +    regs->rsi    = tss.esi;
> +    regs->rdi    = tss.edi;
>  
>      exn_raised = 0;
>      if ( hvm_load_segment_selector(x86_seg_es, tss.es, tss.eflags) ||
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.