From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: Joel Schopp <jschopp@linux.vnet.ibm.com>
Cc: qemu-devel@nongnu.org, Michael Tsirkin <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 7/9] asn1_input-visitor.diff
Date: Wed, 13 Mar 2013 21:53:03 -0400 [thread overview]
Message-ID: <51412D7F.1070405@linux.vnet.ibm.com> (raw)
In-Reply-To: <51412664.3080404@linux.vnet.ibm.com>
On 03/13/2013 09:22 PM, Joel Schopp wrote:
>
>>>> + case 0x41:
>>>> + case 0x40:
>>>> + num.mpn.sign = ((number.first & 0x1) != 0);
>>>> + num.mpn.biased_exponent = ~0;
>>>> + num.mpn.mantissa_low = 0;
>>>> + num.mpn.mantissa_high = 0;
>>>> + *obj = num.v_double;
>>> Is this really portable enough? In other words, do we really require
>>> that qemu only compiles on platforms where double is in IEEE format?
>>>
>> Good question. I don't know in what format the other platforms are,
>> though. I know it's used on i386, x86_64, ppc, ppc64. My guess is that
>> it would have to be a really exotic CPU to not use this standard.
>>
>> I hope this applies to ARM in general...
>> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0067d/Cihgejjg.html
>>
>>
>
> There are chips without hardware floating point, for example the ppc
> 404. However, these use software emulation of IEE floating point when
> doing floating point math. What we are looking for is a platform that
> has floating point that isn't IEEE.
>
> Cell SPE comes to mind, though I don't think qemu emulates it and it
> is a dead architecture (RIP). It also has an IEEE mode that makes its
> non-standard floating point compliant. Even in non-compliant mode the
> code above would work, it's more rounding that might be off.
>
> In summary I can't think of a platform we run on or emulate that has a
> floating point mode the above would not work on. If somebody can
> think of one please let me know so we can #ifdef a special case for
> it. Otherwise let's assume the above works for all the platforms we
> care about.
One other choice could be string-encoding as also suggested by the
standard with possible loss of precision. Though I think that any exotic
processor could be dealt with a #ifdef around the code pressing its
format into 2 bytes of exponent and 8 bytes of mantissa.
Stefan
next prev parent reply other threads:[~2013-03-14 1:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 3:09 [Qemu-devel] [PATCH 0/9 v2] Implement and test asn1 ber visitors Joel Schopp
2013-03-13 3:09 ` [Qemu-devel] [PATCH 1/9] qemu-file Joel Schopp
2013-03-13 3:09 ` [Qemu-devel] [PATCH 2/9] qapi_c_arrays.diff Joel Schopp
2013-03-13 12:08 ` Eric Blake
2013-03-13 3:09 ` [Qemu-devel] [PATCH 3/9] two new file wrappers Joel Schopp
2013-03-13 3:09 ` [Qemu-devel] [PATCH 4/9] qemu_qsb.diff Joel Schopp
2013-03-13 3:09 ` [Qemu-devel] [PATCH 5/9] qapi_sized_buffer Joel Schopp
2013-03-13 3:09 ` [Qemu-devel] [PATCH 6/9] asn1_output-visitor.diff Joel Schopp
2013-03-13 20:46 ` Eric Blake
2013-03-13 3:09 ` [Qemu-devel] [PATCH 7/9] asn1_input-visitor.diff Joel Schopp
2013-03-13 20:51 ` Eric Blake
2013-03-13 21:20 ` Stefan Berger
2013-03-14 1:22 ` Joel Schopp
2013-03-14 1:53 ` Stefan Berger [this message]
2013-03-13 3:09 ` [Qemu-devel] [PATCH 8/9] asn1_test_visitor_serialization.diff Joel Schopp
2013-03-13 3:09 ` [Qemu-devel] [PATCH 9/9] update_maintainers.diff Joel Schopp
2013-03-13 20:53 ` Eric Blake
-- strict thread matches above, loose matches on Subject: below --
2013-03-13 18:56 [Qemu-devel] [PATCH 0/9 v3] Implement and test asn1 ber visitors Joel Schopp
2013-03-13 18:56 ` [Qemu-devel] [PATCH 7/9] asn1_input-visitor.diff Joel Schopp
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=51412D7F.1070405@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=jschopp@linux.vnet.ibm.com \
--cc=mst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.