[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [V2 PATCH 04/37] libdecnumber: Modify dconfig.h to Integrat
From: |
Tom Musta |
Subject: |
[Qemu-devel] [V2 PATCH 04/37] libdecnumber: Modify dconfig.h to Integrate with QEMU |
Date: |
Mon, 21 Apr 2014 15:54:48 -0500 |
Modify the dconfig.h header file so that libdecnumber code integrates QEMU
configuration. Specifically:
- the WORDS_BIGENDIAN preprocessor macro is used in libdecnumber code to
determines endianness. It is derived from the existing QEMU macro
HOST_WORDS_BIGENDIAN which is defined in config-host.h.
- the DECPUN macro determines the number of decimal digits (aka declets) per
unit (byte). This is 3 for PowerPC DFP.
Signed-off-by: Tom Musta <address@hidden>
---
include/libdecnumber/dconfig.h | 24 ++++++------------------
1 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/include/libdecnumber/dconfig.h b/include/libdecnumber/dconfig.h
index ffbad25..2f0455a 100644
--- a/include/libdecnumber/dconfig.h
+++ b/include/libdecnumber/dconfig.h
@@ -27,26 +27,14 @@
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
-#ifdef IN_LIBGCC2
+#include "config-host.h"
-#include "tconfig.h"
-#include "coretypes.h"
-#include "tm.h"
-
-#ifndef LIBGCC2_WORDS_BIG_ENDIAN
-#define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
-#endif
-
-#ifndef LIBGCC2_FLOAT_WORDS_BIG_ENDIAN
-#define LIBGCC2_FLOAT_WORDS_BIG_ENDIAN LIBGCC2_WORDS_BIG_ENDIAN
-#endif
-
-#if LIBGCC2_FLOAT_WORDS_BIG_ENDIAN
+#if defined(HOST_WORDS_BIGENDIAN)
#define WORDS_BIGENDIAN 1
-#endif
-
#else
+#define WORDS_BIGENDIAN 0
+#endif
-#include "config.h"
-
+#ifndef DECDPUN
+#define DECDPUN 3
#endif
--
1.7.1
- [Qemu-devel] [V2 PATCH 00/37] target-ppc: Decimal Floating Point, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 02/37] libdecnumber: Eliminate #include *Symbols.h, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 06/37] libdecnumber: Eliminate redundant declarations, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 07/37] libdecnumber: Eliminate Unused Variable in decSetSubnormal, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 05/37] libdecnumber: Change gstdint.h to stdint.h, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 03/37] libdecnumber: Prepare libdecnumber for QEMU include structure, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 04/37] libdecnumber: Modify dconfig.h to Integrate with QEMU,
Tom Musta <=
- [Qemu-devel] [V2 PATCH 08/37] target-ppc: Enable Building of libdecnumber, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 09/37] libdecnumber: Introduce decNumberFrom[U]Int64, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 10/37] libdecnumber: Introduce decNumberIntegralToInt64, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 15/37] target-ppc: Introduce DFP Helper Utilities, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 12/37] target-ppc: Define FPR Pointer Type for Helpers, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 11/37] libdecnumber: Fix decNumberSetBCD, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 13/37] target-ppc: Introduce Generator Macros for DFP Arithmetic Forms, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 14/37] target-ppc: Introduce Decoder Macros for DFP, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 16/37] target-ppc: Introduce DFP Post Processor Utilities, Tom Musta, 2014/04/21
- [Qemu-devel] [V2 PATCH 17/37] target-ppc: Introduce DFP Add, Tom Musta, 2014/04/21