From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7qY4-00055m-92 for qemu-devel@nongnu.org; Tue, 31 May 2016 16:46:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7qY0-0007CX-Mu for qemu-devel@nongnu.org; Tue, 31 May 2016 16:45:59 -0400 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]:34721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7qY0-0007CT-HE for qemu-devel@nongnu.org; Tue, 31 May 2016 16:45:56 -0400 Received: by mail-qk0-x230.google.com with SMTP id y126so154540304qke.1 for ; Tue, 31 May 2016 13:45:56 -0700 (PDT) Sender: Richard Henderson References: <20160531183928.29406-1-bobby.prani@gmail.com> <20160531183928.29406-10-bobby.prani@gmail.com> From: Richard Henderson Message-ID: <71c9aac0-025e-a087-cd00-d31fe946d4fe@twiddle.net> Date: Tue, 31 May 2016 13:45:53 -0700 MIME-Version: 1.0 In-Reply-To: <20160531183928.29406-10-bobby.prani@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 PATCH 09/13] tcg/sparc: Add support for fence List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar , Blue Swirl , "open list:All patches CC here" Cc: alex.bennee@linaro.org, serge.fdrv@linaro.org On 05/31/2016 11:39 AM, Pranith Kumar wrote: > + case INDEX_op_mb: > + /* membar #LoadLoad|#LoadStore|#StoreStore|#StoreLoad */ > + tcg_out32(s, MEMBAR | 15); > + break; With the argument, this needs to be if (a0 == TCG_MB_WRITE) { /* #StoreStore | #StoreLoad */ a0 = 0xa; } else if (a0 == TCG_MB_READ) { /* #LoadStore | #LoadLoad */ a0 = 0x5; } else { /* #StoreStore | #LoadStore | #StoreLoad | #LoadLoad */ a0 = 0xf; } tcg_out32(s, MEMBAR | a0); r~