From: Alexander Graf <agraf@suse.de>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Michael Matz <matz@suse.de>,
C Fontana <claudio.fontana@linaro.org>,
Dirk Mueller <dmueller@suse.de>,
Laurent Desnogues <laurent.desnogues@gmail.com>,
Christoffer Dall <christoffer.dall@linaro.org>,
Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 05/60] softfloat: Add stubs for int16 conversion
Date: Fri, 27 Sep 2013 02:47:59 +0200 [thread overview]
Message-ID: <1380242934-20953-6-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1380242934-20953-1-git-send-email-agraf@suse.de>
On AArch64 we have a few instructions that can convert between floats
and 16 bit integers. Add stubs in the softfloat code to handle these,
but don't add code to actually do so. Instead, any call to them will
assert(0) for now.
This stub implementation should be replaced by something that actually
does something useful by someone who understands softfloat later.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
fpu/softfloat.c | 21 +++++++++++++++++++++
include/fpu/softfloat.h | 4 ++++
2 files changed, 25 insertions(+)
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 7ba51b6..3e6f219 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -41,6 +41,7 @@ these four paragraphs for those parts of this code that are retained.
#include "config.h"
#include "fpu/softfloat.h"
+#include "assert.h"
/*----------------------------------------------------------------------------
| Primitive arithmetic functions, including multi-word arithmetic, and
@@ -1378,6 +1379,11 @@ int32 float32_to_int32( float32 a STATUS_PARAM )
}
+int_fast16_t float32_to_int16( float32 a STATUS_PARAM )
+{
+ assert(0);
+}
+
/*----------------------------------------------------------------------------
| Returns the result of converting the single-precision floating-point value
| `a' to the 32-bit two's complement integer format. The conversion is
@@ -2762,6 +2768,11 @@ int32 float64_to_int32( float64 a STATUS_PARAM )
}
+int_fast16_t float64_to_int16( float64 a STATUS_PARAM )
+{
+ assert(0);
+}
+
/*----------------------------------------------------------------------------
| Returns the result of converting the double-precision floating-point value
| `a' to the 32-bit two's complement integer format. The conversion is
@@ -6446,6 +6457,11 @@ uint32 float32_to_uint32( float32 a STATUS_PARAM )
return res;
}
+uint_fast16_t float32_to_uint16( float32 a STATUS_PARAM )
+{
+ assert(0);
+}
+
uint32 float32_to_uint32_round_to_zero( float32 a STATUS_PARAM )
{
int64_t v;
@@ -6500,6 +6516,11 @@ uint32 float64_to_uint32( float64 a STATUS_PARAM )
return res;
}
+uint_fast16_t float64_to_uint16( float64 a STATUS_PARAM )
+{
+ assert(0);
+}
+
uint32 float64_to_uint32_round_to_zero( float64 a STATUS_PARAM )
{
int64_t v;
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index f3927e2..b3c85f4 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -268,6 +268,8 @@ extern const float16 float16_default_nan;
int_fast16_t float32_to_int16_round_to_zero(float32 STATUS_PARAM);
uint_fast16_t float32_to_uint16_round_to_zero(float32 STATUS_PARAM);
int32 float32_to_int32( float32 STATUS_PARAM );
+int_fast16_t float32_to_int16( float32 STATUS_PARAM );
+uint_fast16_t float32_to_uint16( float32 STATUS_PARAM );
int32 float32_to_int32_round_to_zero( float32 STATUS_PARAM );
uint32 float32_to_uint32( float32 STATUS_PARAM );
uint32 float32_to_uint32_round_to_zero( float32 STATUS_PARAM );
@@ -373,6 +375,8 @@ int_fast16_t float64_to_int16_round_to_zero(float64 STATUS_PARAM);
uint_fast16_t float64_to_uint16_round_to_zero(float64 STATUS_PARAM);
int32 float64_to_int32( float64 STATUS_PARAM );
int32 float64_to_int32_round_to_zero( float64 STATUS_PARAM );
+int_fast16_t float64_to_int16( float64 STATUS_PARAM );
+uint_fast16_t float64_to_uint16( float64 STATUS_PARAM );
uint32 float64_to_uint32( float64 STATUS_PARAM );
uint32 float64_to_uint32_round_to_zero( float64 STATUS_PARAM );
int64 float64_to_int64( float64 STATUS_PARAM );
--
1.7.12.4
next prev parent reply other threads:[~2013-09-27 0:49 UTC|newest]
Thread overview: 115+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 0:47 [Qemu-devel] [PATCH 00/60] AArch64 TCG emulation support Alexander Graf
2013-09-27 0:47 ` [Qemu-devel] [PATCH 01/60] arm: Use symbolic device names for vfp cmp Alexander Graf
2013-09-27 0:47 ` [Qemu-devel] [PATCH 02/60] arm: Give the fpscr rounding modes names Alexander Graf
2013-09-27 0:47 ` [Qemu-devel] [PATCH 03/60] arm: Split VFP cmp from FPSCR setting Alexander Graf
2013-09-27 14:05 ` Richard Henderson
2013-09-27 22:38 ` Richard Henderson
2013-09-27 0:47 ` [Qemu-devel] [PATCH 04/60] arm: Add AArch64 disassembler stub Alexander Graf
2013-09-27 14:07 ` Richard Henderson
2013-09-27 0:47 ` Alexander Graf [this message]
2013-09-27 0:48 ` [Qemu-devel] [PATCH 06/60] AArch64: Add set_pc cpu method Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 07/60] ARM: Add 64bit VFP handling Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 08/60] AArch64: Add support to print VFP registers in CPU Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 09/60] AArch64: Add b and bl handling Alexander Graf
2013-09-27 9:11 ` Claudio Fontana
2013-09-27 14:40 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 10/60] AArch64: Add handling for br instructions Alexander Graf
2013-09-27 14:51 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 11/60] AArch64: Add STP instruction emulation Alexander Graf
2013-09-27 17:38 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 12/60] AArch64: Add ldarx style " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 13/60] AArch64: Add stubs for a64 specific helpers Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 14/60] AArch64: Add orr instruction emulation Alexander Graf
2013-09-27 18:25 ` Richard Henderson
2013-10-31 0:29 ` Alexander Graf
2013-10-31 1:44 ` Peter Maydell
2013-11-18 10:15 ` Claudio Fontana
2013-11-18 10:37 ` Laurent Desnogues
2013-11-18 13:12 ` Michael Matz
2013-11-18 13:15 ` Peter Maydell
2013-11-18 13:24 ` Claudio Fontana
2013-11-18 13:46 ` Michael Matz
2013-11-18 13:49 ` Peter Maydell
2013-11-18 13:43 ` Claudio Fontana
2013-11-18 13:44 ` Peter Maydell
2013-11-18 13:55 ` Michael Matz
2013-11-18 19:51 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 15/60] AArch64: Add add instruction family emulation Alexander Graf
2013-09-27 18:51 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 16/60] AArch64: Add emulation for SIMD ld/st multiple Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 17/60] AArch64: Add dup GPR->Vec instruction emulation Alexander Graf
2013-09-27 18:55 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 18/60] AArch64: Add umov " Alexander Graf
2013-09-27 18:56 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 19/60] AArch64: Add ins GPR->Vec " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 20/60] AArch64: Add SIMD ORR family " Alexander Graf
2013-09-27 19:21 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 21/60] AArch64: Convert SIMD load/store to common function Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 22/60] AArch64: Add AdvSIMD scalar three same group handling Alexander Graf
2013-09-27 19:24 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 23/60] AArch64: Add AdvSIMD modified immediate " Alexander Graf
2013-11-19 20:23 ` Janne Grunau
2013-09-27 0:48 ` [Qemu-devel] [PATCH 24/60] AArch64: Add SIMD ushll instruction emulation Alexander Graf
2013-09-27 19:29 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 25/60] AArch64: Add SIMD shl " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 26/60] AArch64: Add ADR " Alexander Graf
2013-11-19 17:17 ` Claudio Fontana
2013-11-19 17:52 ` Claudio Fontana
2013-11-19 18:03 ` Peter Maydell
2013-11-19 18:09 ` Peter Maydell
2013-11-20 14:40 ` Michael Matz
2013-09-27 0:48 ` [Qemu-devel] [PATCH 27/60] AArch64: Add addi " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 28/60] AArch64: Add movi " Alexander Graf
2013-09-27 19:38 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 29/60] AArch64: Add orri " Alexander Graf
2013-09-27 19:42 ` Richard Henderson
2013-11-26 11:56 ` Claudio Fontana
2013-11-26 12:05 ` Laurent Desnogues
2013-11-27 21:56 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 30/60] AArch64: Add extr " Alexander Graf
2013-09-27 19:45 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 31/60] AArch64: Add bfm family " Alexander Graf
2013-09-27 20:01 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 32/60] AArch64: Add svc " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 33/60] AArch64: Add bc " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 34/60] AArch64: Add b.cond " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 35/60] AArch64: Add mrs " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 36/60] AArch64: Add msr " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 37/60] AArch64: Add hint " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 38/60] AArch64: Add stub barrier " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 39/60] AArch64: Add stub sys " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 40/60] AArch64: Add tbz " Alexander Graf
2013-09-27 20:50 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 41/60] AArch64: Add ldr/str instruction family emulation Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 42/60] AArch64: Add literal ld instruction emulation Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 43/60] AArch64: Add cinc " Alexander Graf
2013-09-27 20:52 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 44/60] AArch64: Add division instruction family emulation Alexander Graf
2013-09-27 20:54 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 45/60] AArch64: Add shift " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 46/60] AArch64: Add rev " Alexander Graf
2013-09-27 21:07 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 47/60] AArch64: Add clz instruction emulation Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 48/60] AArch64: Add 0x1a encoding of add instructions Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 49/60] AArch64: Add "Data-processing (3 source)" instruction Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 50/60] AArch64: Add "Floating-point<->fixed-point Alexander Graf
2013-11-19 20:41 ` Janne Grunau
2013-11-20 14:47 ` Michael Matz
2013-11-21 12:34 ` Janne Grunau
2013-11-21 12:40 ` Peter Maydell
2013-09-27 0:48 ` [Qemu-devel] [PATCH 51/60] AArch64: Add fmov (scalar, immediate) instruction Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 52/60] AArch64: Add "Floating-point<->integer conversions" Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 53/60] AArch64: Add "Floating-point compare" instruction Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 54/60] AArch64: Add "Floating-point data-processing (1 Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 55/60] " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 56/60] AArch64: Add "Floating-point data-processing (2 Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 57/60] " Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 58/60] AArch64: Add "ADD (vector)" instruction emulation Alexander Graf
2013-09-27 0:48 ` [Qemu-devel] [PATCH 59/60] AArch64: Add "Floating-point data-processing (3 Alexander Graf
2013-09-27 21:34 ` Richard Henderson
2013-09-27 0:48 ` [Qemu-devel] [PATCH 60/60] " Alexander Graf
2013-09-27 1:02 ` [Qemu-devel] [PATCH 00/60] AArch64 TCG emulation support Alexander Graf
2013-09-27 2:30 ` Peter Maydell
2013-09-27 10:39 ` Alexander Graf
2013-10-16 19:54 ` Edgar E. Iglesias
2013-10-17 12:23 ` Alexander Graf
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=1380242934-20953-6-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=christoffer.dall@linaro.org \
--cc=claudio.fontana@linaro.org \
--cc=dmueller@suse.de \
--cc=laurent.desnogues@gmail.com \
--cc=matz@suse.de \
--cc=peter.maydell@linaro.org \
--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).