qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] softfloat breaks cocoa.m


From: Andreas Färber
Subject: Re: [Qemu-devel] softfloat breaks cocoa.m
Date: Sun, 28 Aug 2011 15:34:25 +0200

Am 28.08.2011 um 15:02 schrieb Alexander Graf:

On 28.08.2011, at 07:09, Andreas Färber wrote:

Any thoughts on how to proceed? My previous approach for Haiku, to replace non-standard uint16 with POSIX uint_fast16_t etc., was rejected to avoid system-dependent widths. I'd really like to get rid of the annoyingly conflicting naming though (int vs. long for 32, int vs. short for 16, ...).

I'm not sure what you mean by system-dependent widths?

The core issue is this: uint16 in fpu/ does not mean uint16_t but "at least 16 bits wide" (int). Apart from the BeOS/Haiku i386 ABI being strange in using long for uint32, most uses of uint16 elsewhere mean "exactly 16 bits wide", leading to type conflicts.

POSIX has two types for such least-width semantics: uint_least16_t and uint_fast16_t. We ran into the issue that a patch compiled on Darwin/ ppc64 but broke on Linux/x86_64 or i386, so Aurelien considered it too risky to use types whose actual width depends on the host system within my series.

This is only a naming collision issue, right? Can't we just name the types something more qemu specific?

We could, sure. I you agree on a replacement type, I'll happily supply patches to do the conversion.

Part of the problem was that, e.g., uint16 and int are being used interchangably in declaration and implementation. I'll look into introducing matching uint16 etc. where necessary, so that the actual conversion can be done by regex.

Andreas


reply via email to

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