qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Laurent Vivier <laurent@vivier.eu>, qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH v4 5/7] target-m68k: use floatx80 internally
Date: Mon, 19 Jun 2017 15:04:17 -0700	[thread overview]
Message-ID: <8ff042fe-a6f6-74a1-ab57-b29ef621d461@twiddle.net> (raw)
In-Reply-To: <f7e5acc9-a23d-fbd1-c2e5-3c2235f40c19@vivier.eu>

On 06/19/2017 02:42 PM, Laurent Vivier wrote:
> Le 19/06/2017 à 23:03, Laurent Vivier a écrit :
>> Le 19/06/2017 à 22:53, Richard Henderson a écrit :
>>>
>>> It would also make me happier if we were to adjust the definition of
>>> fl0atx80 to more closely match m68k and those missing zeros.  Shouldn't
>>> real hardware move instructions propagate those middle 2 bytes
>>> regardless of contents?
>>>
>>> Perhaps something like
>>>
>>> #ifdef TARGET_M68K
>>>    typedef struct {
>>>      uint64_t low;
>>>      union {
>>>        uin32_t high32;
>>>        struct {
>>> #ifdef HOST_WORDS_BIGENDIAN
>>>          uint16_t high, zero;
>>> #else
>>>          uint16_t zero, high;
>>> #endif
>>>        };
>>>      };
>>>    } floatx80;
>>> #else
>>>    ...
>>> #endif
>>>
>>> (with a minor fix to make_floatx80 to use named initializers).
>>>
>>> Then you can use full 32-bit store insns when copying data here.  Which
>>> also allows you to drop some of the shifts you're needing to add.
>>
>> OK, I will.
> 
> The softfloat is in the target independent code, so we can't adjust the
> size of floatx80 by target, TARGET_XXXX are poisoned when used in
> softfloat.h.

Ouch.  That means we'd have to add a full set of floatx96.

If you don't want to do that now, I'd understand.  I'd prefer that you issue an 
undefined opcode exception or something for the packed decimals though, rather 
than just silently dropping 2 bytes of data.

I suppose a first go at floatx96 would be just to thunk the data and call to 
the floatx80 routines.  I do seem to recall that a Proper implementation would 
treat m68k un-normals different from x86.

r~

  reply	other threads:[~2017-06-19 22:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-11 23:16 [Qemu-devel] [PATCH v4 0/7] target-m68k: implement 680x0 FPU Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 1/7] softfloat: define 680x0 specific values Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 2/7] target-m68k: move FPU helpers to fpu_helper.c Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 3/7] target-m68k: define ext_opsize Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 4/7] target-m68k: move fmove CR to a function Laurent Vivier
2017-06-12 16:13   ` Richard Henderson
2017-06-12 17:56     ` Laurent Vivier
2017-06-12 18:37       ` Richard Henderson
2017-06-12 19:12   ` Philippe Mathieu-Daudé
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 5/7] target-m68k: use floatx80 internally Laurent Vivier
2017-06-13  4:48   ` Thomas Huth
2017-06-19 20:53   ` Richard Henderson
2017-06-19 21:03     ` Laurent Vivier
2017-06-19 21:42       ` Laurent Vivier
2017-06-19 22:04         ` Richard Henderson [this message]
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 6/7] target-m68k: define 96bit FP registers for gdb on 680x0 Laurent Vivier
2017-06-11 23:16 ` [Qemu-devel] [PATCH v4 7/7] target-m68k: add FPCR and FPSR Laurent Vivier
2017-06-19 21:16   ` 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=8ff042fe-a6f6-74a1-ab57-b29ef621d461@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --cc=laurent@vivier.eu \
    --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).