From: "Andreas Färber" <andreas.faerber@web.de>
To: Peter Maydell <peter.maydell@linaro.org>,
Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 06/11] target-i386: use floatx80 constants in helper_fld*_ST0()
Date: Sun, 29 May 2011 13:43:55 +0200 [thread overview]
Message-ID: <4DE2317B.7050701@web.de> (raw)
In-Reply-To: <DAB1A1B6-2E54-4CBD-87D2-D6908790AC64@web.de>
Am 21.05.11 11:35, schrieb Andreas Färber:
> Am 20.05.2011 um 12:32 schrieb Peter Maydell:
>
>> On 15 May 2011 15:13, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>> Instead of using a table which doesn't correspond to anything from
>>> physical in the CPU, use directly the constants in helper_fld*_ST0().
>>
>> Actually I rather suspect there is effectively a table in the CPU
>> indexed by the last 3 bits of the FLD* opcode... It would be
>> possible to implement this group of insns in QEMU with a single
>> helper function that took the index into the array, but since the
>> array seems to be causing weird compilation problems we might
>> as well stick with the lots-of-helpers approach, at which point
>> this is a sensible cleanup.
>
> In OpenBIOS we once ran into a similar error on ppc64 where a cast
> would've resulted in the truncation of a static pointer ... could this
> be an alignment issue here, that it's being truncated by the floatx80
> cast? I tried using __attribute__((packed)) on the floatx80 type
> without luck.
> Or maybe the constant width is being handled weird, with LL being 128
> bits rather than the expected 64 bits? ;)
Some more info:
The issue only pops up with -std=c99 or -std=gnu99, with both gcc 3.4.3
and 4.3.2. That's reproducible on Darwin gcc 4.0.1 and 4.2 as well.
The following trivial sample program triggers it, there's no magic
Solaris headers involved:
#include <inttypes.h>
// on OpenSolaris:
// typedef unsigned short uint16_t;
// typedef unsigned long long uint64_t;
typedef struct {
uint64_t low;
uint16_t high;
} floatx80;
#define make_floatx80(exp, mant) ((floatx80) { mant, exp })
#define floatx80_l2t make_floatx80( 0x4000, 0xd49a784bcd1b8afeLL )
static const floatx80 mine[1] = {
floatx80_l2t,
};
int main(void)
{
}
Any thoughts?
Andreas
next prev parent reply other threads:[~2011-05-29 11:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-15 14:13 [Qemu-devel] [PATCH 00/11] softfloat-native removal and i386 improvements Aurelien Jarno
2011-05-15 14:13 ` [Qemu-devel] [PATCH 01/11] target-ppc: remove old CONFIG_SOFTFLOAT #ifdef Aurelien Jarno
2011-05-20 10:01 ` Peter Maydell
2011-05-15 14:13 ` [Qemu-devel] [PATCH 02/11] target-mips/gdbstub: " Aurelien Jarno
2011-05-15 14:29 ` Peter Maydell
2011-05-15 15:46 ` Aurelien Jarno
2011-05-15 14:13 ` [Qemu-devel] [PATCH 03/11] softfloat-native: remove Aurelien Jarno
2011-05-20 10:06 ` Peter Maydell
2011-05-15 14:13 ` [Qemu-devel] [PATCH 04/11] softfloat: always enable floatx80 and float128 support Aurelien Jarno
2011-05-20 10:09 ` Peter Maydell
2011-05-15 14:13 ` [Qemu-devel] [PATCH 05/11] target-i386: remove old code handling float64 Aurelien Jarno
2011-05-20 10:21 ` Peter Maydell
2011-05-15 14:13 ` [Qemu-devel] [PATCH 06/11] target-i386: use floatx80 constants in helper_fld*_ST0() Aurelien Jarno
2011-05-15 21:17 ` Andreas Färber
2011-05-20 10:32 ` Peter Maydell
2011-05-21 9:35 ` Andreas Färber
2011-05-29 11:43 ` Andreas Färber [this message]
2011-05-15 14:13 ` [Qemu-devel] [PATCH 07/11] softfloat: add float*_is_zero_or_denormal() Aurelien Jarno
2011-05-20 10:34 ` Peter Maydell
2011-05-15 14:13 ` [Qemu-devel] [PATCH 08/11] target-i386: cleanup helper_fxam_ST0() Aurelien Jarno
2011-05-15 14:13 ` [Qemu-devel] [PATCH 09/11] target-i386: add support for FPU exceptions Aurelien Jarno
2011-05-15 14:13 ` [Qemu-devel] [PATCH 10/11] softfloat: add floatx80_log2() function Aurelien Jarno
2011-05-15 14:13 ` [Qemu-devel] [PATCH 11/11] target-i386: use floatx80_log2() to implement helper_fyl2x*() Aurelien Jarno
2011-05-17 15:41 ` Richard Henderson
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=4DE2317B.7050701@web.de \
--to=andreas.faerber@web.de \
--cc=aurelien@aurel32.net \
--cc=peter.maydell@linaro.org \
--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).