From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hh4fX-00052u-8Q for qemu-devel@nongnu.org; Thu, 26 Apr 2007 10:09:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hh4fU-00052K-KZ for qemu-devel@nongnu.org; Thu, 26 Apr 2007 10:09:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hh4fU-00052H-Ff for qemu-devel@nongnu.org; Thu, 26 Apr 2007 10:09:56 -0400 Received: from nz-out-0506.google.com ([64.233.162.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hh4Zj-0001LN-Sh for qemu-devel@nongnu.org; Thu, 26 Apr 2007 10:04:00 -0400 Received: by nz-out-0506.google.com with SMTP id i11so1723980nzi for ; Thu, 26 Apr 2007 07:03:53 -0700 (PDT) Message-ID: <83a4d4ca0704260703u78a43f5co11004fc6c98dd49f@mail.gmail.com> Date: Thu, 26 Apr 2007 16:03:52 +0200 From: "Eduardo Felipe" Subject: Re: [Qemu-devel] Re: Detecting an assembly instruction in QEMU In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_96451_21280800.1177596232417" References: <83a4d4ca0704170249l83c5d7bqe0b0f8cc8b5a4a58@mail.gmail.com> <83a4d4ca0704220609m33ebfda7m825dab6d0992be28@mail.gmail.com> <83a4d4ca0704240234q6f8ecf59gbfa91432a2fee08@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_96451_21280800.1177596232417 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 2007/4/25, Atif Hashmi : > > Instructions like addl %ebx, (%eax) are also considered to be memory > refernce instructions. Do these type of instructions also refer to the > functions that you mentioned. No. You are using __asm_volatile("mov %al %al") to mark the start of your transaction and __asm_volatile("mov %bl %bl") to mark the end. What I meant is that your compiler could generate mov %al,%al or mov %bl,%bl in any other place for whatever reason when it compiles C code. Also your guest OS or any other program running in it can use these two instructions too. Both cases would affect in what you intend to do. Secondly, what is the purpose of undef ASM_SOFTMMU If ASM_SOFTMMU is defined, pure assembly memory access routines are used (faster). If it is not defined, alternative C routines are used, which are slower but easier to modify. Regards, Eduardo ------=_Part_96451_21280800.1177596232417 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

2007/4/25, Atif Hashmi <atifhashmi@gmail.com>:
Instructions like addl %ebx, (%eax) are also considered to be memory refernce instructions. Do these type of instructions also refer to the functions that you mentioned.

No. You are using __asm_volatile("mov %al %al") to mark the start of your transaction and __asm_volatile("mov %bl %bl") to mark the end. What I meant is that your compiler could generate mov %al,%al or mov %bl,%bl in any other place for whatever reason when it compiles C code. Also your guest OS or any other program running in it can use these two instructions too. Both cases would affect in what you intend to do.

Secondly, what is the purpose of undef ASM_SOFTMMU

If ASM_SOFTMMU is defined, pure assembly memory access routines are used (faster). If it is not defined, alternative C routines are used, which are slower but easier to modify.

Regards,
Eduardo
 


------=_Part_96451_21280800.1177596232417--