Received: from eggs.gnu.org ([2001:4830:134:3::10]:49129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7qTZ-0003R5-8o for qemu-devel@nongnu.org; Tue, 31 May 2016 16:41:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7qTW-0006Bj-0m for qemu-devel@nongnu.org; Tue, 31 May 2016 16:41:21 -0400 Received: from mail-qk0-x232.google.com ([2607:f8b0:400d:c09::232]:33983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7qTV-0006Bd-Sa for qemu-devel@nongnu.org; Tue, 31 May 2016 16:41:17 -0400 Received: by mail-qk0-x232.google.com with SMTP id y126so154434047qke.1 for ; Tue, 31 May 2016 13:41:17 -0700 (PDT) Sender: Richard Henderson References: <20160531183928.29406-1-bobby.prani@gmail.com> <20160531183928.29406-8-bobby.prani@gmail.com> From: Richard Henderson Message-ID: Date: Tue, 31 May 2016 13:41:14 -0700 MIME-Version: 1.0 In-Reply-To: <20160531183928.29406-8-bobby.prani@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 PATCH 07/13] tcg/ppc: Add support for fence List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar , "Vassili Karpov (malc)" , "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: > +#define HWSYNC XO31(598) > +#define LWSYNC (HWSYNC | (1u << 21)) ... > + case INDEX_op_mb: > + /* ??? Do we want SEQ_CST or ACQ_REL memory model. */ > + tcg_out32(s, HWSYNC); > + break; With the flags argument, this needs to be #define EIEIO XO31(854) a0 = args[0]; if (a0 == TCG_MB_WRITE) { tcg_out32(s, EIEIO); } else if (a1 == TCG_MB_READ) { tcg_out32(s, LWSYNC); } else { tcg_out32(s, HWSYNC); } r~