qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH 4/4] target-m68k: add fscale, fgetman and fgetexp
Date: Tue, 4 Jul 2017 02:07:26 +0200	[thread overview]
Message-ID: <6b52c76c-a5a6-0f35-3a1d-d5038ef42356@vivier.eu> (raw)
In-Reply-To: <fd4d0cfa-b746-7ea8-f1a0-2409b519f5bf@twiddle.net>

Le 03/07/2017 à 22:31, Richard Henderson a écrit :
> On 07/03/2017 12:50 PM, Laurent Vivier wrote:
>>         fmove.x #0x000000000ABCDEF12345,%fp0
>>         fgetman.x %fp0,%fp6
>> fp0            2.1518178707571747286191852003521627e-4938    (raw
>> 0x0000000000000abcdef12345)
>> fp6            1.342222103012886691431049257516861    (raw
>> 0x3fff0000abcdef1234500000)
> 
> This one shows exactly what I was thinking about.
> 
>> So I guess the mantissa must be shifted to left until we have a 1 in the
>> explicit integer part bit?
> 
> Yes.
> 
> Please try fgetexp on this same input.

	        fmove.x #0x000000000ABCDEF12345,%fp0
	        fgetexp.x %fp0,%fp6
fp0            (raw 0x0000000000000abcdef12345)
fp6            -16403

> I suspect the answer is -16384 - clz64(val->l.lower).

It looks like -16383 - clz64(val->l.lower)

	        fmove.x #0x000056789ABCDEF12345,%fp0
	        fgetexp.x %fp0,%fp6
fp0            (raw 0x0000000056789abcdef12345)
fp6            -16384

	        fmove.x #0x000086789ABCDEF12345,%fp0
	        fgetexp.x %fp0,%fp6
fp0            (raw 0x0000000086789abcdef12345)
fp6            -16383

Thanks,
Laurent

      reply	other threads:[~2017-07-04  0:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 16:23 [Qemu-devel] [PATCH 0/4] target/m68k: implement 680x0 FPU (part 3) Laurent Vivier
2017-07-03 16:23 ` [Qemu-devel] [PATCH 1/4] softfloat: use floatx80_infinity in softfloat Laurent Vivier
2017-07-03 18:06   ` Richard Henderson
2017-07-03 16:23 ` [Qemu-devel] [PATCH 2/4] target/m68k: add FPU trigonometric instructions Laurent Vivier
2017-07-03 19:11   ` Richard Henderson
2017-07-03 19:17     ` Richard Henderson
2017-07-03 16:23 ` [Qemu-devel] [PATCH 3/4] target/m68k: add fmod/frem Laurent Vivier
2017-07-03 19:14   ` Richard Henderson
2017-07-03 16:23 ` [Qemu-devel] [PATCH 4/4] target-m68k: add fscale, fgetman and fgetexp Laurent Vivier
2017-07-03 19:26   ` Richard Henderson
2017-07-03 19:50     ` Laurent Vivier
2017-07-03 20:31       ` Richard Henderson
2017-07-04  0:07         ` Laurent Vivier [this message]

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=6b52c76c-a5a6-0f35-3a1d-d5038ef42356@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).