From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bl3gF-0002gP-BF for qemu-devel@nongnu.org; Fri, 16 Sep 2016 20:40:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bl3gA-0003Lk-BP for qemu-devel@nongnu.org; Fri, 16 Sep 2016 20:40:31 -0400 Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]:35792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bl3gA-0003LQ-7i for qemu-devel@nongnu.org; Fri, 16 Sep 2016 20:40:26 -0400 Received: by mail-yw0-x242.google.com with SMTP id u82so5034325ywc.2 for ; Fri, 16 Sep 2016 17:40:26 -0700 (PDT) Sender: Richard Henderson References: <1474048017-26696-1-git-send-email-rth@twiddle.net> <1474048017-26696-31-git-send-email-rth@twiddle.net> <20160917001651.GA22240@flamenco> From: Richard Henderson Message-ID: <7d487b66-7b47-b890-be14-3d9975880e57@twiddle.net> Date: Fri, 16 Sep 2016 17:40:22 -0700 MIME-Version: 1.0 In-Reply-To: <20160917001651.GA22240@flamenco> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 30/35] target-arm: emulate aarch64's LL/SC using cmpxchg helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" Cc: qemu-devel@nongnu.org On 09/16/2016 05:16 PM, Emilio G. Cota wrote: >> > + uint64_t *haddr = g2h(addr); >> > + o0 = ldq_le_p(haddr + 0); >> > + o1 = ldq_le_p(haddr + 1); >> > + oldv = int128_make128(o0, o1); >> > + >> > + success = int128_eq(oldv, cmpv); >> > + if (success) { >> > + stq_le_p(haddr + 0, int128_getlo(newv)); >> > + stq_le_p(haddr + 8, int128_gethi(newv)); > Shouldn't this be + 1 instead, just like the above load? > > If so, the same applies to the store in the _be function. Yep, good catch. r~