From: Blue Swirl <blauwirbel@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: Porting QEMU to new hosts with unusual ABI (sizeof(long) != sizeof(void *))
Date: Fri, 11 Feb 2011 20:50:14 +0200 [thread overview]
Message-ID: <AANLkTinWJLYska8HChFhNBByO+dq7opoOXFe+3DoMw_U@mail.gmail.com> (raw)
In-Reply-To: <4D552FF3.2040006@redhat.com>
On Fri, Feb 11, 2011 at 2:47 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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.
IIRC also Unix was in that situation once (short = int =16, long = 32 bits).
> 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.
Using intptr_t is not different from using long. There's also the
advantage that it is a bit more specific.
> 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.
I'd still be interested to know if QEMU runs on win64. But even if it
doesn't, changing longs to intptr_t and unsigned longs to uintptr_t is
harmless enough that it should be applied nevertheless. Even if
everybody stopped all win32/64 work after that, nothing would be lost
except maybe some beauty in some beholder's eyes.
next prev parent reply other threads:[~2011-02-11 18:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-05 14:39 [Qemu-devel] Porting QEMU to new hosts with unusual ABI (sizeof(long) != sizeof(void *)) Stefan Weil
2011-02-05 15:35 ` [Qemu-devel] " Blue Swirl
2011-02-05 21:47 ` Stefan Weil
2011-02-07 7:23 ` Markus Armbruster
2011-02-07 17:51 ` Stefan Weil
2011-02-07 18:16 ` Markus Armbruster
2011-02-05 16:03 ` [Qemu-devel] " Stefan Hajnoczi
2011-02-05 17:40 ` Stefan Weil
2011-02-11 5:05 ` Rob Landley
2011-02-11 12:47 ` [Qemu-devel] " Paolo Bonzini
2011-02-11 13:04 ` Tristan Gingold
2011-02-11 18:50 ` Blue Swirl [this message]
2011-02-11 19:28 ` malc
2011-02-11 8:24 ` [Qemu-devel] " Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinWJLYska8HChFhNBByO+dq7opoOXFe+3DoMw_U@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).