[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 03/12] target-ppc: Modify dconfig.h to Integrate with
From: |
Tom Musta |
Subject: |
[Qemu-devel] [RFC 03/12] target-ppc: Modify dconfig.h to Integrate with QEMU |
Date: |
Thu, 13 Mar 2014 10:12:59 -0500 |
This patch modifies the dconfig.h header file so that libdecnumber code
integrates correctly with QEMU. Normally, this file is generated from
a configuration script, but it can be replaced with a static file for
this usage within QEMU:
- 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 91aa334..d4fed0d 100644
--- a/include/libdecnumber/dconfig.h
+++ b/include/libdecnumber/dconfig.h
@@ -22,26 +22,14 @@ a copy of the GCC Runtime Library Exception along with this
program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-#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] [RFC 00/12] target-ppc: Decimal Floating Point, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 05/12] target-ppc: Eliminate redundant declarations, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 04/12] target-ppc: Change gstdint.h to stdint.h, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 06/12] target-ppc: Eliminate Unused Variable in decSetSubnormal, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 07/12] target-ppc: Enable Building of libdecnumber, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 10/12] target-ppc: Introduce DFP Helper Utilities, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 08/12] target-ppc: Define FPR Pointer Type for Helpers, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 09/12] target-ppc: Introduce Translation Macros for DFP Arithmetic Forms, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 02/12] target-ppc: Prepare libdecnumber for QEMU include structure, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 11/12] target-ppc: Introduce DFP Post Processor Utilities, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 03/12] target-ppc: Modify dconfig.h to Integrate with QEMU,
Tom Musta <=
- [Qemu-devel] [RFC 12/12] target-ppc: Introduce DFP Add, Tom Musta, 2014/03/13
- [Qemu-devel] [RFC 01/12] target-ppc: Introduce libdecnumber Code, Tom Musta, 2014/03/13