From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTzY9-0005iN-2r for qemu-devel@nongnu.org; Tue, 07 Jun 2011 12:54:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTzY7-0004gf-GT for qemu-devel@nongnu.org; Tue, 07 Jun 2011 12:54:40 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:58041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTzY7-0004gZ-2R for qemu-devel@nongnu.org; Tue, 07 Jun 2011 12:54:39 -0400 Received: by gyg4 with SMTP id 4so2534458gyg.4 for ; Tue, 07 Jun 2011 09:54:38 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DEE57CA.8070902@twiddle.net> Date: Tue, 07 Jun 2011 09:54:34 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1307370348-28400-1-git-send-email-pbonzini@redhat.com> <1307370348-28400-4-git-send-email-pbonzini@redhat.com> <4DED3109.1070902@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 3/3] move unaligned memory access functions to bswap.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Paolo Bonzini , qemu-devel@nongnu.org On 06/06/2011 04:07 PM, malc wrote: > Depends on how bswap_16 is defined. If it is __builtin_bswap16 > then 4.5.0 and 4.6.0 generate byte reversed loads, and previous > versions lack that builtin, so i don't think this generic code > should go in. It would continue to be defined as-is, without direct reference to the __builtin_bswap functions. But you're right that the generic code would depend on the bswap optimization pass that recognizes the mask/shift/or pattern and converts it to the builtins internally. What if we kept the ppc ifdefs, but converted the rest to the gcc generic code? r~