logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

decDPD.h.preamble (3185B)


  1. // SPDX-FileCopyrightText: 2007, 2009 Free Software Foundation, Inc.
  2. // SPDX-License-Identifier: GPL-3.0-or-later
  3. /* Conversion lookup tables for the decNumber C Library.
  4. Copyright (C) 2007, 2009 Free Software Foundation, Inc.
  5. Contributed by IBM Corporation. Author Mike Cowlishaw.
  6. This file is part of GCC.
  7. GCC is free software; you can redistribute it and/or modify it under
  8. the terms of the GNU General Public License as published by the Free
  9. Software Foundation; either version 3, or (at your option) any later
  10. version.
  11. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  12. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14. for more details.
  15. Under Section 7 of GPL version 3, you are granted additional
  16. permissions described in the GCC Runtime Library Exception, version
  17. 3.1, as published by the Free Software Foundation.
  18. You should have received a copy of the GNU General Public License and
  19. a copy of the GCC Runtime Library Exception along with this program;
  20. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  21. <http://www.gnu.org/licenses/>. */
  22. /* ------------------------------------------------------------------------ */
  23. /* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */
  24. /* [Automatically generated -- do not edit. 2008.06.21] */
  25. /* ------------------------------------------------------------------------ */
  26. /* For details, see DPDecimal.html on the General Decimal Arithmetic page. */
  27. #include "decDPDSymbols.h"
  28. /* This include file defines several DPD and BCD conversion tables: */
  29. /* */
  30. /* uint16_t BCD2DPD[2458]; -- BCD -> DPD (0x999 => 2457) */
  31. /* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */
  32. /* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */
  33. /* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */
  34. /* uint16_t DPD2BCD[1024]; -- DPD -> BCD (0x3FF => 0x999) */
  35. /* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */
  36. /* uint32_t DPD2BINK[1024]; -- DPD -> BIN * 1000 (0x3FF => 999000) */
  37. /* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */
  38. /* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */
  39. /* */
  40. /* In all cases the result (10 bits or 12 bits, or binary) is right-aligned */
  41. /* in the table entry. BIN2CHAR entries are a single byte length (0 for */
  42. /* value 0) followed by three digit characters; a trailing terminator is */
  43. /* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */
  44. /* are similar with the three BCD8 digits followed by a one-byte length */
  45. /* (again, length=0 for value 0). */
  46. /* */
  47. /* To use a table, its name, prefixed with DEC_, must be defined with a */
  48. /* value of 1 before this header file is included. For example: */
  49. /* #define DEC_BCD2DPD 1 */
  50. /* This mechanism allows software to only include tables that are needed. */
  51. /* ------------------------------------------------------------------------ */