From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvyWb-0007Fm-QS for qemu-devel@nongnu.org; Sun, 16 Oct 2016 23:23:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvyWY-0003Er-MK for qemu-devel@nongnu.org; Sun, 16 Oct 2016 23:23:41 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57043) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bvyWY-0003Ej-Gt for qemu-devel@nongnu.org; Sun, 16 Oct 2016 23:23:38 -0400 Date: Sun, 16 Oct 2016 23:23:37 -0400 From: "Emilio G. Cota" Message-ID: <20161017032337.GA17217@flamenco> References: <1476214861-31658-1-git-send-email-rth@twiddle.net> <1476214861-31658-14-git-send-email-rth@twiddle.net> <20161016221755.GA5587@flamenco> <811933e7-4519-9dc1-0dbe-543ccc103d0d@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <811933e7-4519-9dc1-0dbe-543ccc103d0d@twiddle.net> 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: Richard Henderson Cc: qemu-devel@nongnu.org, alex.bennee@linaro.org On Sun, Oct 16, 2016 at 18:40:05 -0700, Richard Henderson wrote: > 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? Yep that would do as well. Emilio