From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by ozlabs.org (Postfix) with ESMTP id 1AD4FB6F64 for ; Thu, 11 Aug 2011 18:45:46 +1000 (EST) From: Andreas Schwab To: Joakim Tjernlund Subject: Re: [RFC] Optimize __arch_swab32 and __arch_swab16 References: Date: Thu, 11 Aug 2011 10:45:42 +0200 In-Reply-To: (Joakim Tjernlund's message of "Thu, 11 Aug 2011 10:13:34 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Joakim Tjernlund writes: > unsigned short my__arch_swab16(unsigned short value) > { > __asm__("rlwimi %0,%0,16,0x00ff0000" > : "+r" (value)); You are creating a value that does not fit in a short. Andreas. -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different."