xref: /openbsd/gnu/gcc/gcc/config/alpha/unicosmk.h (revision 404b540a)
1*404b540aSrobert /* Definitions of target machine for GNU compiler, for DEC Alpha on Cray
2*404b540aSrobert    T3E running Unicos/Mk.
3*404b540aSrobert    Copyright (C) 2001, 2002, 2004, 2005
4*404b540aSrobert    Free Software Foundation, Inc.
5*404b540aSrobert    Contributed by Roman Lechtchinsky (rl@cs.tu-berlin.de)
6*404b540aSrobert 
7*404b540aSrobert This file is part of GCC.
8*404b540aSrobert 
9*404b540aSrobert GCC is free software; you can redistribute it and/or modify
10*404b540aSrobert it under the terms of the GNU General Public License as published by
11*404b540aSrobert the Free Software Foundation; either version 2, or (at your option)
12*404b540aSrobert any later version.
13*404b540aSrobert 
14*404b540aSrobert GCC is distributed in the hope that it will be useful,
15*404b540aSrobert but WITHOUT ANY WARRANTY; without even the implied warranty of
16*404b540aSrobert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17*404b540aSrobert GNU General Public License for more details.
18*404b540aSrobert 
19*404b540aSrobert You should have received a copy of the GNU General Public License
20*404b540aSrobert along with GCC; see the file COPYING.  If not, write to
21*404b540aSrobert the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22*404b540aSrobert Boston, MA 02110-1301, USA.  */
23*404b540aSrobert 
24*404b540aSrobert #undef TARGET_ABI_UNICOSMK
25*404b540aSrobert #define TARGET_ABI_UNICOSMK 1
26*404b540aSrobert 
27*404b540aSrobert /* CAM requires a slash before floating-pointing instruction suffixes.  */
28*404b540aSrobert 
29*404b540aSrobert #undef TARGET_AS_SLASH_BEFORE_SUFFIX
30*404b540aSrobert #define TARGET_AS_SLASH_BEFORE_SUFFIX 1
31*404b540aSrobert 
32*404b540aSrobert /* The following defines are necessary for the standard headers to work
33*404b540aSrobert    correctly.  */
34*404b540aSrobert 
35*404b540aSrobert #define TARGET_OS_CPP_BUILTINS()				\
36*404b540aSrobert     do {							\
37*404b540aSrobert 	builtin_define ("__unix");				\
38*404b540aSrobert 	builtin_define ("_UNICOS=205");				\
39*404b540aSrobert 	builtin_define ("_CRAY");				\
40*404b540aSrobert 	builtin_define ("_CRAYT3E");				\
41*404b540aSrobert 	builtin_define ("_CRAYMPP");				\
42*404b540aSrobert 	builtin_define ("_CRAYIEEE");				\
43*404b540aSrobert 	builtin_define ("_ADDR64");				\
44*404b540aSrobert 	builtin_define ("_LD64");				\
45*404b540aSrobert 	builtin_define ("__UNICOSMK__");			\
46*404b540aSrobert     } while (0)
47*404b540aSrobert 
48*404b540aSrobert #define SHORT_TYPE_SIZE 32
49*404b540aSrobert 
50*404b540aSrobert #undef INT_TYPE_SIZE
51*404b540aSrobert #define INT_TYPE_SIZE 64
52*404b540aSrobert 
53*404b540aSrobert /* This is consistent with the definition Cray CC uses.  */
54*404b540aSrobert #undef WCHAR_TYPE
55*404b540aSrobert #define WCHAR_TYPE "int"
56*404b540aSrobert #undef WCHAR_TYPE_SIZE
57*404b540aSrobert #define WCHAR_TYPE_SIZE 64
58*404b540aSrobert 
59*404b540aSrobert /*
60*404b540aSrobert #define SIZE_TYPE "unsigned int"
61*404b540aSrobert #define PTRDIFF_TYPE "int"
62*404b540aSrobert */
63*404b540aSrobert 
64*404b540aSrobert /* Alphas are operated in big endian mode on the Cray T3E.  */
65*404b540aSrobert 
66*404b540aSrobert #undef BITS_BIG_ENDIAN
67*404b540aSrobert #undef BYTES_BIG_ENDIAN
68*404b540aSrobert #undef WORDS_BIG_ENDIAN
69*404b540aSrobert #define BITS_BIG_ENDIAN 0
70*404b540aSrobert #define BYTES_BIG_ENDIAN 1
71*404b540aSrobert #define WORDS_BIG_ENDIAN 1
72*404b540aSrobert 
73*404b540aSrobert 
74*404b540aSrobert /* Every structure's size must be a multiple of this.  */
75*404b540aSrobert 
76*404b540aSrobert #undef STRUCTURE_SIZE_BOUNDARY
77*404b540aSrobert #define STRUCTURE_SIZE_BOUNDARY 64
78*404b540aSrobert 
79*404b540aSrobert /* No data type wants to be aligned rounder than this.  */
80*404b540aSrobert 
81*404b540aSrobert #undef BIGGEST_ALIGNMENT
82*404b540aSrobert #define BIGGEST_ALIGNMENT 256
83*404b540aSrobert 
84*404b540aSrobert /* Include the frame pointer in fixed_regs and call_used_regs as it can't be
85*404b540aSrobert    used as a general-purpose register even in frameless functions.
86*404b540aSrobert    ??? The global_regs hack is needed for now because -O2 sometimes tries to
87*404b540aSrobert    eliminate $15 increments/decrements in frameless functions.  */
88*404b540aSrobert 
89*404b540aSrobert #undef CONDITIONAL_REGISTER_USAGE
90*404b540aSrobert #define CONDITIONAL_REGISTER_USAGE	\
91*404b540aSrobert   do {					\
92*404b540aSrobert     fixed_regs[15] = 1;			\
93*404b540aSrobert     call_used_regs[15] = 1;		\
94*404b540aSrobert     global_regs[15] = 1;		\
95*404b540aSrobert   } while(0)
96*404b540aSrobert 
97*404b540aSrobert /* The stack frame grows downward.  */
98*404b540aSrobert 
99*404b540aSrobert #define FRAME_GROWS_DOWNWARD 1
100*404b540aSrobert 
101*404b540aSrobert /* Define the offset between two registers, one to be eliminated, and the
102*404b540aSrobert    other its replacement, at the start of a routine. This is somewhat
103*404b540aSrobert    complicated on the T3E which is why we use a function.  */
104*404b540aSrobert 
105*404b540aSrobert #undef INITIAL_ELIMINATION_OFFSET
106*404b540aSrobert #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)			\
107*404b540aSrobert   do {									\
108*404b540aSrobert     (OFFSET) = unicosmk_initial_elimination_offset ((FROM), (TO));	\
109*404b540aSrobert   } while (0)
110*404b540aSrobert 
111*404b540aSrobert 
112*404b540aSrobert /* Define this if stack space is still allocated for a parameter passed
113*404b540aSrobert    in a register. On the T3E, stack space is preallocated for all outgoing
114*404b540aSrobert    arguments, including those passed in registers. To avoid problems, we
115*404b540aSrobert    assume that at least 48 bytes (i.e. enough space for all arguments passed
116*404b540aSrobert    in registers) are allocated.  */
117*404b540aSrobert 
118*404b540aSrobert #define REG_PARM_STACK_SPACE(DECL) 48
119*404b540aSrobert #define OUTGOING_REG_PARM_STACK_SPACE
120*404b540aSrobert 
121*404b540aSrobert /* If an argument can't be passed in registers even though not all argument
122*404b540aSrobert    registers have been used yet, it is passed on the stack in the space
123*404b540aSrobert    preallocated for these registers.  */
124*404b540aSrobert 
125*404b540aSrobert #define STACK_PARMS_IN_REG_PARM_AREA
126*404b540aSrobert 
127*404b540aSrobert /* Define a data type for recording info about an argument list
128*404b540aSrobert    during the scan of that argument list.  This data type should
129*404b540aSrobert    hold all necessary information about the function itself
130*404b540aSrobert    and about the args processed so far, enough to enable macros
131*404b540aSrobert    such as FUNCTION_ARG to determine where the next arg should go.
132*404b540aSrobert 
133*404b540aSrobert    On Unicos/Mk, this is a structure that contains various information for
134*404b540aSrobert    the static subroutine information block (SSIB) and the call information
135*404b540aSrobert    word (CIW).  */
136*404b540aSrobert 
137*404b540aSrobert typedef struct {
138*404b540aSrobert 
139*404b540aSrobert   /* The overall number of arguments.  */
140*404b540aSrobert   int num_args;
141*404b540aSrobert 
142*404b540aSrobert   /* The overall size of the arguments in words.  */
143*404b540aSrobert   int num_arg_words;
144*404b540aSrobert 
145*404b540aSrobert   /* The number of words passed in registers.  */
146*404b540aSrobert   int num_reg_words;
147*404b540aSrobert 
148*404b540aSrobert   /* If an argument must be passed in the stack, all subsequent arguments
149*404b540aSrobert      must be passed there, too. This flag indicates whether this is the
150*404b540aSrobert      case.  */
151*404b540aSrobert   int force_stack;
152*404b540aSrobert 
153*404b540aSrobert   /* This array indicates whether a word is passed in an integer register or
154*404b540aSrobert      a floating point one.  */
155*404b540aSrobert 
156*404b540aSrobert   /* For each of the 6 register arguments, the corresponding flag in this
157*404b540aSrobert      array indicates whether the argument is passed in an integer or a
158*404b540aSrobert      floating point register.  */
159*404b540aSrobert   int reg_args_type[6];
160*404b540aSrobert 
161*404b540aSrobert } unicosmk_arg_info;
162*404b540aSrobert 
163*404b540aSrobert #undef CUMULATIVE_ARGS
164*404b540aSrobert #define CUMULATIVE_ARGS unicosmk_arg_info
165*404b540aSrobert 
166*404b540aSrobert /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a
167*404b540aSrobert    function whose data type is FNTYPE.  For a library call, FNTYPE is 0.  */
168*404b540aSrobert 
169*404b540aSrobert #undef INIT_CUMULATIVE_ARGS
170*404b540aSrobert #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
171*404b540aSrobert   do { (CUM).num_args = 0;					\
172*404b540aSrobert        (CUM).num_arg_words = 0;					\
173*404b540aSrobert        (CUM).num_reg_words = 0;					\
174*404b540aSrobert        (CUM).force_stack = 0;					\
175*404b540aSrobert   } while(0)
176*404b540aSrobert 
177*404b540aSrobert /* Update the data in CUM to advance over an argument of mode MODE and data
178*404b540aSrobert    type TYPE. (TYPE is null for libcalls where that information may not be
179*404b540aSrobert    available.)
180*404b540aSrobert 
181*404b540aSrobert    On Unicos/Mk, at most 6 words can be passed in registers. Structures
182*404b540aSrobert    which fit in two words are passed in registers, larger structures are
183*404b540aSrobert    passed on stack.  */
184*404b540aSrobert 
185*404b540aSrobert #undef FUNCTION_ARG_ADVANCE
186*404b540aSrobert #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)		\
187*404b540aSrobert do {								\
188*404b540aSrobert   int size;							\
189*404b540aSrobert 								\
190*404b540aSrobert   size = ALPHA_ARG_SIZE (MODE, TYPE, NAMED);			\
191*404b540aSrobert                                                                 \
192*404b540aSrobert   if (size > 2							\
193*404b540aSrobert       || (CUM).num_reg_words + size > 6				\
194*404b540aSrobert       || targetm.calls.must_pass_in_stack (MODE, TYPE))		\
195*404b540aSrobert     (CUM).force_stack = 1;					\
196*404b540aSrobert                                                                 \
197*404b540aSrobert   if (! (CUM).force_stack)					\
198*404b540aSrobert     {								\
199*404b540aSrobert       int i;							\
200*404b540aSrobert       int isfloat;						\
201*404b540aSrobert       isfloat = (GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT	\
202*404b540aSrobert               || GET_MODE_CLASS (MODE) == MODE_FLOAT);		\
203*404b540aSrobert       for (i = 0; i < size; i++)				\
204*404b540aSrobert         {							\
205*404b540aSrobert           (CUM).reg_args_type[(CUM).num_reg_words] = isfloat;	\
206*404b540aSrobert           ++(CUM).num_reg_words;				\
207*404b540aSrobert         }							\
208*404b540aSrobert     }								\
209*404b540aSrobert   (CUM).num_arg_words += size;					\
210*404b540aSrobert   ++(CUM).num_args;						\
211*404b540aSrobert } while(0)
212*404b540aSrobert 
213*404b540aSrobert /* This ensures that $15 increments/decrements in leaf functions won't get
214*404b540aSrobert    eliminated.  */
215*404b540aSrobert 
216*404b540aSrobert #undef EPILOGUE_USES
217*404b540aSrobert #define EPILOGUE_USES(REGNO)  ((REGNO) == 26 || (REGNO) == 15)
218*404b540aSrobert 
219*404b540aSrobert /* Would have worked, only the stack doesn't seem to be executable
220*404b540aSrobert #undef TRAMPOLINE_TEMPLATE
221*404b540aSrobert #define TRAMPOLINE_TEMPLATE(FILE)			\
222*404b540aSrobert do { fprintf (FILE, "\tbr $1,0\n");			\
223*404b540aSrobert      fprintf (FILE, "\tldq $0,12($1)\n");		\
224*404b540aSrobert      fprintf (FILE, "\tldq $1,20($1)\n");		\
225*404b540aSrobert      fprintf (FILE, "\tjmp $31,(r0)\n");		\
226*404b540aSrobert      fprintf (FILE, "\tbis $31,$31,$31\n");		\
227*404b540aSrobert      fprintf (FILE, "\tbis $31,$31,$31\n");		\
228*404b540aSrobert } while (0) */
229*404b540aSrobert 
230*404b540aSrobert /* We don't support nested functions (yet).  */
231*404b540aSrobert 
232*404b540aSrobert #undef TRAMPOLINE_TEMPLATE
233*404b540aSrobert #define TRAMPOLINE_TEMPLATE(FILE) gcc_unreachable ()
234*404b540aSrobert 
235*404b540aSrobert /* Specify the machine mode that this machine uses for the index in the
236*404b540aSrobert    tablejump instruction. On Unicos/Mk, we don't support relative case
237*404b540aSrobert    vectors yet, thus the entries should be absolute addresses.  */
238*404b540aSrobert 
239*404b540aSrobert #undef CASE_VECTOR_MODE
240*404b540aSrobert #define CASE_VECTOR_MODE DImode
241*404b540aSrobert 
242*404b540aSrobert #undef CASE_VECTOR_PC_RELATIVE
243*404b540aSrobert 
244*404b540aSrobert /* Define this as 1 if `char' should by default be signed; else as 0.  */
245*404b540aSrobert /* #define DEFAULT_SIGNED_CHAR 1 */
246*404b540aSrobert 
247*404b540aSrobert /* There are no read-only sections on Unicos/Mk.  */
248*404b540aSrobert 
249*404b540aSrobert #undef READONLY_DATA_SECTION_ASM_OP
250*404b540aSrobert 
251*404b540aSrobert /* We take care of this in unicosmk_file_start.  */
252*404b540aSrobert 
253*404b540aSrobert #undef ASM_OUTPUT_SOURCE_FILENAME
254*404b540aSrobert 
255*404b540aSrobert /* This is how to output a label for a jump table.  Arguments are the same as
256*404b540aSrobert    for (*targetm.asm_out.internal_label), except the insn for the jump table is
257*404b540aSrobert    passed.  */
258*404b540aSrobert 
259*404b540aSrobert #undef ASM_OUTPUT_CASE_LABEL
260*404b540aSrobert #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN)	\
261*404b540aSrobert   (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM)
262*404b540aSrobert 
263*404b540aSrobert /* CAM has some restrictions with respect to string literals. It won't
264*404b540aSrobert    accept lines with more that 256 characters which means that we have
265*404b540aSrobert    to split long strings. Moreover, it only accepts escape sequences of
266*404b540aSrobert    the form \nnn in the range 0 to 127. We generate .byte directives for
267*404b540aSrobert    escapes characters greater than 127. And finally, ` must be escaped.  */
268*404b540aSrobert 
269*404b540aSrobert #undef ASM_OUTPUT_ASCII
270*404b540aSrobert #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
271*404b540aSrobert   do {									      \
272*404b540aSrobert     FILE *_hide_asm_out_file = (MYFILE);				      \
273*404b540aSrobert     const unsigned char *_hide_p = (const unsigned char *) (MYSTRING);	      \
274*404b540aSrobert     int _hide_thissize = (MYLENGTH);					      \
275*404b540aSrobert     int _size_so_far = 0;						      \
276*404b540aSrobert     {									      \
277*404b540aSrobert       FILE *asm_out_file = _hide_asm_out_file;				      \
278*404b540aSrobert       const unsigned char *p = _hide_p;					      \
279*404b540aSrobert       int thissize = _hide_thissize;					      \
280*404b540aSrobert       int in_ascii = 0;							      \
281*404b540aSrobert       int i;								      \
282*404b540aSrobert 									      \
283*404b540aSrobert       for (i = 0; i < thissize; i++)					      \
284*404b540aSrobert 	{								      \
285*404b540aSrobert 	  register int c = p[i];					      \
286*404b540aSrobert 									      \
287*404b540aSrobert 	  if (c > 127)							      \
288*404b540aSrobert 	    {								      \
289*404b540aSrobert 	      if (in_ascii)						      \
290*404b540aSrobert 		{							      \
291*404b540aSrobert 		  fprintf (asm_out_file, "\"\n");			      \
292*404b540aSrobert 		  in_ascii = 0;						      \
293*404b540aSrobert 		}							      \
294*404b540aSrobert 									      \
295*404b540aSrobert 	      fprintf (asm_out_file, "\t.byte\t%d\n", c);		      \
296*404b540aSrobert 	    }								      \
297*404b540aSrobert 	  else								      \
298*404b540aSrobert 	    {								      \
299*404b540aSrobert 	      if (! in_ascii)						      \
300*404b540aSrobert 		{							      \
301*404b540aSrobert 		  fprintf (asm_out_file, "\t.ascii\t\"");		      \
302*404b540aSrobert 		  in_ascii = 1;						      \
303*404b540aSrobert 		  _size_so_far = 0;					      \
304*404b540aSrobert 		}							      \
305*404b540aSrobert 	      else if (_size_so_far >= 64)				      \
306*404b540aSrobert 		{							      \
307*404b540aSrobert 		  fprintf (asm_out_file, "\"\n\t.ascii\t\"");		      \
308*404b540aSrobert 		  _size_so_far = 0;					      \
309*404b540aSrobert 		}							      \
310*404b540aSrobert 									      \
311*404b540aSrobert 	      if (c == '\"' || c == '\\' || c == '`')			      \
312*404b540aSrobert 		putc ('\\', asm_out_file);				      \
313*404b540aSrobert 	      if (c >= ' ')						      \
314*404b540aSrobert 		putc (c, asm_out_file);					      \
315*404b540aSrobert 	      else							      \
316*404b540aSrobert 		fprintf (asm_out_file, "\\%.3o", c);			      \
317*404b540aSrobert 	      ++ _size_so_far;						      \
318*404b540aSrobert 	    }								      \
319*404b540aSrobert 	}								      \
320*404b540aSrobert       if (in_ascii)							      \
321*404b540aSrobert 	fprintf (asm_out_file, "\"\n");					      \
322*404b540aSrobert     }									      \
323*404b540aSrobert   } while(0)
324*404b540aSrobert 
325*404b540aSrobert /* This is how to output an element of a case-vector that is absolute.  */
326*404b540aSrobert 
327*404b540aSrobert #undef ASM_OUTPUT_ADDR_VEC_ELT
328*404b540aSrobert #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)	\
329*404b540aSrobert   fprintf (FILE, "\t.quad $L%d\n", (VALUE))
330*404b540aSrobert 
331*404b540aSrobert /* This is how to output an element of a case-vector that is relative.
332*404b540aSrobert    (Unicos/Mk does not use such vectors yet).  */
333*404b540aSrobert 
334*404b540aSrobert #undef ASM_OUTPUT_ADDR_DIFF_ELT
335*404b540aSrobert #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) gcc_unreachable ()
336*404b540aSrobert 
337*404b540aSrobert /* We can't output case vectors in the same section as the function code
338*404b540aSrobert    because CAM doesn't allow data definitions in code sections. Thus, we
339*404b540aSrobert    simply record the case vectors and put them in a separate section after
340*404b540aSrobert    the function.  */
341*404b540aSrobert 
342*404b540aSrobert #define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \
343*404b540aSrobert   unicosmk_defer_case_vector ((LAB),(VEC))
344*404b540aSrobert 
345*404b540aSrobert #define ASM_OUTPUT_ADDR_DIFF_VEC(LAB,VEC) gcc_unreachable ()
346*404b540aSrobert 
347*404b540aSrobert /* This is how to output an assembler line that says to advance the location
348*404b540aSrobert    counter to a multiple of 2**LOG bytes. Annoyingly, CAM always uses zeroes
349*404b540aSrobert    to fill the unused space which does not work in code sections. We have to
350*404b540aSrobert    be careful not to use the .align directive in code sections.  */
351*404b540aSrobert 
352*404b540aSrobert #undef ASM_OUTPUT_ALIGN
353*404b540aSrobert #define ASM_OUTPUT_ALIGN(STREAM,LOG) unicosmk_output_align (STREAM, LOG)
354*404b540aSrobert 
355*404b540aSrobert /* This is how to advance the location counter by SIZE bytes.  */
356*404b540aSrobert 
357*404b540aSrobert #undef ASM_OUTPUT_SKIP
358*404b540aSrobert #define ASM_OUTPUT_SKIP(STREAM,SIZE)			\
359*404b540aSrobert   fprintf ((STREAM), "\t.byte\t0:"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
360*404b540aSrobert 	   (SIZE));
361*404b540aSrobert 
362*404b540aSrobert /* This says how to output an assembler line to define a global common
363*404b540aSrobert    symbol. We need the alignment information because it has to be supplied
364*404b540aSrobert    in the section header.  */
365*404b540aSrobert 
366*404b540aSrobert #undef ASM_OUTPUT_COMMON
367*404b540aSrobert #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)	\
368*404b540aSrobert   unicosmk_output_common ((FILE), (NAME), (SIZE), (ALIGN))
369*404b540aSrobert 
370*404b540aSrobert /* This says how to output an assembler line to define a local symbol.  */
371*404b540aSrobert 
372*404b540aSrobert #undef ASM_OUTPUT_LOCAL
373*404b540aSrobert #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
374*404b540aSrobert   do { switch_to_section (data_section);		\
375*404b540aSrobert        fprintf (FILE, "\t.align\t%d\n", floor_log2 ((ALIGN) / BITS_PER_UNIT));\
376*404b540aSrobert        ASM_OUTPUT_LABEL ((FILE), (NAME));		\
377*404b540aSrobert        fprintf (FILE, "\t.byte 0:"HOST_WIDE_INT_PRINT_UNSIGNED"\n",(SIZE));\
378*404b540aSrobert   } while (0)
379*404b540aSrobert 
380*404b540aSrobert /* CAM does not allow us to declare a symbol as external first and then
381*404b540aSrobert    define it in the same file later. Thus, we keep a list of all external
382*404b540aSrobert    references, remove all symbols defined locally from it and output it at
383*404b540aSrobert    the end of the asm file.  */
384*404b540aSrobert 
385*404b540aSrobert #define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \
386*404b540aSrobert   unicosmk_add_extern ((NAME))
387*404b540aSrobert 
388*404b540aSrobert #define ASM_OUTPUT_EXTERNAL_LIBCALL(STREAM,SYMREF)	\
389*404b540aSrobert   unicosmk_add_extern (XSTR ((SYMREF), 0))
390*404b540aSrobert 
391*404b540aSrobert /* This is how to declare an object. We don't have to output anything if
392*404b540aSrobert    it is a global variable because those go into unique `common' sections
393*404b540aSrobert    and the section name is globally visible. For local variables, we simply
394*404b540aSrobert    output the label. In any case, we have to record that no extern
395*404b540aSrobert    declaration should be generated for the symbol.  */
396*404b540aSrobert 
397*404b540aSrobert #define ASM_DECLARE_OBJECT_NAME(STREAM,NAME,DECL) 	\
398*404b540aSrobert   do { tree name_tree;					\
399*404b540aSrobert        name_tree = get_identifier ((NAME));		\
400*404b540aSrobert        TREE_ASM_WRITTEN (name_tree) = 1;		\
401*404b540aSrobert        if (!TREE_PUBLIC (DECL))				\
402*404b540aSrobert 	 {						\
403*404b540aSrobert 	   assemble_name (STREAM, NAME);		\
404*404b540aSrobert 	   fputs (":\n", STREAM);			\
405*404b540aSrobert          }						\
406*404b540aSrobert   } while(0)
407*404b540aSrobert 
408*404b540aSrobert /* Switch into a generic section.  */
409*404b540aSrobert #define TARGET_ASM_NAMED_SECTION unicosmk_asm_named_section
410*404b540aSrobert #define TARGET_ASM_INIT_SECTIONS unicosmk_init_sections
411*404b540aSrobert 
412*404b540aSrobert #undef ASM_OUTPUT_MAX_SKIP_ALIGN
413*404b540aSrobert #define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,POWER,MAXSKIP)
414*404b540aSrobert 
415*404b540aSrobert #undef NM_FLAGS
416*404b540aSrobert 
417*404b540aSrobert #undef OBJECT_FORMAT_COFF
418*404b540aSrobert 
419*404b540aSrobert /* We cannot generate debugging information on Unicos/Mk.  */
420*404b540aSrobert 
421*404b540aSrobert #undef SDB_DEBUGGING_INFO
422*404b540aSrobert #undef MIPS_DEBUGGING_INFO
423*404b540aSrobert #undef DBX_DEBUGGING_INFO
424*404b540aSrobert #undef DWARF2_DEBUGGING_INFO
425*404b540aSrobert #undef DWARF2_UNWIND_INFO
426*404b540aSrobert #undef INCOMING_RETURN_ADDR_RTX
427*404b540aSrobert #undef PREFERRED_DEBUGGING_TYPE
428*404b540aSrobert 
429*404b540aSrobert /* We don't need a start file.  */
430*404b540aSrobert 
431*404b540aSrobert #undef STARTFILE_SPEC
432*404b540aSrobert #define STARTFILE_SPEC ""
433*404b540aSrobert 
434*404b540aSrobert /* These are the libraries we have to link with.
435*404b540aSrobert    ??? The Craylibs directory should be autoconfed.  */
436*404b540aSrobert #undef LIB_SPEC
437*404b540aSrobert #define LIB_SPEC "-L/opt/ctl/craylibs/craylibs -lu -lm -lc -lsma"
438*404b540aSrobert 
439*404b540aSrobert #undef EXPAND_BUILTIN_VA_START
440*404b540aSrobert 
441*404b540aSrobert #define EH_FRAME_IN_DATA_SECTION 1
442