From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HRwdV-0006ON-I5 for qemu-devel@nongnu.org; Thu, 15 Mar 2007 16:33:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HRwdT-0006O9-5X for qemu-devel@nongnu.org; Thu, 15 Mar 2007 16:33:20 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HRwdT-0006O6-05 for qemu-devel@nongnu.org; Thu, 15 Mar 2007 15:33:19 -0500 Received: from an-out-0708.google.com ([209.85.132.246]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HRwcQ-00050V-7L for qemu-devel@nongnu.org; Thu, 15 Mar 2007 16:32:14 -0400 Received: by an-out-0708.google.com with SMTP id d40so633272and for ; Thu, 15 Mar 2007 13:32:13 -0700 (PDT) Message-ID: Date: Thu, 15 Mar 2007 17:32:12 -0300 From: "Rodrigo Vivi" Subject: Re: [Qemu-devel] qemu-arm: wrong execution of post-indexed loads when Rm and Rd are the same register In-Reply-To: <200703152003.21276.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1173987324.9939.0.camel@edgy-laptop> <200703152003.21276.paul@codesourcery.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 Cc: Lauro Ramos Venancio Hi Paul, On 3/15/07, Paul Brook wrote: > On Thursday 15 March 2007 19:35, Lauro Ramos Venancio wrote: > > Qemu-arm is wrongly executing post-indexed loads when Rm and Rd are > > the same register. For example: > > > > ldr r0, [r1], +r0 > > > > Current behavior: > > r0 <- [r1] > > r1 <- r1 + r0 > > > > Expected behavior: > > addr <- r1 > > r1 <- r1 + r0 > > r0 <- [addr] > > This is still wrong. So, is this a known bug? > The writeback must happen after the load. We code like this because - we didn't find this restriction in arm reference manual - the LLVM uses this instruction expecting a result like this - That was the result that we got running these instructions in an OMAP1710 > Your > implementation will give incorrect results if the load faults. Another thing, is that in this manual (at page A2-18) there are 2 rules for data abort: - Base Restored Abort Model and Base Updated Abort Model. So, we can not understand why it will give incorect results if a load faults... > > Paul thanks Rodrigo Vivi vivijim at freenode > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel >