Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: gcc/libdecnumber/decDPD.h

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gcc/libdecnumber/decContext.h ('k') | gcc/libdecnumber/decPacked.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Conversion lookup tables for the decNumber C Library. 1 /* Conversion lookup tables for the decNumber C Library.
2 Copyright (C) 2007, 2009 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2009 Free Software Foundation, Inc.
3 Contributed by IBM Corporation. Author Mike Cowlishaw. 3 Contributed by IBM Corporation. Author Mike Cowlishaw.
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify it under 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 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 9 Software Foundation; either version 3, or (at your option) any later
10 version. 10 version.
11 11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details. 15 for more details.
16 16
17 Under Section 7 of GPL version 3, you are granted additional 17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version 18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation. 19 3.1, as published by the Free Software Foundation.
20 20
21 You should have received a copy of the GNU General Public License and 21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program; 22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */ 24 <http://www.gnu.org/licenses/>. */
25 25
26 /* ------------------------------------------------------------------------ */ 26 /* ------------------------------------------------------------------------ */
27 /* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */ 27 /* Binary Coded Decimal and Densely Packed Decimal conversion lookup tables */
28 /* [Automatically generated -- do not edit. 2007.05.05]» » */ 28 /* [Automatically generated -- do not edit. 2008.06.21]» » */
29 /* ------------------------------------------------------------------------ */ 29 /* ------------------------------------------------------------------------ */
30 /* ------------------------------------------------------------------------ */ 30 /* For details, see DPDecimal.html on the General Decimal Arithmetic page. */
31 /* For details, see: http://www2.hursley.ibm.com/decimal/DPDecimal.html» */
32 31
33 #include "decDPDSymbols.h" 32 #include "decDPDSymbols.h"
34 33
35 /* This include file defines several DPD and BCD conversion tables: */ 34 /* This include file defines several DPD and BCD conversion tables: */
36 /* */ 35 /* */
37 /* uint16_t BCD2DPD[2458]; -- BCD -> DPD (0x999 => 2457) */ 36 /* uint16_t BCD2DPD[2458]; -- BCD -> DPD (0x999 => 2457) */
38 /* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */ 37 /* uint16_t BIN2DPD[1000]; -- Bin -> DPD (999 => 2457) */
39 /* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */ 38 /* uint8_t BIN2CHAR[4001]; -- Bin -> CHAR (999 => '\3' '9' '9' '9') */
40 /* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */ 39 /* uint8_t BIN2BCD8[4000]; -- Bin -> bytes (999 => 9 9 9 3) */
41 /* uint16_t DPD2BCD[1024];» -- DPD -> BCD (0x3FF => 0x999)»» */ 40 /* uint16_t DPD2BCD[1024];» -- DPD -> BCD (0x3FF => 0x999) » */
42 /* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */ 41 /* uint16_t DPD2BIN[1024]; -- DPD -> BIN (0x3FF => 999) */
43 /* uint32_t DPD2BINK[1024];» -- DPD -> BIN * 1000 (0x3FF => 999000)» */ 42 /* uint32_t DPD2BINK[1024];» -- DPD -> BIN * 1000 (0x3FF => 999000) */
44 /* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */ 43 /* uint32_t DPD2BINM[1024]; -- DPD -> BIN * 1E+6 (0x3FF => 999000000) */
45 /* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */ 44 /* uint8_t DPD2BCD8[4096]; -- DPD -> bytes (x3FF => 9 9 9 3) */
46 /* */ 45 /* */
47 /* In all cases the result (10 bits or 12 bits, or binary) is right-aligned */ 46 /* In all cases the result (10 bits or 12 bits, or binary) is right-aligned */
48 /* in the table entry. BIN2CHAR entries are a single byte length (0 for */ 47 /* in the table entry. BIN2CHAR entries are a single byte length (0 for */
49 /* value 0) followed by three digit characters; a trailing terminator is */ 48 /* value 0) followed by three digit characters; a trailing terminator is */
50 /* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */ 49 /* included to allow 4-char moves always. BIN2BCD8 and DPD2BCD8 entries */
51 /* are similar with the three BCD8 digits followed by a one-byte length» */ 50 /* are similar with the three BCD8 digits followed by a one-byte length */
52 /* (again, length=0 for value 0). */ 51 /* (again, length=0 for value 0). */
53 /* */ 52 /* */
54 /* To use a table, its name, prefixed with DEC_, must be defined with a» */ 53 /* To use a table, its name, prefixed with DEC_, must be defined with a */
55 /* value of 1 before this header file is included. For example: */ 54 /* value of 1 before this header file is included. For example: */
56 /* #define DEC_BCD2DPD 1 */ 55 /* #define DEC_BCD2DPD 1 */
57 /* This mechanism allows software to only include tables that are needed. */ 56 /* This mechanism allows software to only include tables that are needed. */
58 /* ------------------------------------------------------------------------ */ 57 /* ------------------------------------------------------------------------ */
59 58
60 #if defined(DEC_BCD2DPD) && DEC_BCD2DPD==1 && !defined(DECBCD2DPD) 59 #if defined(DEC_BCD2DPD) && DEC_BCD2DPD==1 && !defined(DECBCD2DPD)
61 #define DECBCD2DPD 60 #define DECBCD2DPD
62 61
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65
63 const uint16_t BCD2DPD[2458]={ 0, 1, 2, 3, 4, 5, 6, 7, 66 const uint16_t BCD2DPD[2458]={ 0, 1, 2, 3, 4, 5, 6, 7,
64 8, 9, 0, 0, 0, 0, 0, 0, 16, 17, 18, 19, 20, 67 8, 9, 0, 0, 0, 0, 0, 0, 16, 17, 18, 19, 20,
65 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 32, 33, 68 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 32, 33,
66 34, 35, 36, 37, 38, 39, 40, 41, 0, 0, 0, 0, 0, 69 34, 35, 36, 37, 38, 39, 40, 41, 0, 0, 0, 0, 0,
67 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 0, 70 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, 0,
68 0, 0, 0, 0, 64, 65, 66, 67, 68, 69, 70, 71, 72, 71 0, 0, 0, 0, 64, 65, 66, 67, 68, 69, 70, 71, 72,
69 73, 0, 0, 0, 0, 0, 0, 80, 81, 82, 83, 84, 85, 72 73, 0, 0, 0, 0, 0, 0, 80, 81, 82, 83, 84, 85,
70 86, 87, 88, 89, 0, 0, 0, 0, 0, 0, 96, 97, 98, 73 86, 87, 88, 89, 0, 0, 0, 0, 0, 0, 96, 97, 98,
71 99, 100, 101, 102, 103, 104, 105, 0, 0, 0, 0, 0, 0, 74 99, 100, 101, 102, 103, 104, 105, 0, 0, 0, 0, 0, 0,
72 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 0, 0, 0, 75 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 0, 0, 0,
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 784, 785, 946, 947, 788, 789, 750, 751, 752, 753, 754, 755, 756, 504 784, 785, 946, 947, 788, 789, 750, 751, 752, 753, 754, 755, 756,
502 757, 758, 759, 794, 795, 956, 957, 798, 799, 760, 761, 762, 763, 505 757, 758, 759, 794, 795, 956, 957, 798, 799, 760, 761, 762, 763,
503 764, 765, 766, 767, 768, 769, 786, 787, 966, 967, 988, 989, 770, 506 764, 765, 766, 767, 768, 769, 786, 787, 966, 967, 988, 989, 770,
504 771, 772, 773, 774, 775, 776, 777, 778, 779, 796, 797, 976, 977, 507 771, 772, 773, 774, 775, 776, 777, 778, 779, 796, 797, 976, 977,
505 998, 999}; 508 998, 999};
506 #endif 509 #endif
507 510
508 #if defined(DEC_DPD2BINK) && DEC_DPD2BINK==1 && !defined(DECDPD2BINK) 511 #if defined(DEC_DPD2BINK) && DEC_DPD2BINK==1 && !defined(DECDPD2BINK)
509 #define DECDPD2BINK 512 #define DECDPD2BINK
510 513
511 const uint32_t DPD2BINK[1024]={» 0, 1000, 2000, 3000, 4000, 5000, 514 const uint32_t DPD2BINK[1024]={ 0, 1000, 2000, 3000, 4000, 5000,
512 6000, 7000, 8000, 9000, 80000, 81000, 800000, 801000, 880000, 881000, 515 6000, 7000, 8000, 9000, 80000, 81000, 800000, 801000, 880000, 881000,
513 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 516 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000,
514 90000, 91000, 810000, 811000, 890000, 891000, 20000, 21000, 22000, 23000, 517 90000, 91000, 810000, 811000, 890000, 891000, 20000, 21000, 22000, 23000,
515 24000, 25000, 26000, 27000, 28000, 29000, 82000, 83000, 820000, 821000, 518 24000, 25000, 26000, 27000, 28000, 29000, 82000, 83000, 820000, 821000,
516 808000, 809000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 519 808000, 809000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000,
517 38000, 39000, 92000, 93000, 830000, 831000, 818000, 819000, 40000, 41000, 520 38000, 39000, 92000, 93000, 830000, 831000, 818000, 819000, 40000, 41000,
518 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 84000, 85000, 521 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 84000, 85000,
519 840000, 841000, 88000, 89000, 50000, 51000, 52000, 53000, 54000, 55000, 522 840000, 841000, 88000, 89000, 50000, 51000, 52000, 53000, 54000, 55000,
520 56000, 57000, 58000, 59000, 94000, 95000, 850000, 851000, 98000, 99000, 523 56000, 57000, 58000, 59000, 94000, 95000, 850000, 851000, 98000, 99000,
521 60000, 61000, 62000, 63000, 64000, 65000, 66000, 67000, 68000, 69000, 524 60000, 61000, 62000, 63000, 64000, 65000, 66000, 67000, 68000, 69000,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 750000, 751000, 752000, 753000, 754000, 755000, 756000, 757000, 758000, 759000, 612 750000, 751000, 752000, 753000, 754000, 755000, 756000, 757000, 758000, 759000,
610 794000, 795000, 956000, 957000, 798000, 799000, 760000, 761000, 762000, 763000, 613 794000, 795000, 956000, 957000, 798000, 799000, 760000, 761000, 762000, 763000,
611 764000, 765000, 766000, 767000, 768000, 769000, 786000, 787000, 966000, 967000, 614 764000, 765000, 766000, 767000, 768000, 769000, 786000, 787000, 966000, 967000,
612 988000, 989000, 770000, 771000, 772000, 773000, 774000, 775000, 776000, 777000, 615 988000, 989000, 770000, 771000, 772000, 773000, 774000, 775000, 776000, 777000,
613 778000, 779000, 796000, 797000, 976000, 977000, 998000, 999000}; 616 778000, 779000, 796000, 797000, 976000, 977000, 998000, 999000};
614 #endif 617 #endif
615 618
616 #if defined(DEC_DPD2BINM) && DEC_DPD2BINM==1 && !defined(DECDPD2BINM) 619 #if defined(DEC_DPD2BINM) && DEC_DPD2BINM==1 && !defined(DECDPD2BINM)
617 #define DECDPD2BINM 620 #define DECDPD2BINM
618 621
619 const uint32_t DPD2BINM[1024]={0, 1000000, 2000000,» 3000000, 4000000, 622 const uint32_t DPD2BINM[1024]={0, 1000000, 2000000, 3000000, 4000000,
620 5000000, 6000000,» 7000000, 8000000, 9000000,» 80000000, 81000000, 623 5000000, 6000000,» 7000000, 8000000, 9000000, 80000000, 81000000,
621 800000000, 801000000, 880000000, 881000000, 10000000,» 11000000, 12000000, 624 800000000, 801000000, 880000000, 881000000, 10000000, 11000000, 12000000,
622 13000000, 14000000,» 15000000, 16000000, 17000000,» 18000000, 19000000, 625 13000000, 14000000,» 15000000, 16000000, 17000000, 18000000, 19000000,
623 90000000, 91000000, 810000000, 811000000, 890000000, 891000000, 20000000, 626 90000000, 91000000, 810000000, 811000000, 890000000, 891000000, 20000000,
624 21000000, 22000000,» 23000000, 24000000, 25000000,» 26000000, 27000000, 627 21000000, 22000000,» 23000000, 24000000, 25000000, 26000000, 27000000,
625 28000000, 29000000, 82000000, 83000000, 820000000, 821000000, 808000000, 628 28000000, 29000000, 82000000, 83000000, 820000000, 821000000, 808000000,
626 809000000, 30000000,» 31000000, 32000000, 33000000,» 34000000, 35000000, 629 809000000, 30000000,» 31000000, 32000000, 33000000, 34000000, 35000000,
627 36000000, 37000000,» 38000000, 39000000, 92000000,» 93000000, 830000000, 630 36000000, 37000000,» 38000000, 39000000, 92000000, 93000000, 830000000,
628 831000000, 818000000, 819000000, 40000000, 41000000,» 42000000, 43000000, 631 831000000, 818000000, 819000000, 40000000, 41000000, 42000000, 43000000,
629 44000000, 45000000,» 46000000, 47000000, 48000000,» 49000000, 84000000, 632 44000000, 45000000,» 46000000, 47000000, 48000000, 49000000, 84000000,
630 85000000, 840000000, 841000000, 88000000, 89000000,» 50000000, 51000000, 633 85000000, 840000000, 841000000, 88000000, 89000000, 50000000, 51000000,
631 52000000, 53000000,» 54000000, 55000000, 56000000,» 57000000, 58000000, 634 52000000, 53000000,» 54000000, 55000000, 56000000, 57000000, 58000000,
632 59000000, 94000000,» 95000000, 850000000, 851000000,» 98000000, 99000000, 635 59000000, 94000000,» 95000000, 850000000, 851000000, 98000000, 99000000,
633 60000000, 61000000,» 62000000, 63000000, 64000000,» 65000000, 66000000, 636 60000000, 61000000,» 62000000, 63000000, 64000000, 65000000, 66000000,
634 67000000, 68000000, 69000000, 86000000, 87000000, 860000000, 861000000, 637 67000000, 68000000, 69000000, 86000000, 87000000, 860000000, 861000000,
635 888000000, 889000000,» 70000000, 71000000, 72000000,» 73000000, 74000000, 638 888000000, 889000000,» 70000000, 71000000, 72000000, 73000000, 74000000,
636 75000000, 76000000,» 77000000, 78000000, 79000000,» 96000000, 97000000, 639 75000000, 76000000,» 77000000, 78000000, 79000000, 96000000, 97000000,
637 870000000, 871000000, 898000000, 899000000, 100000000, 101000000, 102000000, 640 870000000, 871000000, 898000000, 899000000, 100000000, 101000000, 102000000,
638 103000000, 104000000, 105000000, 106000000, 107000000, 108000000, 109000000, 641 103000000, 104000000, 105000000, 106000000, 107000000, 108000000, 109000000,
639 180000000, 181000000, 900000000, 901000000, 980000000, 981000000, 110000000, 642 180000000, 181000000, 900000000, 901000000, 980000000, 981000000, 110000000,
640 111000000, 112000000, 113000000, 114000000, 115000000, 116000000, 117000000, 643 111000000, 112000000, 113000000, 114000000, 115000000, 116000000, 117000000,
641 118000000, 119000000, 190000000, 191000000, 910000000, 911000000, 990000000, 644 118000000, 119000000, 190000000, 191000000, 910000000, 911000000, 990000000,
642 991000000, 120000000, 121000000, 122000000, 123000000, 124000000, 125000000, 645 991000000, 120000000, 121000000, 122000000, 123000000, 124000000, 125000000,
643 126000000, 127000000, 128000000, 129000000, 182000000, 183000000, 920000000, 646 126000000, 127000000, 128000000, 129000000, 182000000, 183000000, 920000000,
644 921000000, 908000000, 909000000, 130000000, 131000000, 132000000, 133000000, 647 921000000, 908000000, 909000000, 130000000, 131000000, 132000000, 133000000,
645 134000000, 135000000, 136000000, 137000000, 138000000, 139000000, 192000000, 648 134000000, 135000000, 136000000, 137000000, 138000000, 139000000, 192000000,
646 193000000, 930000000, 931000000, 918000000, 919000000, 140000000, 141000000, 649 193000000, 930000000, 931000000, 918000000, 919000000, 140000000, 141000000,
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 9,1,8,3, 9,1,9,3, 9,2,0,3, 9,2,1,3, 9,2,2,3, 9,2,3,3, 9,2,4,3, 9,2,5,3, 9,2,6,3 , 1203 9,1,8,3, 9,1,9,3, 9,2,0,3, 9,2,1,3, 9,2,2,3, 9,2,3,3, 9,2,4,3, 9,2,5,3, 9,2,6,3 ,
1201 9,2,7,3, 9,2,8,3, 9,2,9,3, 9,3,0,3, 9,3,1,3, 9,3,2,3, 9,3,3,3, 9,3,4,3, 9,3,5,3 , 1204 9,2,7,3, 9,2,8,3, 9,2,9,3, 9,3,0,3, 9,3,1,3, 9,3,2,3, 9,3,3,3, 9,3,4,3, 9,3,5,3 ,
1202 9,3,6,3, 9,3,7,3, 9,3,8,3, 9,3,9,3, 9,4,0,3, 9,4,1,3, 9,4,2,3, 9,4,3,3, 9,4,4,3 , 1205 9,3,6,3, 9,3,7,3, 9,3,8,3, 9,3,9,3, 9,4,0,3, 9,4,1,3, 9,4,2,3, 9,4,3,3, 9,4,4,3 ,
1203 9,4,5,3, 9,4,6,3, 9,4,7,3, 9,4,8,3, 9,4,9,3, 9,5,0,3, 9,5,1,3, 9,5,2,3, 9,5,3,3 , 1206 9,4,5,3, 9,4,6,3, 9,4,7,3, 9,4,8,3, 9,4,9,3, 9,5,0,3, 9,5,1,3, 9,5,2,3, 9,5,3,3 ,
1204 9,5,4,3, 9,5,5,3, 9,5,6,3, 9,5,7,3, 9,5,8,3, 9,5,9,3, 9,6,0,3, 9,6,1,3, 9,6,2,3 , 1207 9,5,4,3, 9,5,5,3, 9,5,6,3, 9,5,7,3, 9,5,8,3, 9,5,9,3, 9,6,0,3, 9,6,1,3, 9,6,2,3 ,
1205 9,6,3,3, 9,6,4,3, 9,6,5,3, 9,6,6,3, 9,6,7,3, 9,6,8,3, 9,6,9,3, 9,7,0,3, 9,7,1,3 , 1208 9,6,3,3, 9,6,4,3, 9,6,5,3, 9,6,6,3, 9,6,7,3, 9,6,8,3, 9,6,9,3, 9,7,0,3, 9,7,1,3 ,
1206 9,7,2,3, 9,7,3,3, 9,7,4,3, 9,7,5,3, 9,7,6,3, 9,7,7,3, 9,7,8,3, 9,7,9,3, 9,8,0,3 , 1209 9,7,2,3, 9,7,3,3, 9,7,4,3, 9,7,5,3, 9,7,6,3, 9,7,7,3, 9,7,8,3, 9,7,9,3, 9,8,0,3 ,
1207 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 , 1210 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 ,
1208 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 , 1211 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 ,
1209 9,9,9,3}; 1212 9,9,9,3};
1213
1214 #ifdef __cplusplus
1215 }
1210 #endif 1216 #endif
1211 1217
1218 #endif
OLDNEW
« no previous file with comments | « gcc/libdecnumber/decContext.h ('k') | gcc/libdecnumber/decPacked.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698