/* Conversion lookup tables for the decNumber C Library.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2018 Free Software Foundation, Inc.
Contributed by IBM Corporation. Author Mike Cowlishaw.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2, or (at your option) any later
+ Software Foundation; either version 3, or (at your option) any later
version.
- In addition to the permissions in the GNU General Public License,
- the Free Software Foundation gives you unlimited permission to link
- the compiled version of this file into combinations with other
- programs, and to distribute those combinations without any
- restriction coming from the use of this file. (The General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into a combine executable.)
-
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+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/>. */
/* ------------------------------------------------------------------------ */
/* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */
-/* [Automatically generated -- do not edit. 2007.05.05] */
+/* [Automatically generated -- do not edit. 2008.06.21] */
/* ------------------------------------------------------------------------ */
-/* ------------------------------------------------------------------------ */
-/* For details, see: http://www2.hursley.ibm.com/decimal/DPDecimal.html */
+/* For details, see DPDecimal.html on the General Decimal Arithmetic page. */
#include "decDPDSymbols.h"
/* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */
/* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */
/* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */
-/* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */
+/* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */
/* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */
-/* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */
+/* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */
/* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */
/* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */
/* */
/* in the table entry. BIN2CHAR entries are a single byte length (0 for */
/* value 0) followed by three digit characters; a trailing terminator is */
/* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */
-/* are similar with the three BCD8 digits followed by a one-byte length */
+/* are similar with the three BCD8 digits followed by a one-byte length */
/* (again, length=0 for value 0). */
/* */
-/* To use a table, its name, prefixed with DEC_, must be defined with a */
+/* To use a table, its name, prefixed with DEC_, must be defined with a */
/* value of 1 before this header file is included. For example: */
/* #define DEC_BCD2DPD 1 */
/* This mechanism allows software to only include tables that are needed. */
#if defined(DEC_BCD2DPD) && DEC_BCD2DPD==1 && !defined(DECBCD2DPD)
#define DECBCD2DPD
+#ifdef __cplusplus
+extern "C" {
+#endif
+
const uint16_t BCD2DPD[2458]={ 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 0, 0, 0, 0, 0, 0, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 32, 33,
#if defined(DEC_DPD2BINK) && DEC_DPD2BINK==1 && !defined(DECDPD2BINK)
#define DECDPD2BINK
-const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000,
+const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000,
6000, 7000, 8000, 9000, 80000, 81000, 800000, 801000, 880000, 881000,
10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000,
90000, 91000, 810000, 811000, 890000, 891000, 20000, 21000, 22000, 23000,
#if defined(DEC_DPD2BINM) && DEC_DPD2BINM==1 && !defined(DECDPD2BINM)
#define DECDPD2BINM
-const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000,
- 5000000, 6000000, 7000000, 8000000, 9000000, 80000000, 81000000,
- 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000,
- 13000000, 14000000, 15000000, 16000000, 17000000, 18000000, 19000000,
+const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000,
+ 5000000, 6000000, 7000000, 8000000, 9000000, 80000000, 81000000,
+ 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000,
+ 13000000, 14000000, 15000000, 16000000, 17000000, 18000000, 19000000,
90000000, 91000000, 810000000, 811000000, 890000000, 891000000, 20000000,
- 21000000, 22000000, 23000000, 24000000, 25000000, 26000000, 27000000,
+ 21000000, 22000000, 23000000, 24000000, 25000000, 26000000, 27000000,
28000000, 29000000, 82000000, 83000000, 820000000, 821000000, 808000000,
- 809000000, 30000000, 31000000, 32000000, 33000000, 34000000, 35000000,
- 36000000, 37000000, 38000000, 39000000, 92000000, 93000000, 830000000,
- 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000,
- 44000000, 45000000, 46000000, 47000000, 48000000, 49000000, 84000000,
- 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000,
- 52000000, 53000000, 54000000, 55000000, 56000000, 57000000, 58000000,
- 59000000, 94000000, 95000000, 850000000, 851000000, 98000000, 99000000,
- 60000000, 61000000, 62000000, 63000000, 64000000, 65000000, 66000000,
+ 809000000, 30000000, 31000000, 32000000, 33000000, 34000000, 35000000,
+ 36000000, 37000000, 38000000, 39000000, 92000000, 93000000, 830000000,
+ 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000,
+ 44000000, 45000000, 46000000, 47000000, 48000000, 49000000, 84000000,
+ 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000,
+ 52000000, 53000000, 54000000, 55000000, 56000000, 57000000, 58000000,
+ 59000000, 94000000, 95000000, 850000000, 851000000, 98000000, 99000000,
+ 60000000, 61000000, 62000000, 63000000, 64000000, 65000000, 66000000,
67000000, 68000000, 69000000, 86000000, 87000000, 860000000, 861000000,
- 888000000, 889000000, 70000000, 71000000, 72000000, 73000000, 74000000,
- 75000000, 76000000, 77000000, 78000000, 79000000, 96000000, 97000000,
+ 888000000, 889000000, 70000000, 71000000, 72000000, 73000000, 74000000,
+ 75000000, 76000000, 77000000, 78000000, 79000000, 96000000, 97000000,
870000000, 871000000, 898000000, 899000000, 100000000, 101000000, 102000000,
103000000, 104000000, 105000000, 106000000, 107000000, 108000000, 109000000,
180000000, 181000000, 900000000, 901000000, 980000000, 981000000, 110000000,
9,8,1,3, 9,8,2,3, 9,8,3,3, 9,8,4,3, 9,8,5,3, 9,8,6,3, 9,8,7,3, 9,8,8,3, 9,8,9,3,
9,9,0,3, 9,9,1,3, 9,9,2,3, 9,9,3,3, 9,9,4,3, 9,9,5,3, 9,9,6,3, 9,9,7,3, 9,9,8,3,
9,9,9,3};
+
+#ifdef __cplusplus
+}
#endif
+#endif