From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqQ2L-0005GQ-00 for qemu-devel@nongnu.org; Thu, 07 May 2015 13:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqQ2F-0005Os-UE for qemu-devel@nongnu.org; Thu, 07 May 2015 13:56:40 -0400 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]:33602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqQ2F-0005Oo-Qf for qemu-devel@nongnu.org; Thu, 07 May 2015 13:56:35 -0400 Received: by qkx62 with SMTP id 62so32783464qkx.0 for ; Thu, 07 May 2015 10:56:35 -0700 (PDT) Sender: Richard Henderson Message-ID: <554BA74E.9060206@twiddle.net> Date: Thu, 07 May 2015 10:56:30 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1430926687-25875-1-git-send-email-a.rigo@virtualopensystems.com> <1430926687-25875-4-git-send-email-a.rigo@virtualopensystems.com> In-Reply-To: <1430926687-25875-4-git-send-email-a.rigo@virtualopensystems.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 3/5] softmmu: Add helpers for a new slow-path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alvise Rigo , qemu-devel@nongnu.org Cc: mttcg@greensocs.com, jani.kokkonen@huawei.com, tech@virtualopensystems.com, claudio.fontana@huawei.com On 05/06/2015 08:38 AM, Alvise Rigo wrote: > +#define DATA_SIZE (1 << SHIFT) > + > +#if DATA_SIZE == 8 > +#define SUFFIX q > +#define LSUFFIX q > +#define SDATA_TYPE int64_t > +#define DATA_TYPE uint64_t Duplicating all of the stuff from softmmu_template.h is Just Wrong. > +/* For the benefit of TCG generated code, we want to avoid the complication > + of ABI-specific return type promotion and always return a value extended > + to the register size of the host. This is tcg_target_long, except in the > + case of a 32-bit host and 64-bit data, and for that we always have > + uint64_t. Don't bother with this widened value for SOFTMMU_CODE_ACCESS. */ ... > +uint32_t helper_le_stcond_name(CPUArchState *env, target_ulong addr, > + DATA_TYPE val, int mmu_idx, uintptr_t retaddr) You didn't even read the comment above re the return type. > + /* Another vCPU has accessed the memory after the LoadLink or not link > + * has been previously set. */ > + ret = 1; > + goto out; > + } > + > + helper_st_legacy(env, addr, val, mmu_idx, retaddr); > + > + /* Set the page as dirty to avoid the creation of TLB entries with the > + * TLB_EXCL bit set. */ > + cpu_physical_memory_set_excl_dirty(ram_addr); > + > + /* The StoreConditional succeeded */ > + ret = 0; How did you come up with 0 == success, 1 = failure? Is this an arm-ism? r~