From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32499 invoked by alias); 22 Sep 2007 15:23:58 -0000 Received: (qmail 32489 invoked by uid 22791); 22 Sep 2007 15:23:58 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 22 Sep 2007 15:23:55 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IZ6np-0007fo-GS for ecos-discuss@sources.redhat.com; Sat, 22 Sep 2007 15:21:53 +0000 Received: from grante.dsl.visi.com ([208.42.141.248]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Sep 2007 15:21:53 +0000 Received: from grante by grante.dsl.visi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 Sep 2007 15:21:53 +0000 To: ecos-discuss@sources.redhat.com From: Grant Edwards Date: Sat, 22 Sep 2007 15:23:00 -0000 Message-ID: References: <20070922122026.GA5875@ubuntu> User-Agent: slrn/0.9.8.1 (Linux) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: CGY_SWAP16() seems broken to me. X-SW-Source: 2007-09/txt/msg00124.txt.bz2 On 2007-09-22, Grant Edwards wrote: > My fix above should be completely transparent. if the value is > being assigned to a 16 bit lvalue, the compiler will generate > exactly the same code as when using the existing "broken" > macro. If the result from CYG_SWAP16() is being masked by the > user, the fixed macro will generate exactly the same code as > the existing macro. > > The only argument against my fix would be to claim that > CYG_SWAP16 is expected to return 24 bits in wider contexts, and > returning only 16 bits is going to break code or surprise a > user. I've examined all uses of SWAP16 and the LE16/BE16 macros in my source tree (which is a few months out of date), and it doesn't look like any existing code depends on the fact that SWAP16() produces 24 bits instead of 16. -- Grant Edwards grante Yow! An INK-LING? Sure -- at TAKE one!! Did you BUY any visi.com COMMUNIST UNIFORMS?? -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss