qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, alex.bennee@linaro.org, cota@braap.org,
	hsp.cat7@gmail.com
Subject: [Qemu-devel] [PATCH 11/24] fpu/soft-fp: Adjust soft-fp types
Date: Sat,  3 Feb 2018 20:11:23 -0800	[thread overview]
Message-ID: <20180204041136.17525-12-richard.henderson@linaro.org> (raw)
In-Reply-To: <20180204041136.17525-1-richard.henderson@linaro.org>

Glibc uses host compiler floating-point types for packing.
We need to use softfloat.h types.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 fpu/double.h | 6 ++----
 fpu/half.h   | 4 +---
 fpu/quad.h   | 6 ++----
 fpu/single.h | 4 +---
 4 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/fpu/double.h b/fpu/double.h
index f6c83d7253..6f8fe49a7d 100644
--- a/fpu/double.h
+++ b/fpu/double.h
@@ -69,13 +69,11 @@
 #define _FP_HIGHBIT_DW_D	\
   ((_FP_W_TYPE) 1 << (_FP_WFRACBITS_DW_D - 1) % _FP_W_TYPE_SIZE)
 
-typedef float DFtype __attribute__ ((mode (DF)));
-
 #if _FP_W_TYPE_SIZE < 64
 
 union _FP_UNION_D
 {
-  DFtype flt;
+  float64 flt;
   struct _FP_STRUCT_LAYOUT
   {
 # if __BYTE_ORDER == __BIG_ENDIAN
@@ -198,7 +196,7 @@ union _FP_UNION_D
 
 union _FP_UNION_D
 {
-  DFtype flt;
+  float64 flt;
   struct _FP_STRUCT_LAYOUT
   {
 # if __BYTE_ORDER == __BIG_ENDIAN
diff --git a/fpu/half.h b/fpu/half.h
index ea28db6c18..75a3168a75 100644
--- a/fpu/half.h
+++ b/fpu/half.h
@@ -59,11 +59,9 @@
 /* The implementation of _FP_MUL_MEAT_H and _FP_DIV_MEAT_H should be
    chosen by the target machine.  */
 
-typedef float HFtype __attribute__ ((mode (HF)));
-
 union _FP_UNION_H
 {
-  HFtype flt;
+  float16 flt;
   struct _FP_STRUCT_LAYOUT
   {
 #if __BYTE_ORDER == __BIG_ENDIAN
diff --git a/fpu/quad.h b/fpu/quad.h
index 71621f01bf..24a3245fb7 100644
--- a/fpu/quad.h
+++ b/fpu/quad.h
@@ -69,13 +69,11 @@
 #define _FP_HIGHBIT_DW_Q	\
   ((_FP_W_TYPE) 1 << (_FP_WFRACBITS_DW_Q - 1) % _FP_W_TYPE_SIZE)
 
-typedef float TFtype __attribute__ ((mode (TF)));
-
 #if _FP_W_TYPE_SIZE < 64
 
 union _FP_UNION_Q
 {
-  TFtype flt;
+  float128 flt;
   struct _FP_STRUCT_LAYOUT
   {
 # if __BYTE_ORDER == __BIG_ENDIAN
@@ -202,7 +200,7 @@ union _FP_UNION_Q
 #else   /* not _FP_W_TYPE_SIZE < 64 */
 union _FP_UNION_Q
 {
-  TFtype flt /* __attribute__ ((mode (TF))) */ ;
+  float128 flt;
   struct _FP_STRUCT_LAYOUT
   {
     _FP_W_TYPE a, b;
diff --git a/fpu/single.h b/fpu/single.h
index 2918f78d97..91252f82ff 100644
--- a/fpu/single.h
+++ b/fpu/single.h
@@ -66,11 +66,9 @@
 /* The implementation of _FP_MUL_MEAT_S and _FP_DIV_MEAT_S should be
    chosen by the target machine.  */
 
-typedef float SFtype __attribute__ ((mode (SF)));
-
 union _FP_UNION_S
 {
-  SFtype flt;
+  float32 flt;
   struct _FP_STRUCT_LAYOUT
   {
 #if __BYTE_ORDER == __BIG_ENDIAN
-- 
2.14.3

  parent reply	other threads:[~2018-02-04  4:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-04  4:11 [Qemu-devel] [PATCH 00/24] re-factor and add fp16 using glibc soft-fp Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 01/24] fpu/softfloat: implement float16_squash_input_denormal Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 02/24] include/fpu/softfloat: remove USE_SOFTFLOAT_STRUCT_TYPES Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 03/24] fpu/softfloat-types: new header to prevent excessive re-builds Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 04/24] target/*/cpu.h: remove softfloat.h Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 05/24] include/fpu/softfloat: implement float16_abs helper Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 06/24] include/fpu/softfloat: implement float16_chs helper Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 07/24] include/fpu/softfloat: implement float16_set_sign helper Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 08/24] include/fpu/softfloat: add some float16 constants Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 09/24] fpu/softfloat: improve comments on ARM NaN propagation Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 10/24] fpu/soft-fp: Import soft-fp from glibc Richard Henderson
2018-02-04  4:11 ` Richard Henderson [this message]
2018-02-04  4:11 ` [Qemu-devel] [PATCH 12/24] fpu/soft-fp: Add ties_away and to_odd rounding modes Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 13/24] fpu/soft-fp: Add arithmetic macros to half.h Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 14/24] fpu/soft-fp: Adjust _FP_CMP_CHECK_NAN Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 15/24] fpu: Implement add/sub/mul/div with soft-fp.h Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 16/24] fpu: Implement float_to_int/uint " Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 17/24] fpu: Implement int/uint_to_float " Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 18/24] fpu: Implement compares " Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 19/24] fpu: Implement min/max " Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 20/24] fpu: Implement sqrt " Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 21/24] fpu: Implement scalbn " Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 22/24] fpu: Implement float_to_float " Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 23/24] fpu: Implement muladd " Richard Henderson
2018-02-04  4:11 ` [Qemu-devel] [PATCH 24/24] fpu: Implement round_to_int " Richard Henderson
2018-02-04  8:56 ` [Qemu-devel] [PATCH 00/24] re-factor and add fp16 using glibc soft-fp Howard Spoelstra
2018-02-04 15:00 ` Peter Maydell
2018-02-06 20:45   ` Alex Bennée
2018-02-08 21:04 ` no-reply
2018-02-08 21:11 ` no-reply

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=20180204041136.17525-12-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=hsp.cat7@gmail.com \
    --cc=peter.maydell@linaro.org \
    --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).