Received: from [140.186.70.92] (port=34411 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmLRZ-0002ka-37 for qemu-devel@nongnu.org; Mon, 07 Feb 2011 02:23:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmLRX-0003d5-B2 for qemu-devel@nongnu.org; Mon, 07 Feb 2011 02:23:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmLRX-0003cf-4N for qemu-devel@nongnu.org; Mon, 07 Feb 2011 02:23:27 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] Re: Porting QEMU to new hosts with unusual ABI (sizeof(long) != sizeof(void *)) References: <4D4D612F.2010904@mail.berlios.de> <4D4DC570.8080204@mail.berlios.de> Date: Mon, 07 Feb 2011 08:23:08 +0100 In-Reply-To: <4D4DC570.8080204@mail.berlios.de> (Stefan Weil's message of "Sat, 05 Feb 2011 22:47:28 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Blue Swirl , QEMU Developers Stefan Weil writes: > Am 05.02.2011 16:35, schrieb Blue Swirl: [...] >> The patch changes also signed longs to uintptr_t. That could introduce >> regressions, so please use signed/unsigned as original. > > I changed the code manually, and there was only one location where > signed/unsigned made a difference. That single case was an int > parameter passed in a void pointer, and I used intptr_t there. > > I had the impression that in the current code (long) was > sometimes used because it is shorter than (unsigned long) :-) > > As long as changes are made manually with the necessary care, > I'd recommend using uintptr_t where possible. I'd recommend not to mix up the intptr portability clean up with the signedness cleanup. Much easier to review separately. Moreover, cleaning up signedness changes generated code, while cleaning up the types shouldn't (except on hosts where the code doesn't work). Testable, just don't forget to strip the debug info. [...]