qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <rth@twiddle.net>,
	patches@linaro.org, "Max Filippov" <jcmvbkbc@gmail.com>,
	"Richard Sandiford" <rdsandiford@googlemail.com>,
	"Paul Brook" <paul@codesourcery.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Blue Swirl" <blauwirbel@gmail.com>,
	"Christophe Lyon" <christophe.lyon@st.com>,
	"Anthony Liguori" <aliguori@amazon.com>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
	"Andreas Färber" <afaerber@suse.de>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Avi Kivity" <avi.kivity@gmail.com>
Subject: [Qemu-devel] [PATCH 2/6] softfloat: Revert remaining portions of commits 75d62a5856 and 3430b0be36f
Date: Tue, 25 Nov 2014 14:17:33 +0000	[thread overview]
Message-ID: <1416925057-692-3-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1416925057-692-1-git-send-email-peter.maydell@linaro.org>

Revert the remaining portions of commits 75d62a5856 and 3430b0be36f
which are under a SoftFloat-2b license, ie the functions
uint64_to_float32() and uint64_to_float64(). (The float64_to_uint64()
and float64_to_uint64_round_to_zero() functions were completely
rewritten in commits fb3ea83aa and 0a87a3107d so can stay.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 fpu/softfloat.c         | 35 -----------------------------------
 include/fpu/softfloat.h |  2 --
 2 files changed, 37 deletions(-)

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 6041dbd..f79669f 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -1302,27 +1302,6 @@ float32 int64_to_float32(int64_t a STATUS_PARAM)
 
 }
 
-float32 uint64_to_float32(uint64_t a STATUS_PARAM)
-{
-    int8 shiftCount;
-
-    if ( a == 0 ) return float32_zero;
-    shiftCount = countLeadingZeros64( a ) - 40;
-    if ( 0 <= shiftCount ) {
-        return packFloat32(0, 0x95 - shiftCount, a<<shiftCount);
-    }
-    else {
-        shiftCount += 7;
-        if ( shiftCount < 0 ) {
-            shift64RightJamming( a, - shiftCount, &a );
-        }
-        else {
-            a <<= shiftCount;
-        }
-        return roundAndPackFloat32(0, 0x9C - shiftCount, a STATUS_VAR);
-    }
-}
-
 /*----------------------------------------------------------------------------
 | Returns the result of converting the 64-bit two's complement integer `a'
 | to the double-precision floating-point format.  The conversion is performed
@@ -1342,20 +1321,6 @@ float64 int64_to_float64(int64_t a STATUS_PARAM)
 
 }
 
-float64 uint64_to_float64(uint64_t a STATUS_PARAM)
-{
-    int exp =  0x43C;
-
-    if (a == 0) {
-        return float64_zero;
-    }
-    if ((int64_t)a < 0) {
-        shift64RightJamming(a, 1, &a);
-        exp += 1;
-    }
-    return normalizeRoundAndPackFloat64(0, exp, a STATUS_VAR);
-}
-
 /*----------------------------------------------------------------------------
 | Returns the result of converting the 64-bit two's complement integer `a'
 | to the extended double-precision floating-point format.  The conversion
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index 4da5778..772f9a1 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -273,9 +273,7 @@ float64 uint32_to_float64(uint32_t STATUS_PARAM);
 floatx80 int32_to_floatx80(int32_t STATUS_PARAM);
 float128 int32_to_float128(int32_t STATUS_PARAM);
 float32 int64_to_float32(int64_t STATUS_PARAM);
-float32 uint64_to_float32(uint64_t STATUS_PARAM);
 float64 int64_to_float64(int64_t STATUS_PARAM);
-float64 uint64_to_float64(uint64_t STATUS_PARAM);
 floatx80 int64_to_floatx80(int64_t STATUS_PARAM);
 float128 int64_to_float128(int64_t STATUS_PARAM);
 float128 uint64_to_float128(uint64_t STATUS_PARAM);
-- 
1.9.1

  parent reply	other threads:[~2014-11-25 14:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 14:17 [Qemu-devel] [PATCH 0/6] relicense QEMU softfloat from 2b to to 2a Peter Maydell
2014-11-25 14:17 ` [Qemu-devel] [PATCH 1/6] softfloat: Apply patch corresponding to rebasing to softfloat-2a Peter Maydell
2014-11-25 14:17 ` Peter Maydell [this message]
2014-11-25 14:17 ` [Qemu-devel] [PATCH 3/6] softfloat: Revert remaining parts of commits b645bb4885 and 5a6932d51d Peter Maydell
2014-11-25 14:17 ` [Qemu-devel] [PATCH 4/6] softfloat: Implement uint64_to_float64() and uint64_to_float32() Peter Maydell
2014-11-25 14:17 ` [Qemu-devel] [PATCH 5/6] softfloat: reimplement SNAN_BIT_IS_ONE support Peter Maydell
2014-12-11 16:41   ` Maciej W. Rozycki
2014-12-11 18:02     ` Peter Maydell
2014-11-25 14:17 ` [Qemu-devel] [PATCH 6/6] softfloat: Clarify license status Peter Maydell
2014-12-05 11:15 ` [Qemu-devel] [PATCH 0/6] relicense QEMU softfloat from 2b to to 2a Peter Maydell
2014-12-17 14:06   ` Peter Maydell
2015-01-05 11:03     ` Peter Maydell
2015-01-07  6:13 ` Paolo Bonzini
2015-01-07 10:34   ` Peter Maydell
2015-01-07 11:04     ` Paolo Bonzini
2015-01-07 16:23       ` Peter Maydell
2015-01-07 16:29         ` Paolo Bonzini
2015-01-07 16:34           ` Peter Maydell
2015-01-07 16:49             ` Paolo Bonzini
2015-01-12 12:53     ` Peter Maydell
2015-01-12 12:55       ` Paolo Bonzini

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=1416925057-692-3-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=aurelien@aurel32.net \
    --cc=avi.kivity@gmail.com \
    --cc=blauwirbel@gmail.com \
    --cc=christophe.lyon@st.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=jcmvbkbc@gmail.com \
    --cc=patches@linaro.org \
    --cc=paul@codesourcery.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rdsandiford@googlemail.com \
    --cc=rth@twiddle.net \
    --cc=sw@weilnetz.de \
    /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).