qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Use a hex string


From: Anthony Liguori
Subject: Re: [Qemu-devel] Use a hex string
Date: Mon, 23 May 2011 21:50:28 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10

On 05/23/2011 06:02 PM, Jamie Lokier wrote:
Richard W.M. Jones wrote:
The problem is to be able to send 64 bit memory and disk offsets
faithfully.  This doesn't just fail to solve the problem, it's
actually going to make it a whole lot worse.

Such offsets would be so much more readable in hexadecimal.

So why not use a string "0xffff800012340000" instead?

This doesn't change the fundamental issue here. Javascript's internal representation for integers isn't 2s compliment, but IEEE794. This means the expectations about how truncation/overflow is handled is fundamentally different.

Regards,

Anthony Liguori


That is universally Javascript compatible as well as much more
convenient for humans.

Or at least, *accept* a hex string wherever a number is required by
QMP (just because hex is convenient anyway, no compatibility issue),
and *emit* a hex string where the number may be out of Javascript's
unambiguous range, or where a hex string would make more sense anyway.

-- Jamie





reply via email to

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