qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] What's the meaning and the functionality of the assembly in


From: 鏇硅幑
Subject: [Qemu-devel] What's the meaning and the functionality of the assembly instructions in the beginning of cpu_exec?
Date: Mon, 31 May 2010 12:22:40 +0800 (CST)

I’m working with Qemu source study, but now I have some difficulty in these assembly instructions at the beginning of cpu_exec function. My question as follows:

 

After entering function cpu_exec, there are some assembly codes:

 

register host_reg_t reg_AREG0 asm("ebp");

volatile host_reg_t saved_AREG0;

      

register host_reg_t reg_AREG1 asm("ebx");

volatile host_reg_t saved_AREG1;

      

register host_reg_t reg_AREG2 asm("esi");

volatile host_reg_t saved_AREG2;

      

register host_reg_t reg_AREG3 asm("edi");

volatile host_reg_t saved_AREG3;

 

and there is also:

__asm__ __volatile__ ("" : "=r" (reg_AREG0));

saved_AREG0 = reg_AREG0;

             

__asm__ __volatile__ ("" : "=r" (reg_AREG1));

saved_AREG1 = reg_AREG1;

             

__asm__ __volatile__ ("" : "=r" (reg_AREG2));

saved_AREG2 = reg_AREG2;

             

__asm__ __volatile__ ("" : "=r" (reg_AREG3));

saved_AREG3 = reg_AREG3;

 

Where are variables: reg_AREG-, saved_AREG- defined and how they are used in the later codes? I really understand these assembly codes’ functionality. Do they use for Qemu virtual register mapping or translating optimization? Could anyone give me some advise, thank. Thank you very much for your help.




网易为中小企业免费提供企业邮箱(自主域名)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]