Received: from eggs.gnu.org ([2001:4830:134:3::10]:55745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN5nT-00049g-Nn for qemu-devel@nongnu.org; Thu, 07 Dec 2017 18:41:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eN5nO-0003M4-ON for qemu-devel@nongnu.org; Thu, 07 Dec 2017 18:41:43 -0500 Sender: Richard Henderson References: <20171207165355.7559-1-david@redhat.com> <20171207165355.7559-2-david@redhat.com> From: Richard Henderson Message-ID: Date: Thu, 7 Dec 2017 15:41:34 -0800 MIME-Version: 1.0 In-Reply-To: <20171207165355.7559-2-david@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 for-2.12 01/10] s390x/tcg: ASI/ASGI are atomic with interlocked-acccess facility 1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Hildenbrand , qemu-s390x@nongnu.org, qemu-devel@nongnu.org Cc: Christian Borntraeger , Cornelia Huck , Alexander Graf On 12/07/2017 08:53 AM, David Hildenbrand wrote: > +static ExitStatus op_asi(DisasContext *s, DisasOps *o) > +{ > + o->in1 = tcg_temp_new_i64(); > + /* Perform the atomic addition in memory. */ > + tcg_gen_atomic_fetch_add_i64(o->in1, o->addr1, o->in2, get_mem_index(s), > + s->insn->data); > + /* However, we need to recompute the addition for setting CC. */ > + tcg_gen_add_i64(o->out, o->in1, o->in2); > + return NO_EXIT; > +} Is it worth conditionalizing the atomic operation on having interlocked-access-facility-1 enabled? r~