Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/i386/netware.c @ 36:855418dad1a3
gcc-4.4-20091020
author | e075725 |
---|---|
date | Tue, 22 Dec 2009 21:19:31 +0900 |
parents | a06113de4d67 |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
19:58ad6c70ea60 | 36:855418dad1a3 |
---|---|
28 #include "output.h" | 28 #include "output.h" |
29 #include "tree.h" | 29 #include "tree.h" |
30 #include "flags.h" | 30 #include "flags.h" |
31 #include "tm_p.h" | 31 #include "tm_p.h" |
32 #include "toplev.h" | 32 #include "toplev.h" |
33 #include "langhooks.h" | |
33 #include "ggc.h" | 34 #include "ggc.h" |
34 | 35 |
35 /* Return string which is the function name, identified by ID, modified | 36 /* Return string which is the function name, identified by ID, modified |
36 with PREFIX and a suffix consisting of an atsign (@) followed by the | 37 with PREFIX and a suffix consisting of an atsign (@) followed by the |
37 number of bytes of arguments. If ID is NULL use the DECL_NAME as base. | 38 number of bytes of arguments. If ID is NULL use the DECL_NAME as base. |
177 void | 178 void |
178 i386_nlm_encode_section_info (tree decl, rtx rtl, int first) | 179 i386_nlm_encode_section_info (tree decl, rtx rtl, int first) |
179 { | 180 { |
180 default_encode_section_info (decl, rtl, first); | 181 default_encode_section_info (decl, rtl, first); |
181 | 182 |
182 if (first | 183 if (TREE_CODE (decl) == FUNCTION_DECL |
183 && TREE_CODE (decl) == FUNCTION_DECL | |
184 /* Do not change the identifier if a verbatim asmspec | 184 /* Do not change the identifier if a verbatim asmspec |
185 or if stdcall suffix already added. */ | 185 or if stdcall suffix already added. */ |
186 && *IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) != '*' | 186 && *IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)) != '*' |
187 && !strchr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), '@')) | 187 && !strchr (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)), '@') |
188 { | 188 /* FIXME: Imported stdcall names are not modified by the Ada frontend. |
189 /* FIXME: In Ada, and perhaps other language frontends, | 189 Check and decorate the RTL name now. */ |
190 imported stdcall names may not yet have been modified. | 190 && strcmp (lang_hooks.name, "GNU Ada") == 0) |
191 Check and do it know. */ | 191 { |
192 rtx symbol = XEXP (rtl, 0); | 192 rtx symbol = XEXP (rtl, 0); |
193 tree new_id; | 193 tree new_id; |
194 tree old_id = DECL_ASSEMBLER_NAME (decl); | 194 tree old_id = DECL_ASSEMBLER_NAME (decl); |
195 | 195 |
196 gcc_assert (GET_CODE (symbol) == SYMBOL_REF); | 196 gcc_assert (GET_CODE (symbol) == SYMBOL_REF); |
197 | 197 |
198 if ((new_id = i386_nlm_maybe_mangle_decl_assembler_name (decl, old_id))) | 198 if ((new_id = i386_nlm_maybe_mangle_decl_assembler_name (decl, old_id))) |
199 { | 199 XSTR (symbol, 0) = IDENTIFIER_POINTER (new_id); |
200 /* These attributes must be present on first declaration, | |
201 change_decl_assembler_name will warn if they are added | |
202 later and the decl has been referenced, but duplicate_decls | |
203 should catch the mismatch first. */ | |
204 change_decl_assembler_name (decl, new_id); | |
205 XSTR (symbol, 0) = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); | |
206 } | |
207 } | 200 } |
208 } | 201 } |
209 | 202 |
210 /* Strip the stdcall/fastcall/regparm pre-/suffix. */ | 203 /* Strip the stdcall/fastcall/regparm pre-/suffix. */ |
211 | 204 |
231 } | 224 } |
232 } | 225 } |
233 } | 226 } |
234 return name; | 227 return name; |
235 } | 228 } |
236 | |
237 /* Sometimes certain combinations of command options do not make | |
238 sense on a particular target machine. You can define a macro | |
239 `OVERRIDE_OPTIONS' to take account of this. This macro, if | |
240 defined, is executed once just after all the command options have | |
241 been parsed. | |
242 | |
243 Don't use this macro to turn on various extra optimizations for | |
244 `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ | |
245 | |
246 void | |
247 netware_override_options (void) | |
248 { | |
249 override_options (); | |
250 | |
251 if (flag_pic) | |
252 { | |
253 error ("-fPIC and -fpic are not supported for this target"); | |
254 flag_pic = 0; | |
255 } | |
256 } |