Add diclaimer of copyright to _osname() manual page.
[unix-history] / gnu / usr.bin / cc / libgcc / _fixunsdfdi.c
CommitLineData
9bf86ebb
PR
1extern int target_flags;
2
3enum reg_class
4{
5 NO_REGS,
6 AREG, DREG, CREG, BREG,
7 Q_REGS,
8 SIREG, DIREG,
9 INDEX_REGS,
10 GENERAL_REGS,
11 FP_TOP_REG, FP_SECOND_REG,
12 FLOAT_REGS,
13 ALL_REGS, LIM_REG_CLASSES
14};
15extern enum reg_class regclass_map[17 ];
16
17
18extern struct rtx_def *i386_compare_op0, *i386_compare_op1;
19extern struct rtx_def *(*i386_compare_gen)(), *(*i386_compare_gen_eq)();
20extern char *hi_reg_name[];
21extern char *qi_reg_name[];
22extern char *qi_high_reg_name[];
23
24enum machine_mode {
25 VOIDmode ,
26 QImode ,
27 HImode ,
28 PSImode ,
29 SImode ,
30 PDImode ,
31 DImode ,
32 TImode ,
33 OImode ,
34 QFmode ,
35 HFmode ,
36 SFmode ,
37 DFmode ,
38 XFmode ,
39 TFmode ,
40 SCmode ,
41 DCmode ,
42 XCmode ,
43 TCmode ,
44 CQImode ,
45 CHImode ,
46 CSImode ,
47 CDImode ,
48 CTImode ,
49 COImode ,
50 BLKmode ,
51 CCmode ,
52 CCFPEQmode ,
53MAX_MACHINE_MODE };
54extern char *mode_name[];
55enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC,
56 MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT, MAX_MODE_CLASS};
57extern enum mode_class mode_class[];
58extern int mode_size[];
59extern int mode_unit_size[];
60extern enum machine_mode mode_wider_mode[];
61extern enum machine_mode mode_for_size (unsigned int, enum mode_class, int) ;
62extern enum machine_mode get_best_mode (int, int, int, enum machine_mode, int) ;
63extern enum machine_mode class_narrowest_mode[];
64extern enum machine_mode byte_mode;
65extern enum machine_mode word_mode;
66typedef int ptrdiff_t;
67typedef unsigned int size_t;
68typedef short unsigned int wchar_t;
69typedef unsigned int UQItype __attribute__ ((mode (QI)));
70typedef int SItype __attribute__ ((mode (SI)));
71typedef unsigned int USItype __attribute__ ((mode (SI)));
72typedef int DItype __attribute__ ((mode (DI)));
73typedef unsigned int UDItype __attribute__ ((mode (DI)));
74typedef float SFtype __attribute__ ((mode (SF)));
75typedef float DFtype __attribute__ ((mode (DF)));
76typedef int word_type __attribute__ ((mode (SI)));
77 struct DIstruct {SItype low, high;};
78typedef union
79{
80 struct DIstruct s;
81 DItype ll;
82} DIunion;
83extern DItype __fixunssfdi (SFtype a);
84extern DItype __fixunsdfdi (DFtype a);
85DItype
086639c2
PR
86__fixunsdfdi (a)
87 DFtype a;
9bf86ebb
PR
88{
89 DFtype b;
90 UDItype v;
91 if (a < 0)
92 return 0;
93
94 b = (a / (((UDItype) 1) << (sizeof (SItype) * 8 ) ) );
95
96 v = (USItype) b;
97 v <<= (sizeof (SItype) * 8 ) ;
98
99 a -= (DFtype)v;
100
101 if (a < 0)
102 v -= (USItype) (- a);
103 else
104 v += (USItype) a;
105 return v;
106}