1142245Sbrueffer/* Output variables, constants and external declarations, for GNU compiler.
2142245Sbrueffer   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
3142245Sbrueffer
4142245SbruefferThis file is part of GNU CC.
5142245Sbrueffer
6142245SbruefferGNU CC is free software; you can redistribute it and/or modify
7142245Sbruefferit under the terms of the GNU General Public License as published by
8142245Sbruefferthe Free Software Foundation; either version 2, or (at your option)
9142245Sbruefferany later version.
10142245Sbrueffer
11142245SbruefferGNU CC is distributed in the hope that it will be useful,
12142245Sbruefferbut WITHOUT ANY WARRANTY; without even the implied warranty of
13142245SbruefferMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14142245SbruefferGNU General Public License for more details.
15142245Sbrueffer
16142245SbruefferYou should have received a copy of the GNU General Public License
17142245Sbruefferalong with GNU CC; see the file COPYING.  If not, write to
18142245Sbruefferthe Free Software Foundation, 59 Temple Place - Suite 330,
19142245SbruefferBoston, MA 02111-1307, USA.  */
20142245Sbrueffer
21142245Sbrueffer#define OPEN_VMS 1
22142245Sbrueffer
23142245Sbrueffer/* This enables certain macros in alpha.h, which will make an indirect
24142245Sbrueffer   reference to an external symbol an invalid address.  This needs to be
25142245Sbrueffer   defined before we include alpha.h, since it determines which macros
26142245Sbrueffer   are used for GO_IF_*.  */
27301177Smarkj
28142245Sbrueffer#define NO_EXTERNAL_INDIRECT_ADDRESS
29142245Sbrueffer
30142245Sbrueffer#include "alpha/alpha.h"
31142245Sbrueffer
32142245Sbrueffer#undef CPP_PREDEFINES
33142245Sbrueffer#define CPP_PREDEFINES \
34142245Sbrueffer"-D__ALPHA -Dvms -DVMS -D__vms__ -D__VMS__ -Asystem(vms)"
35142245Sbrueffer
36142245Sbrueffer#undef CPP_SUBTARGET_SPEC
37142245Sbrueffer#define CPP_SUBTARGET_SPEC "\
38142245Sbrueffer%{mfloat-ieee:-D__IEEE_FLOAT} \
39142245Sbrueffer%{mfloat-vax:-D__G_FLOAT} \
40142245Sbrueffer%{!mfloat-vax:-D__IEEE_FLOAT}"
41142245Sbrueffer
42142245Sbrueffer/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf.  */
43211194Smdf
44142245Sbrueffer#define LIB_SPEC "%{p:-lprof1 -lpdf} %{pg:-lprof1 -lpdf} %{a:-lprof2} -lc"
45142245Sbrueffer
46142245Sbrueffer/* Pass "-G 8" to ld because Alpha's CC does.  Pass -O3 if we are
47142245Sbrueffer   optimizing, -O1 if we are not.  Pass -shared, -non_shared or
48211194Smdf   -call_shared as appropriate.  Also pass -pg.  */
49226314Sglebius#define LINK_SPEC  \
50211194Smdf  "-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \
51226314Sglebius   %{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg} %{taso} \
52226314Sglebius   %{rpath*}"
53226314Sglebius
54226314Sglebius/* We allow $'s in identifiers unless -ansi is used .. */
55226314Sglebius
56226314Sglebius#define DOLLARS_IN_IDENTIFIERS 2
57226314Sglebius
58226314Sglebius/* These match the definitions used in DECCRTL, the VMS C run-time library
59226314Sglebius
60226314Sglebius#define SIZE_TYPE	"unsigned int"
61226314Sglebius#define PTRDIFF_TYPE	"int"
62211194Smdf*/
63211194Smdf
64211194Smdf/* Use memcpy for structure copying, and so forth.  */
65211194Smdf#define TARGET_MEM_FUNCTIONS
66142245Sbrueffer
67162404Sru/* By default, allow $ to be part of an identifier.  */
68162404Sru#define DOLLARS_IN_IDENTIFIERS 2
69211194Smdf
70153884Spjd#undef TARGET_DEFAULT
71153884Spjd#define TARGET_DEFAULT (MASK_FP|MASK_FPREGS|MASK_GAS)
72153884Spjd#undef TARGET_OPEN_VMS
73153884Spjd#define TARGET_OPEN_VMS 1
74153884Spjd
75211194Smdf#undef TARGET_NAME
76153884Spjd#define TARGET_NAME "OpenVMS/Alpha"
77153884Spjd#undef TARGET_VERSION
78211194Smdf#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME);
79153884Spjd
80153884Spjd/* The structure return address arrives as an "argument" on VMS.  */
81153884Spjd#undef STRUCT_VALUE_REGNUM
82153884Spjd#define STRUCT_VALUE 0
83211194Smdf#undef PCC_STATIC_STRUCT_RETURN
84211194Smdf
85226314Sglebius/* no floating emulation.  */
86226314Sglebius#undef REAL_ARITHMETIC
87226314Sglebius
88226314Sglebius/* "long" is 32 bits.  */
89211194Smdf#undef LONG_TYPE_SIZE
90211194Smdf#define LONG_TYPE_SIZE 32
91211194Smdf
92211194Smdf/* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended. */
93211194Smdf#undef POINTER_SIZE
94211194Smdf#define POINTER_SIZE 32
95211194Smdf#define POINTERS_EXTEND_UNSIGNED 0
96211194Smdf
97211194Smdf#define MAX_OFILE_ALIGNMENT 524288  /* 8 x 2^16 by DEC Ada Test CD40VRA */
98211194Smdf
99211194Smdf#undef FIXED_REGISTERS
100211194Smdf#define FIXED_REGISTERS  \
101211194Smdf {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
102226314Sglebius  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \
103226314Sglebius  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
104226314Sglebius  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }
105226314Sglebius
106226314Sglebius#undef CALL_USED_REGISTERS
107211194Smdf#define CALL_USED_REGISTERS  \
108226314Sglebius {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
109211194Smdf  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
110226314Sglebius  1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \
111226314Sglebius  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
112226314Sglebius
113226314Sglebius#undef HARD_FRAME_POINTER_REGNUM
114226314Sglebius#define HARD_FRAME_POINTER_REGNUM 29
115226314Sglebius
116226314Sglebius#undef CAN_ELIMINATE
117226314Sglebius#define CAN_ELIMINATE(FROM, TO)  \
118226314Sglebius((TO) != STACK_POINTER_REGNUM || ! alpha_using_fp ())
119226314Sglebius
120226314Sglebius#undef INITIAL_ELIMINATION_OFFSET
121226314Sglebius#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)			\
122226314Sglebius{ if ((FROM) == FRAME_POINTER_REGNUM)					\
123226314Sglebius    (OFFSET) = alpha_sa_size () + alpha_pv_save_size ();		\
124211194Smdf  else if ((FROM) == ARG_POINTER_REGNUM)				\
125153884Spjd    (OFFSET) = (ALPHA_ROUND (alpha_sa_size () + alpha_pv_save_size ()	\
126153884Spjd			     + get_frame_size ()			\
127211194Smdf			     + current_function_pretend_args_size)	\
128211194Smdf		- current_function_pretend_args_size);			\
129211194Smdf  if ((TO) == STACK_POINTER_REGNUM)					\
130211194Smdf    (OFFSET) += ALPHA_ROUND (current_function_outgoing_args_size);	\
131211194Smdf}
132263620Sbdrewery
133211194Smdf/* Define a data type for recording info about an argument list
134211194Smdf   during the scan of that argument list.  This data type should
135211194Smdf   hold all necessary information about the function itself
136211194Smdf   and about the args processed so far, enough to enable macros
137211194Smdf   such as FUNCTION_ARG to determine where the next arg should go.
138211194Smdf
139211194Smdf   On Alpha/VMS, this is a structure that contains the number of
140211194Smdf   arguments and, for each argument, the datatype of that argument.
141211194Smdf
142211194Smdf   The number of arguments is a number of words of arguments scanned so far.
143211194Smdf   Thus 6 or more means all following args should go on the stack.  */
144211194Smdf
145211194Smdfenum avms_arg_type {I64, FF, FD, FG, FS, FT};
146211194Smdftypedef struct {char num_args; enum avms_arg_type atypes[6];} avms_arg_info;
147211194Smdf
148211194Smdf#undef CUMULATIVE_ARGS
149211194Smdf#define CUMULATIVE_ARGS avms_arg_info
150211194Smdf
151211194Smdf/* Initialize a variable CUM of type CUMULATIVE_ARGS
152211194Smdf   for a call to a function whose data type is FNTYPE.
153211194Smdf   For a library call, FNTYPE is 0.  */
154211194Smdf
155211194Smdf#undef INIT_CUMULATIVE_ARGS
156211194Smdf#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
157211194Smdf  (CUM).num_args = 0;						\
158211194Smdf  (CUM).atypes[0] = (CUM).atypes[1] = (CUM).atypes[2] = I64;	\
159211194Smdf  (CUM).atypes[3] = (CUM).atypes[4] = (CUM).atypes[5] = I64;
160211194Smdf
161211194Smdf/* Update the data in CUM to advance over an argument
162211194Smdf   of mode MODE and data type TYPE.
163211194Smdf   (TYPE is null for libcalls where that information may not be available.)  */
164211194Smdf
165211194Smdfextern enum avms_arg_type alpha_arg_type ();
166211194Smdf
167211194Smdf/* Determine where to put an argument to a function.
168211194Smdf   Value is zero to push the argument on the stack,
169211194Smdf   or a hard register in which to store the argument.
170211194Smdf
171211194Smdf   MODE is the argument's machine mode (or VOIDmode for no more args).
172211194Smdf   TYPE is the data type of the argument (as a tree).
173226314Sglebius    This is null for libcalls where that information may
174226314Sglebius    not be available.
175226314Sglebius   CUM is a variable of type CUMULATIVE_ARGS which gives info about
176226314Sglebius    the preceding args and about the function being called.
177226314Sglebius   NAMED is nonzero if this argument is a named parameter
178226314Sglebius    (otherwise it is an extra parameter matching an ellipsis).
179226314Sglebius
180226314Sglebius   On Alpha the first 6 words of args are normally in registers
181226314Sglebius   and the rest are pushed.  */
182226314Sglebius
183226314Sglebiusextern struct rtx_def *alpha_arg_info_reg_val ();
184142245Sbrueffer#undef FUNCTION_ARG
185142245Sbrueffer#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED)	\
186142245Sbrueffer((MODE) == VOIDmode ? alpha_arg_info_reg_val (CUM)		\
187142245Sbrueffer : ((CUM.num_args) < 6 && ! MUST_PASS_IN_STACK (MODE, TYPE)	\
188155118Sbrueffer    ? gen_rtx(REG, (MODE),					\
189226314Sglebius	      ((CUM).num_args + 16				\
190226314Sglebius	       + ((TARGET_FPREGS				\
191142245Sbrueffer		   && (GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \
192142245Sbrueffer		       || GET_MODE_CLASS (MODE) == MODE_FLOAT)) \
193142245Sbrueffer		  * 32)))			\
194142245Sbrueffer    : 0))
195142245Sbrueffer
196142245Sbrueffer#undef FUNCTION_ARG_ADVANCE
197142245Sbrueffer#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)			\
198211194Smdf  if (MUST_PASS_IN_STACK (MODE, TYPE))					\
199267936Sbapt    (CUM).num_args += 6;						\
200211194Smdf  else									\
201267936Sbapt    {									\
202211194Smdf      if ((CUM).num_args < 6)						\
203267936Sbapt        (CUM).atypes[(CUM).num_args] = alpha_arg_type (MODE);		\
204226314Sglebius									\
205267936Sbapt     (CUM).num_args += ALPHA_ARG_SIZE (MODE, TYPE, NAMED);		\
206211194Smdf    }
207
208/* For an arg passed partly in registers and partly in memory,
209   this is the number of registers used.
210   For args passed entirely in registers or entirely in memory, zero.  */
211
212#undef FUNCTION_ARG_PARTIAL_NREGS
213#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED)		\
214((CUM).num_args < 6 && 6 < (CUM).num_args				\
215   + ALPHA_ARG_SIZE (MODE, TYPE, NAMED)					\
216 ? 6 - (CUM).num_args : 0)
217
218/* Perform any needed actions needed for a function that is receiving a
219   variable number of arguments.
220
221   CUM is as for INIT_CUMULATIVE_ARGS.
222
223   MODE and TYPE are the mode and type of the current parameter.
224
225   PRETEND_SIZE is a variable that should be set to the amount of stack
226   that must be pushed by the prolog to pretend that our caller pushed
227   it.
228
229   Normally, this macro will push all remaining incoming registers on the
230   stack and set PRETEND_SIZE to the length of the registers pushed.
231
232   For VMS, we allocate space for all 6 arg registers plus a count.
233
234   However, if NO registers need to be saved, don't allocate any space.
235   This is not only because we won't need the space, but because AP includes
236   the current_pretend_args_size and we don't want to mess up any
237   ap-relative addresses already made.   */
238
239#undef SETUP_INCOMING_VARARGS
240#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL)	\
241{ if ((CUM).num_args < 6)				\
242    {							\
243      if (! (NO_RTL))					\
244	{						\
245	  emit_move_insn (gen_rtx (REG, DImode, 1),	\
246			  virtual_incoming_args_rtx);	\
247	  emit_insn (gen_arg_home ());			\
248	}						\
249						        \
250      PRETEND_SIZE = 7 * UNITS_PER_WORD;		\
251    }							\
252}
253
254#undef ASM_FILE_START
255#define ASM_FILE_START(FILE)					\
256{								\
257  alpha_write_verstamp (FILE);					\
258  fprintf (FILE, "\t.set noreorder\n");				\
259  fprintf (FILE, "\t.set volatile\n");				\
260  ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename);	\
261}
262
263#undef ASM_OUTPUT_FLOAT
264#define ASM_OUTPUT_FLOAT(FILE,VALUE)					\
265  {									\
266    if (REAL_VALUE_ISINF (VALUE)					\
267        || REAL_VALUE_ISNAN (VALUE)					\
268	|| REAL_VALUE_MINUS_ZERO (VALUE))				\
269      {									\
270	long t;								\
271	REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t);			\
272	fprintf (FILE, "\t.long 0x%lx\n", t & 0xffffffff);		\
273      }									\
274    else								\
275      {									\
276	char str[30];							\
277	REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str);			\
278	fprintf (FILE, "\t.%c_floating %s\n", (TARGET_FLOAT_VAX)?'f':'s', str);	\
279      }									\
280  }
281
282#define LINK_SECTION_ASM_OP ".link"
283#define READONLY_SECTION_ASM_OP ".rdata"
284#define LITERALS_SECTION_ASM_OP ".literals"
285#define CTORS_SECTION_ASM_OP ".ctors"
286#define DTORS_SECTION_ASM_OP ".dtors"
287
288#undef EXTRA_SECTIONS
289#define EXTRA_SECTIONS	in_link, in_rdata, in_literals, in_ctors, in_dtors
290
291#undef EXTRA_SECTION_FUNCTIONS
292#define EXTRA_SECTION_FUNCTIONS					\
293void								\
294readonly_section ()						\
295{								\
296  if (in_section != in_rdata)				\
297    {								\
298      fprintf (asm_out_file, "%s\n", READONLY_SECTION_ASM_OP);	\
299      in_section = in_rdata;				\
300    }								\
301}								\
302void								\
303link_section ()							\
304{								\
305  if (in_section != in_link)					\
306    {								\
307      fprintf (asm_out_file, "%s\n", LINK_SECTION_ASM_OP); 	\
308      in_section = in_link;					\
309    }								\
310}                                                               \
311void								\
312literals_section ()						\
313{								\
314  if (in_section != in_literals)				\
315    {								\
316      fprintf (asm_out_file, "%s\n", LITERALS_SECTION_ASM_OP); 	\
317      in_section = in_literals;					\
318    }								\
319}								\
320void								\
321ctors_section ()						\
322{								\
323  if (in_section != in_ctors)					\
324    {								\
325      fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);	\
326      in_section = in_ctors;					\
327    }								\
328}								\
329void								\
330dtors_section ()						\
331{								\
332  if (in_section != in_dtors)					\
333    {								\
334      fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);	\
335      in_section = in_dtors;					\
336    }								\
337}
338
339#undef ASM_OUTPUT_ADDR_DIFF_ELT
340#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) abort ()
341
342#undef ASM_OUTPUT_ADDR_VEC_ELT
343#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
344  fprintf (FILE, "\t.quad $L%d\n", (VALUE))
345
346#undef READONLY_DATA_SECTION
347#define READONLY_DATA_SECTION readonly_section
348
349#define ASM_FILE_END(FILE) alpha_write_linkage (FILE);
350
351#undef CASE_VECTOR_MODE
352#define CASE_VECTOR_MODE DImode
353#undef CASE_VECTOR_PC_RELATIVE
354
355#undef ASM_OUTPUT_CASE_LABEL
356#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN)	\
357{ ASM_OUTPUT_ALIGN (FILE, 3); ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); }
358
359/* This says how to output assembler code to declare an
360   uninitialized external linkage data object.  */
361
362#define COMMON_ASM_OP ".comm"
363
364#undef ASM_OUTPUT_ALIGNED_COMMON
365#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)		\
366do {									\
367  fprintf ((FILE), "\t%s\t", COMMON_ASM_OP);				\
368  assemble_name ((FILE), (NAME));					\
369  fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);	\
370} while (0)
371
372#define NO_MD_PROTOTYPES
373
374/* Output assembler code for a block containing the constant parts
375   of a trampoline, leaving space for the variable parts.
376
377   The trampoline should set the static chain pointer to value placed
378   into the trampoline and should branch to the specified routine.
379   Note that $27 has been set to the address of the trampoline, so we can
380   use it for addressability of the two data items.  Trampolines are always
381   aligned to FUNCTION_BOUNDARY, which is 64 bits.  */
382
383#undef TRAMPOLINE_TEMPLATE
384#define TRAMPOLINE_TEMPLATE(FILE)		\
385{						\
386  fprintf (FILE, "\t.quad 0\n");		\
387  fprintf (FILE, "\t.linkage __tramp\n");	\
388  fprintf (FILE, "\t.quad 0\n");		\
389}
390
391/* Length in units of the trampoline for entering a nested function.  */
392
393#undef TRAMPOLINE_SIZE
394#define TRAMPOLINE_SIZE    32
395
396/* Emit RTL insns to initialize the variable parts of a trampoline.
397   FNADDR is an RTX for the address of the function's pure code.
398   CXT is an RTX for the static chain value for the function.  */
399
400#undef INITIALIZE_TRAMPOLINE
401#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
402  alpha_initialize_trampoline (TRAMP, FNADDR, CXT, 16, 24, -1)
403
404/* A C statement (sans semicolon) to output an element in the table of
405   global constructors.  */
406#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)		\
407  do {							\
408    ctors_section ();					\
409    fprintf (FILE, "\t.quad "); 			\
410    assemble_name (FILE, NAME); 			\
411    fprintf (FILE, "\n");				\
412  } while (0)
413
414/* A C statement (sans semicolon) to output an element in the table of
415   global destructors.	*/
416#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)		\
417  do {							\
418    dtors_section ();					\
419    fprintf (FILE, "\t.quad "); 			\
420    assemble_name (FILE, NAME); 			\
421    fprintf (FILE, "\n");				\
422  } while (0)
423
424#define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, NAME, ARGS) \
425  (vms_valid_decl_attribute_p (DECL, ATTRIBUTES, NAME, ARGS))
426extern int vms_valid_decl_attribute_p ();
427
428#undef SDB_DEBUGGING_INFO
429#undef MIPS_DEBUGGING_INFO
430#undef DBX_DEBUGGING_INFO
431
432#define DWARF2_DEBUGGING_INFO
433
434/* This is how to output an assembler line
435   that says to advance the location counter
436   to a multiple of 2**LOG bytes.  */
437
438#undef ASM_OUTPUT_ALIGN
439#define ASM_OUTPUT_ALIGN(FILE,LOG)	\
440    fprintf (FILE, "\t.align %d\n", LOG);
441
442#define ASM_OUTPUT_SECTION(FILE,SECTION)			\
443   (strcmp (SECTION, ".text") == 0)				\
444     ? text_section ()						\
445     : named_section (NULL_TREE, SECTION, 0),			\
446       ASM_OUTPUT_ALIGN (FILE, 0)				\
447
448#define ASM_OUTPUT_SECTION_NAME(FILE,DECL,NAME,RELOC)		\
449  do								\
450    {								\
451      char *flags;					 	\
452      int ovr = 0;						\
453      if (DECL && DECL_MACHINE_ATTRIBUTES (DECL)		\
454	  && lookup_attribute					\
455	      ("overlaid", DECL_MACHINE_ATTRIBUTES (DECL)))	\
456	flags = ",OVR", ovr = 1;				\
457      else if (strncmp (NAME,".debug", 6) == 0)			\
458	flags = ",NOWRT";					\
459      else							\
460	flags = "";						\
461      fputc ('\n', (FILE));					\
462      fprintf (FILE, ".section\t%s%s\n", NAME, flags);		\
463      if (ovr)							\
464        (NAME) = "";						\
465    } while (0)
466
467#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)				\
468  do {	literals_section();                                             \
469	fprintf ((FILE), "\t");						\
470	assemble_name (FILE, LABEL1);					\
471	fprintf (FILE, " = ");						\
472	assemble_name (FILE, LABEL2);					\
473	fprintf (FILE, "\n");						\
474  } while (0)
475
476#undef PREFERRED_DEBUGGING_TYPE
477#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
478
479#undef ASM_FORMAT_PRIVATE_NAME
480#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)	\
481( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12),	\
482  sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))
483
484/* ??? VMS uses different linkage.  */
485#undef ASM_OUTPUT_MI_THUNK
486
487#undef ASM_SPEC
488#undef ASM_FINAL_SPEC
489#undef LINK_SPEC
490#undef STARTFILE_SPEC
491#define ASM_SPEC "-nocpp %{pg}"
492#define LINK_SPEC "%{g3:-g3} %{g0:-g0} %{shared:-shared} %{v:-v}"
493
494/* Define the names of the division and modulus functions.  */
495#define DIVSI3_LIBCALL "OTS$DIV_I"
496#define DIVDI3_LIBCALL "OTS$DIV_L"
497#define UDIVSI3_LIBCALL "OTS$DIV_UI"
498#define UDIVDI3_LIBCALL "OTS$DIV_UL"
499#define MODSI3_LIBCALL "OTS$REM_I"
500#define MODDI3_LIBCALL "OTS$REM_L"
501#define UMODSI3_LIBCALL "OTS$REM_UI"
502#define UMODDI3_LIBCALL "OTS$REM_UL"
503
504#define DIR_SEPARATOR ']'
505
506#define PREFIX "GNU_ROOT:"
507