Received: from eggs.gnu.org ([2001:4830:134:3::10]:48665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvwuS-0007iL-QU for qemu-devel@nongnu.org; Sun, 16 Oct 2016 21:40:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvwuO-0003KK-Tn for qemu-devel@nongnu.org; Sun, 16 Oct 2016 21:40:12 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:33039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bvwuO-0003K5-Q3 for qemu-devel@nongnu.org; Sun, 16 Oct 2016 21:40:08 -0400 Received: by mail-qk0-x242.google.com with SMTP id f128so12059552qkb.0 for ; Sun, 16 Oct 2016 18:40:08 -0700 (PDT) Sender: Richard Henderson References: <1476214861-31658-1-git-send-email-rth@twiddle.net> <1476214861-31658-14-git-send-email-rth@twiddle.net> <20161016221755.GA5587@flamenco> From: Richard Henderson Message-ID: <811933e7-4519-9dc1-0dbe-543ccc103d0d@twiddle.net> Date: Sun, 16 Oct 2016 18:40:05 -0700 MIME-Version: 1.0 In-Reply-To: <20161016221755.GA5587@flamenco> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 13/35] tcg: Add atomic helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" Cc: qemu-devel@nongnu.org, alex.bennee@linaro.org On 10/16/2016 03:17 PM, Emilio G. Cota wrote: >> +#if DATA_SIZE == 1 >> > +# define END >> > +#elif defined(HOST_WORDS_BIGENDIAN) >> > +# define END _be >> > +#else >> > +# define END _le >> > +#endif > It took me a while to figure out that ATOMIC_NAME needs END (ATOMIC_NAME > is defined later in the patch). > > It might be clearer to pass it explicitly as a suffix in the macro, as in > #define ATOMIC_NAME(name, suffix) to then have ATOMIC_NAME(cmpxchg, END). Hum. Perhaps a comment? r~