From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THP8g-0005Pm-4n for qemu-devel@nongnu.org; Thu, 27 Sep 2012 21:13:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THP8f-0003PM-6u for qemu-devel@nongnu.org; Thu, 27 Sep 2012 21:13:10 -0400 Received: from mail-da0-f45.google.com ([209.85.210.45]:41474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THP8f-0003PB-1E for qemu-devel@nongnu.org; Thu, 27 Sep 2012 21:13:09 -0400 Received: by dadn15 with SMTP id n15so526932dad.4 for ; Thu, 27 Sep 2012 18:13:08 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 27 Sep 2012 18:13:05 -0700 Message-Id: <1348794785-28576-1-git-send-email-rth@twiddle.net> In-Reply-To: <1348785610-23418-1-git-send-email-rth@twiddle.net> References: <1348785610-23418-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 136/147] softfloat: Implement uint64_to_float128 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf Signed-off-by: Richard Henderson --- fpu/softfloat.c | 6 ++++++ fpu/softfloat.h | 1 + 2 files changed, 7 insertions(+) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 45f105a..8df3a32 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1337,6 +1337,12 @@ float128 int64_to_float128( int64 a STATUS_PARAM ) } +float128 uint64_to_float128( uint64 a STATUS_PARAM ) +{ + if ( a == 0 ) return packFloat128( 0, 0, 0, 0 ); + return normalizeRoundAndPackFloat128( 0, 0x406E, a, 0 STATUS_VAR ); +} + /*---------------------------------------------------------------------------- | Returns the result of converting the single-precision floating-point value | `a' to the 32-bit two's complement integer format. The conversion is diff --git a/fpu/softfloat.h b/fpu/softfloat.h index d8999b3..ee925ad 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@ -237,6 +237,7 @@ float64 int64_to_float64( int64 STATUS_PARAM ); float64 uint64_to_float64( uint64 STATUS_PARAM ); floatx80 int64_to_floatx80( int64 STATUS_PARAM ); float128 int64_to_float128( int64 STATUS_PARAM ); +float128 uint64_to_float128( uint64 STATUS_PARAM ); /*---------------------------------------------------------------------------- | Software half-precision conversion routines. -- 1.7.11.4