qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: Porting QEMU to new hosts with unusual ABI (sizeof(long


From: Paolo Bonzini
Subject: [Qemu-devel] Re: Porting QEMU to new hosts with unusual ABI (sizeof(long) != sizeof(void *))
Date: Fri, 11 Feb 2011 13:47:47 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 02/11/2011 06:05 AM, Rob Landley wrote:
While this assumption works on QEMU's major hosts, it is not generally
true.

It is generally true.  There is exactly one operating system that
decided to go its own way, and the insane legacy reasons they did so are
explained here:

   http://blogs.msdn.com/oldnewthing/archive/2005/01/31/363790.aspx

Unix could do that because it had the luxury of having introduced 64-bit when they already were using int=long=32. So really nobody was using long until 64-bit systems came along. Windows instead has to deal with the legacy of 16-bit, when long was the only 32-bit type.

I have always agreed with you, but as much as I like LP64, I recently changed my mind on this stance. stdint.h means that there is _no reason_ why a program cannot be written portably so that it runs on both I32LP64 and IL32LLP64 models.

Someone has to do the work, of course, and it's surprising that two people (Filip Navara and now Stefan) were brave enough to try it. :) It has to be a well-audited change though, not a quick attempt at making it work.

Paolo

ps: HP-UX also uses IL32 on ia64.  Now _that_ is hard to understand.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]