comparison gcc/config/pa/som.h @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents a06113de4d67
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
1 /* Definitions for SOM assembler support. 1 /* Definitions for SOM assembler support.
2 Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, 2 Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2010
3 Inc. 3 Free Software Foundation, Inc.
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 7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
116 fputs ("\t.PARAM ", FILE); \ 116 fputs ("\t.PARAM ", FILE); \
117 assemble_name (FILE, NAME); \ 117 assemble_name (FILE, NAME); \
118 fputs (",PRIV_LEV=3", FILE); \ 118 fputs (",PRIV_LEV=3", FILE); \
119 } \ 119 } \
120 for (parm = DECL_ARGUMENTS (DECL), i = 0; parm && i < 4; \ 120 for (parm = DECL_ARGUMENTS (DECL), i = 0; parm && i < 4; \
121 parm = TREE_CHAIN (parm)) \ 121 parm = DECL_CHAIN (parm)) \
122 { \ 122 { \
123 if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode \ 123 if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode \
124 && ! TARGET_SOFT_FLOAT) \ 124 && ! TARGET_SOFT_FLOAT) \
125 fprintf (FILE, ",ARGW%d=FR", i++); \ 125 fprintf (FILE, ",ARGW%d=FR", i++); \
126 else if (TYPE_MODE (DECL_ARG_TYPE (parm)) == DFmode \ 126 else if (TYPE_MODE (DECL_ARG_TYPE (parm)) == DFmode \
155 else \ 155 else \
156 i += arg_size; \ 156 i += arg_size; \
157 } \ 157 } \
158 } \ 158 } \
159 /* anonymous args */ \ 159 /* anonymous args */ \
160 if (TYPE_ARG_TYPES (tree_type) != 0 \ 160 if (stdarg_p (tree_type)) \
161 && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\
162 != void_type_node)) \
163 { \ 161 { \
164 for (; i < 4; i++) \ 162 for (; i < 4; i++) \
165 fprintf (FILE, ",ARGW%d=GR", i); \ 163 fprintf (FILE, ",ARGW%d=GR", i); \
166 } \ 164 } \
167 if (TYPE_MODE (fntype) == DFmode && ! TARGET_SOFT_FLOAT) \ 165 if (TYPE_MODE (fntype) == DFmode && ! TARGET_SOFT_FLOAT) \
272 on the location of the GCC tool directory. The downside is GCC 270 on the location of the GCC tool directory. The downside is GCC
273 cannot be moved after installation using a symlink. */ 271 cannot be moved after installation using a symlink. */
274 #define ALWAYS_STRIP_DOTDOT 1 272 #define ALWAYS_STRIP_DOTDOT 1
275 273
276 /* If GAS supports weak, we can support weak when we have working linker 274 /* If GAS supports weak, we can support weak when we have working linker
277 support for secondary definitions and are generating code for GAS. */ 275 support for secondary definitions and are generating code for GAS.
276 This is primarily for one-only support as SOM doesn't allow undefined
277 weak symbols. */
278 #ifdef HAVE_GAS_WEAK 278 #ifdef HAVE_GAS_WEAK
279 #define SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS) 279 #define TARGET_SUPPORTS_WEAK (TARGET_SOM_SDEF && TARGET_GAS)
280 #else 280 #else
281 #define SUPPORTS_WEAK 0 281 #define TARGET_SUPPORTS_WEAK 0
282 #endif 282 #endif
283 283
284 /* CVS GAS as of 4/28/04 supports a comdat parameter for the .nsubspa 284 /* CVS GAS as of 4/28/04 supports a comdat parameter for the .nsubspa
285 directive. This provides one-only linkage semantics even though we 285 directive. This provides one-only linkage semantics even though we
286 don't have weak support. */ 286 don't have weak support. */
289 #else 289 #else
290 #define SUPPORTS_SOM_COMDAT 0 290 #define SUPPORTS_SOM_COMDAT 0
291 #endif 291 #endif
292 292
293 /* We can support one only if we support weak or comdat. */ 293 /* We can support one only if we support weak or comdat. */
294 #define SUPPORTS_ONE_ONLY (SUPPORTS_WEAK || SUPPORTS_SOM_COMDAT) 294 #define SUPPORTS_ONE_ONLY (TARGET_SUPPORTS_WEAK || SUPPORTS_SOM_COMDAT)
295 295
296 /* We use DECL_COMMON for uninitialized one-only variables as we don't 296 /* We use DECL_COMMON for uninitialized one-only variables as we don't
297 have linkonce .bss. We use SOM secondary definitions or comdat for 297 have linkonce .bss. We use SOM secondary definitions or comdat for
298 initialized variables and functions. */ 298 initialized variables and functions. */
299 #define MAKE_DECL_ONE_ONLY(DECL) \ 299 #define MAKE_DECL_ONE_ONLY(DECL) \
300 do { \ 300 do { \
301 if (TREE_CODE (DECL) == VAR_DECL \ 301 if (TREE_CODE (DECL) == VAR_DECL \
302 && (DECL_INITIAL (DECL) == 0 \ 302 && (DECL_INITIAL (DECL) == 0 \
303 || DECL_INITIAL (DECL) == error_mark_node)) \ 303 || DECL_INITIAL (DECL) == error_mark_node)) \
304 DECL_COMMON (DECL) = 1; \ 304 DECL_COMMON (DECL) = 1; \
305 else if (SUPPORTS_WEAK) \ 305 else if (TARGET_SUPPORTS_WEAK) \
306 DECL_WEAK (DECL) = 1; \ 306 DECL_WEAK (DECL) = 1; \
307 } while (0) 307 } while (0)
308 308
309 /* This is how we tell the assembler that a symbol is weak. The SOM 309 /* This is how we tell the assembler that a symbol is weak. The SOM
310 weak implementation uses the secondary definition (sdef) flag. 310 weak implementation uses the secondary definition (sdef) flag.