Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/spu/spu.c @ 19:58ad6c70ea60
update gcc from 4.4.0 to 4.4.1.
author | kent@firefly.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 24 Sep 2009 13:21:57 +0900 |
parents | a06113de4d67 |
children | 3bfb6c00c1e0 |
comparison
equal
deleted
inserted
replaced
18:33936f7f2835 | 19:58ad6c70ea60 |
---|---|
50 #include "assert.h" | 50 #include "assert.h" |
51 #include "c-common.h" | 51 #include "c-common.h" |
52 #include "machmode.h" | 52 #include "machmode.h" |
53 #include "gimple.h" | 53 #include "gimple.h" |
54 #include "tm-constrs.h" | 54 #include "tm-constrs.h" |
55 #include "spu-builtins.h" | |
56 #include "ddg.h" | 55 #include "ddg.h" |
57 #include "sbitmap.h" | 56 #include "sbitmap.h" |
58 #include "timevar.h" | 57 #include "timevar.h" |
59 #include "df.h" | 58 #include "df.h" |
60 | 59 |
61 /* Builtin types, data and prototypes. */ | 60 /* Builtin types, data and prototypes. */ |
61 | |
62 enum spu_builtin_type_index | |
63 { | |
64 SPU_BTI_END_OF_PARAMS, | |
65 | |
66 /* We create new type nodes for these. */ | |
67 SPU_BTI_V16QI, | |
68 SPU_BTI_V8HI, | |
69 SPU_BTI_V4SI, | |
70 SPU_BTI_V2DI, | |
71 SPU_BTI_V4SF, | |
72 SPU_BTI_V2DF, | |
73 SPU_BTI_UV16QI, | |
74 SPU_BTI_UV8HI, | |
75 SPU_BTI_UV4SI, | |
76 SPU_BTI_UV2DI, | |
77 | |
78 /* A 16-byte type. (Implemented with V16QI_type_node) */ | |
79 SPU_BTI_QUADWORD, | |
80 | |
81 /* These all correspond to intSI_type_node */ | |
82 SPU_BTI_7, | |
83 SPU_BTI_S7, | |
84 SPU_BTI_U7, | |
85 SPU_BTI_S10, | |
86 SPU_BTI_S10_4, | |
87 SPU_BTI_U14, | |
88 SPU_BTI_16, | |
89 SPU_BTI_S16, | |
90 SPU_BTI_S16_2, | |
91 SPU_BTI_U16, | |
92 SPU_BTI_U16_2, | |
93 SPU_BTI_U18, | |
94 | |
95 /* These correspond to the standard types */ | |
96 SPU_BTI_INTQI, | |
97 SPU_BTI_INTHI, | |
98 SPU_BTI_INTSI, | |
99 SPU_BTI_INTDI, | |
100 | |
101 SPU_BTI_UINTQI, | |
102 SPU_BTI_UINTHI, | |
103 SPU_BTI_UINTSI, | |
104 SPU_BTI_UINTDI, | |
105 | |
106 SPU_BTI_FLOAT, | |
107 SPU_BTI_DOUBLE, | |
108 | |
109 SPU_BTI_VOID, | |
110 SPU_BTI_PTR, | |
111 | |
112 SPU_BTI_MAX | |
113 }; | |
114 | |
115 #define V16QI_type_node (spu_builtin_types[SPU_BTI_V16QI]) | |
116 #define V8HI_type_node (spu_builtin_types[SPU_BTI_V8HI]) | |
117 #define V4SI_type_node (spu_builtin_types[SPU_BTI_V4SI]) | |
118 #define V2DI_type_node (spu_builtin_types[SPU_BTI_V2DI]) | |
119 #define V4SF_type_node (spu_builtin_types[SPU_BTI_V4SF]) | |
120 #define V2DF_type_node (spu_builtin_types[SPU_BTI_V2DF]) | |
121 #define unsigned_V16QI_type_node (spu_builtin_types[SPU_BTI_UV16QI]) | |
122 #define unsigned_V8HI_type_node (spu_builtin_types[SPU_BTI_UV8HI]) | |
123 #define unsigned_V4SI_type_node (spu_builtin_types[SPU_BTI_UV4SI]) | |
124 #define unsigned_V2DI_type_node (spu_builtin_types[SPU_BTI_UV2DI]) | |
125 | |
126 static GTY(()) tree spu_builtin_types[SPU_BTI_MAX]; | |
127 | |
62 struct spu_builtin_range | 128 struct spu_builtin_range |
63 { | 129 { |
64 int low, high; | 130 int low, high; |
65 }; | 131 }; |
66 | 132 |
200 spu_libgcc_cmp_return_mode (void); | 266 spu_libgcc_cmp_return_mode (void); |
201 | 267 |
202 static enum machine_mode | 268 static enum machine_mode |
203 spu_libgcc_shift_count_mode (void); | 269 spu_libgcc_shift_count_mode (void); |
204 | 270 |
205 /* Built in types. */ | |
206 tree spu_builtin_types[SPU_BTI_MAX]; | |
207 | 271 |
208 /* TARGET overrides. */ | 272 /* TARGET overrides. */ |
209 | 273 |
210 #undef TARGET_INIT_BUILTINS | 274 #undef TARGET_INIT_BUILTINS |
211 #define TARGET_INIT_BUILTINS spu_init_builtins | 275 #define TARGET_INIT_BUILTINS spu_init_builtins |
5065 (MAX_REGISTER_RETURN * UNITS_PER_WORD))); | 5129 (MAX_REGISTER_RETURN * UNITS_PER_WORD))); |
5066 } | 5130 } |
5067 | 5131 |
5068 /* Create the built-in types and functions */ | 5132 /* Create the built-in types and functions */ |
5069 | 5133 |
5134 enum spu_function_code | |
5135 { | |
5136 #define DEF_BUILTIN(fcode, icode, name, type, params) fcode, | |
5137 #include "spu-builtins.def" | |
5138 #undef DEF_BUILTIN | |
5139 NUM_SPU_BUILTINS | |
5140 }; | |
5141 | |
5142 extern GTY(()) struct spu_builtin_description spu_builtins[NUM_SPU_BUILTINS]; | |
5143 | |
5070 struct spu_builtin_description spu_builtins[] = { | 5144 struct spu_builtin_description spu_builtins[] = { |
5071 #define DEF_BUILTIN(fcode, icode, name, type, params) \ | 5145 #define DEF_BUILTIN(fcode, icode, name, type, params) \ |
5072 {fcode, icode, name, type, params, NULL_TREE}, | 5146 {fcode, icode, name, type, params, NULL_TREE}, |
5073 #include "spu-builtins.def" | 5147 #include "spu-builtins.def" |
5074 #undef DEF_BUILTIN | 5148 #undef DEF_BUILTIN |
6296 if (strcmp (name, ".toe") == 0) | 6370 if (strcmp (name, ".toe") == 0) |
6297 return SECTION_BSS; | 6371 return SECTION_BSS; |
6298 return default_section_type_flags (decl, name, reloc); | 6372 return default_section_type_flags (decl, name, reloc); |
6299 } | 6373 } |
6300 | 6374 |
6375 #include "gt-spu.h" | |
6376 |