|
|
1.1 root 1: /* Definitions of target machine for GNU compiler. Convex version.
2: Copyright (C) 1992 Free Software Foundation, Inc.
3:
4: This file is part of GNU CC.
5:
6: GNU CC is free software; you can redistribute it and/or modify
7: it under the terms of the GNU General Public License as published by
8: the Free Software Foundation; either version 2, or (at your option)
9: any later version.
10:
11: GNU CC is distributed in the hope that it will be useful,
12: but WITHOUT ANY WARRANTY; without even the implied warranty of
13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: GNU General Public License for more details.
15:
16: You should have received a copy of the GNU General Public License
17: along with GNU CC; see the file COPYING. If not, write to
18: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19:
20:
21: /* Standard GCC variables that we reference. */
22:
23: extern int target_flags;
24:
25: /* Interface to convex.c. */
26:
27: extern int current_section_is_text;
28: extern int const_double_low_int ();
29: extern int const_double_high_int ();
30: extern char *set_cmp (), *gen_cmp ();
31: extern char *output_call ();
32:
33: /* Use the proper incantation to search Posix-compliant libraries. */
34:
35: #define LINK_SPEC \
36: "%{!traditional:-Eposix}%{traditional:-Enoposix}\
37: -A__iob=___ap$iob\
38: -A_use_libc_sema=___ap$use_libc_sema\
39: -L /usr/lib"
40:
41: /* Use the matching startup files. */
42:
43: #define STARTFILE_SPEC \
44: "%{pg:/usr/lib/crt/gcrt0.o}\
45: %{!pg:%{p:/usr/lib/crt/mcrt0.o}\
46: %{!p:/usr/lib/crt/crt0.o}}"
47:
48: /* Names to predefine in the preprocessor for this target machine. */
49:
50: #define CPP_PREDEFINES "-Dconvex -Dunix"
51:
52: /* Print subsidiary information on the compiler version in use. */
53:
54: #define TARGET_VERSION fprintf (stderr, " (convex)");
55:
56: /* Macros used in the machine description to test the flags. */
57:
58: /*
59: -mc1 C1 target (avoid C2-only instructions)
60: -mc2 C2 target
61: -mc32 vitesse
62: -mc34 javelin
63: -mc38 neptune
64: -margcount use standard calling sequence, with arg count word
65: -mnoargcount don't push arg count, depend on symbol table
66: */
67:
68: #define TARGET_C1 (target_flags & 1)
69: #define TARGET_C2 (target_flags & 2)
70: #define TARGET_C34 (target_flags & 4)
71: #define TARGET_C38 (target_flags & 010)
1.1.1.4 ! root 72: #define TARGET_INDIRECTS (1)
1.1 root 73: #define TARGET_ARGCOUNT (target_flags & 040)
74:
75: /* Macro to define tables used to set the flags.
76: This is a list in braces of pairs in braces,
77: each pair being { "NAME", VALUE }
78: where VALUE is the bits to set or minus the bits to clear.
79: An empty string NAME is used to identify the default VALUE. */
80:
81: #define TARGET_SWITCHES \
82: { { "c1", 021 }, \
83: { "c2", 022 }, \
84: { "c32", 022 }, \
85: { "c34", 006 }, \
86: { "c38", 012 }, \
87: { "noc1", -001 }, \
1.1.1.4 ! root 88: { "noc2", -002 }, \
1.1 root 89: { "argcount", 040 }, \
90: { "noargcount", -040 }, \
91: { "", TARGET_DEFAULT }}
92:
93: /* Default target_flags if no switches specified. */
94:
95: #ifndef TARGET_DEFAULT
96: #define TARGET_DEFAULT 0
97: #endif
98:
99: /* Allow $ in identifiers. */
100:
101: #define DOLLARS_IN_IDENTIFIERS 2
102:
103: /* Target machine storage layout */
104:
105: /* Define this if most significant bit is lowest numbered
106: in instructions that operate on numbered bit-fields. */
107: #define BITS_BIG_ENDIAN 1
108:
109: /* Define this if most significant byte of a word is the lowest numbered. */
110: #define BYTES_BIG_ENDIAN 1
111:
112: /* Define this if most significant word of a multiword number is numbered. */
113: #define WORDS_BIG_ENDIAN 1
114:
1.1.1.2 root 115: /* Number of bits in an addressable storage unit */
1.1 root 116: #define BITS_PER_UNIT 8
117:
118: /* Width in bits of a "word", which is the contents of a machine register.
119: Note that this is not necessarily the width of data type `int';
120: if using 16-bit ints on a 68000, this would still be 32.
121: But on a machine with 16-bit registers, this would be 16. */
122: #define BITS_PER_WORD 64
123:
124: /* Width of a word, in units (bytes). */
125: #define UNITS_PER_WORD 8
126:
127: /* Width in bits of a pointer.
128: See also the macro `Pmode' defined below. */
129: #define POINTER_SIZE 32
130:
131: /* Allocation boundary (in *bits*) for storing arguments in argument list. */
132: #define PARM_BOUNDARY 32
133:
134: /* Boundary (in *bits*) on which stack pointer should be aligned. */
135: #define STACK_BOUNDARY 32
136:
137: /* Allocation boundary (in *bits*) for the code of a function. */
138: #define FUNCTION_BOUNDARY 16
139:
140: /* Alignment of field after `int : 0' in a structure. */
141: #define EMPTY_FIELD_BOUNDARY 32
142:
143: /* Every structure's size must be a multiple of this. */
144: #define STRUCTURE_SIZE_BOUNDARY 8
145:
146: /* A bitfield declared as `int' forces `int' alignment for the struct. */
147: #define PCC_BITFIELD_TYPE_MATTERS 1
148:
149: /* No data type wants to be aligned rounder than this. */
150: /* beware of doubles in structs -- 64 is incompatible with pcc */
151: #define BIGGEST_ALIGNMENT 32
152:
1.1.1.2 root 153: /* Set this nonzero if move instructions will actually fail to work
1.1 root 154: when given unaligned data. */
1.1.1.2 root 155: #define STRICT_ALIGNMENT 0
1.1 root 156:
157: /* Define sizes of basic C types to conform to ordinary usage -- these
158: types depend on BITS_PER_WORD otherwise. */
159: #define CHAR_TYPE_SIZE 8
160: #define SHORT_TYPE_SIZE 16
161: #define INT_TYPE_SIZE 32
162: #define LONG_TYPE_SIZE 32
163: #define LONG_LONG_TYPE_SIZE 64
164: #define FLOAT_TYPE_SIZE 32
165: #define DOUBLE_TYPE_SIZE 64
166: #define LONG_DOUBLE_TYPE_SIZE 64
167:
168: /* Declare the standard types used by builtins to match convex stddef.h --
169: with int rather than long. */
170:
171: #define SIZE_TYPE "unsigned int"
172: #define PTRDIFF_TYPE "int"
173:
174: /* Standard register usage. */
175:
176: /* Number of actual hardware registers.
177: The hardware registers are assigned numbers for the compiler
178: from 0 to just below FIRST_PSEUDO_REGISTER.
179: All registers that the compiler knows about must be given numbers,
180: even those that are not normally considered general registers. */
181: #define FIRST_PSEUDO_REGISTER 16
182:
183: /* 1 for registers that have pervasive standard uses
184: and are not available for the register allocator.
185: For Convex, these are AP, FP, and SP. */
186: #define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1}
187:
188: /* 1 for registers not available across function calls.
189: These must include the FIXED_REGISTERS and also any
190: registers that can be used without being saved.
191: The latter must include the registers where values are returned
192: and the register where structure-value addresses are passed.
193: Aside from that, you can include as many other registers as you like. */
194: #define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
195:
196: /* Return number of consecutive hard regs needed starting at reg REGNO
197: to hold something of mode MODE.
198: This is ordinarily the length in words of a value of mode MODE
199: but can be less for certain modes in special long registers. */
200: #define HARD_REGNO_NREGS(REGNO, MODE) \
201: ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
202:
203: /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
204: On Convex, S registers can hold any type, A registers any nonfloat. */
205: #define HARD_REGNO_MODE_OK(REGNO, MODE) \
206: ((REGNO) < 8 || (GET_MODE_CLASS (MODE) != MODE_FLOAT && \
207: GET_MODE_CLASS (MODE) != MODE_COMPLEX_FLOAT && \
208: (MODE) != DImode))
209:
210: /* Value is 1 if it is a good idea to tie two pseudo registers
211: when one has mode MODE1 and one has mode MODE2.
212: If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
213: for any hard reg, then this must be 0 for correct output. */
214: #define MODES_TIEABLE_P(MODE1, MODE2) \
215: ((GET_MODE_CLASS (MODE1) == MODE_FLOAT \
216: || GET_MODE_CLASS (MODE1) == MODE_COMPLEX_FLOAT \
217: || (MODE1) == DImode) \
218: == (GET_MODE_CLASS (MODE2) == MODE_FLOAT \
219: || GET_MODE_CLASS (MODE2) == MODE_COMPLEX_FLOAT \
220: || (MODE2) == DImode))
221:
222: /* Specify the registers used for certain standard purposes.
223: The values of these macros are register numbers. */
224:
225: /* Register to use for pushing function arguments. */
226: #define STACK_POINTER_REGNUM 8
227:
228: /* Base register for access to local variables of the function. */
229: #define FRAME_POINTER_REGNUM 15
230:
231: /* Value should be nonzero if functions must have frame pointers.
232: Zero means the frame pointer need not be set up (and parms
233: may be accessed via the stack pointer) in functions that seem suitable.
234: This is computed in `reload', in reload1.c. */
235: #define FRAME_POINTER_REQUIRED 1
236:
237: /* Base register for access to arguments of the function. */
238: #define ARG_POINTER_REGNUM 14
239:
240: /* Register in which static-chain is passed to a function.
241: Use S0, not an A reg, because this rare use would otherwise prevent
242: an A reg from being available to global-alloc across calls. */
243: #define STATIC_CHAIN_REGNUM 0
244:
245: /* Register in which address to store a structure value
246: is passed to a function. */
247: #define STRUCT_VALUE_REGNUM 9
248:
249: /* Define the classes of registers for register constraints in the
250: machine description. Also define ranges of constants.
251:
252: One of the classes must always be named ALL_REGS and include all hard regs.
253: If there is more than one class, another class must be named NO_REGS
254: and contain no registers.
255:
256: The name GENERAL_REGS must be the name of a class (or an alias for
257: another name such as ALL_REGS). This is the class of registers
258: that is allowed by "g" or "r" in a register constraint.
259: Also, registers outside this class are allocated only when
260: instructions express preferences for them.
261:
262: The classes must be numbered in nondecreasing order; that is,
263: a larger-numbered class must never be contained completely
264: in a smaller-numbered class.
265:
266: For any two classes, it is very desirable that there be another
267: class that represents their union. */
268:
269: /* Convex has classes A (address) and S (scalar).
270: A is further divided into SP_REGS (stack pointer) and INDEX_REGS.
271: Seems to work better to put S first, here and in the md. */
272:
273: enum reg_class {
274: NO_REGS, S_REGS, INDEX_REGS, SP_REGS, A_REGS, ALL_REGS, LIM_REG_CLASSES
275: };
276:
277: #define N_REG_CLASSES (int) LIM_REG_CLASSES
278:
279: /* Since GENERAL_REGS is the same class as ALL_REGS,
280: don't give it a different class number; just make it an alias. */
281:
282: #define GENERAL_REGS ALL_REGS
283:
284: /* Give names of register classes as strings for dump file. */
285:
286: #define REG_CLASS_NAMES \
287: {"NO_REGS", "S_REGS", "INDEX_REGS", "SP_REGS", "A_REGS", "ALL_REGS" }
288:
289: /* Define which registers fit in which classes.
290: This is an initializer for a vector of HARD_REG_SET
291: of length N_REG_CLASSES. */
292:
293: #define REG_CLASS_CONTENTS {0, 0x00ff, 0xfe00, 0x0100, 0xff00, 0xffff}
294:
295: /* The same information, inverted:
296: Return the class number of the smallest class containing
297: reg number REGNO. This could be a conditional expression
298: or could index an array. */
299:
300: #define REGNO_REG_CLASS(REGNO) \
301: (S_REGNO_P (REGNO) ? S_REGS : REGNO == 8 ? SP_REGS : INDEX_REGS)
302:
303: #define S_REGNO_P(REGNO) ((REGNO) < 8)
304: #define A_REGNO_P(REGNO) ((REGNO) >= 8)
305:
306: #define S_REG_P(X) (REG_P (X) && S_REGNO_P (REGNO (X)))
307: #define A_REG_P(X) (REG_P (X) && A_REGNO_P (REGNO (X)))
308:
309: /* The class value for index registers, and the one for base regs. */
310:
311: #define INDEX_REG_CLASS INDEX_REGS
312: #define BASE_REG_CLASS INDEX_REGS
313:
314: /* Get reg_class from a letter such as appears in the machine description. */
315: /* S regs use the letter 'd' because 's' is taken. */
316:
317: #define REG_CLASS_FROM_LETTER(C) \
1.1.1.4 ! root 318: ((C) == 'a' ? A_REGS : \
! 319: (C) == 'd' ? S_REGS : \
! 320: (C) == 'A' ? INDEX_REGS : \
! 321: NO_REGS)
1.1 root 322:
323: /* The letters I, J, K, L and M in a register constraint string
324: can be used to stand for particular ranges of immediate operands.
325: This macro defines what the ranges are.
326: C is the letter, and VALUE is a constant value.
327: Return 1 if VALUE is in the range specified by C. */
328:
329: /* Convex uses only I:
330: 32-bit value with sign bit off, usable as immediate in DImode logical
331: instructions and, or, xor */
332:
333: #define CONST_OK_FOR_LETTER_P(VALUE, C) ((VALUE) >= 0)
334:
335: /* Similar, but for floating constants, and defining letters G and H.
336: Here VALUE is the CONST_DOUBLE rtx itself. */
337: /* Convex uses only G:
338: value usable in ld.d (low word 0) or ld.l (high word all sign) */
339:
340: #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
341: (LD_D_P (VALUE) || LD_L_P (VALUE))
342:
343: #define LD_D_P(X) (const_double_low_int (X) == 0)
344:
345: #define LD_L_P(X) (const_double_low_int (X) >= 0 \
346: ? const_double_high_int (X) == 0 \
347: : const_double_high_int (X) == -1)
348:
349: /* Given an rtx X being reloaded into a reg required to be
350: in class CLASS, return the class of reg to actually use.
351: In general this is just CLASS; but on some machines
352: in some cases it is preferable to use a more restrictive class. */
353:
354: /* CONST_DOUBLEs (constraint 'F') are passed by LEGITIMATE_CONSTANT_P
355: without regard to their value. Constraint 'G' is used by instructions
356: that need to reject non-immediate values. The rejected values are
357: dealt with by reload -- PREFERRED_RELOAD_CLASS returns NO_REGS for
358: nonimmediate values, causing reload to put them in memory. Every insn
359: that uses 'G' must have an alternative that accepts memory. */
360:
361: #define PREFERRED_RELOAD_CLASS(X,CLASS) \
362: (GET_CODE (X) != CONST_DOUBLE ? (CLASS) : \
363: (GET_MODE (X) != TFmode && (LD_L_P (X) || LD_D_P (X))) ? (CLASS) : NO_REGS)
364:
365: /* Return the maximum number of consecutive registers
366: needed to represent mode MODE in a register of class CLASS. */
367: #define CLASS_MAX_NREGS(CLASS, MODE) ((GET_MODE_SIZE (MODE) + 7) / 8)
368:
369: /* Stack layout; function entry, exit and calling. */
370:
371: /* Define this if pushing a word on the stack
372: makes the stack pointer a smaller address. */
373: #define STACK_GROWS_DOWNWARD
374:
375: /* Define this if the nominal address of the stack frame
376: is at the high-address end of the local variables;
377: that is, each additional local variable allocated
378: goes at a more negative offset in the frame. */
379: #define FRAME_GROWS_DOWNWARD
380:
381: /* Define this if should default to -fcaller-saves. */
382: #define DEFAULT_CALLER_SAVES
383:
384: /* Offset within stack frame to start allocating local variables at.
385: If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
386: first local allocated. Otherwise, it is the offset to the BEGINNING
387: of the first local allocated. */
388: #define STARTING_FRAME_OFFSET 0
389:
390: /* If we generate an insn to push BYTES bytes,
391: this says how many the stack pointer really advances by. */
392: #define PUSH_ROUNDING(BYTES) (((BYTES) + 3) & ~3)
393:
394: /* Offset of first parameter from the argument pointer register value. */
395: #define FIRST_PARM_OFFSET(FNDECL) 0
396:
397: /* Value is the number of bytes of arguments automatically
398: popped when returning from a subroutine call.
399: FUNTYPE is the data type of the function (as a tree),
400: or for a library call it is an identifier node for the subroutine name.
401: SIZE is the number of bytes of arguments passed on the stack. */
402: /* The standard Convex call, with arg count word, includes popping the
403: args as part of the call template. We optionally omit the arg count
404: word and let gcc combine the arg pops. */
1.1.1.4 ! root 405: #define RETURN_POPS_ARGS(FUNTYPE, SIZE) (TARGET_ARGCOUNT ? (SIZE) : 0)
1.1 root 406:
407: /* Define how to find the value returned by a function.
408: VALTYPE is the data type of the value (as a tree).
409: If the precise function being called is known, FUNC is its FUNCTION_DECL;
410: otherwise, FUNC is 0. */
411:
412: /* On Convex the return value is in S0 regardless. */
413:
414: #define FUNCTION_VALUE(VALTYPE, FUNC) \
415: gen_rtx (REG, TYPE_MODE (VALTYPE), 0)
416:
417: /* Define how to find the value returned by a library function
418: assuming the value has mode MODE. */
419:
420: /* On Convex the return value is in S0 regardless. */
421:
422: #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, 0)
423:
424: /* Define this if PCC uses the nonreentrant convention for returning
425: structure and union values. */
426:
427: #define PCC_STATIC_STRUCT_RETURN
428:
429: /* 1 if N is a possible register number for a function value.
430: On the Convex, S0 is the only register thus used. */
431:
432: #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
433:
434: /* 1 if N is a possible register number for function argument passing. */
435:
436: #define FUNCTION_ARG_REGNO_P(N) 0
437:
438: /* Define a data type for recording info about an argument list
439: during the scan of that argument list. This data type should
440: hold all necessary information about the function itself
441: and about the args processed so far, enough to enable macros
442: such as FUNCTION_ARG to determine where the next arg should go.
443:
444: On convex, this is a single integer, which is a number of bytes
445: of arguments scanned so far. */
446:
447: #define CUMULATIVE_ARGS int
448:
449: /* Initialize a variable CUM of type CUMULATIVE_ARGS
450: for a call to a function whose data type is FNTYPE.
451: For a library call, FNTYPE is 0.
452:
453: On Convex, the offset starts at 0. */
454:
455: #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) \
456: ((CUM) = 0)
457:
458: /* Update the data in CUM to advance over an argument
459: of mode MODE and data type TYPE.
460: (TYPE is null for libcalls where that information may not be available.) */
461:
462: #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
463: ((CUM) += ((MODE) != BLKmode \
464: ? (GET_MODE_SIZE (MODE) + 3) & ~3 \
465: : (int_size_in_bytes (TYPE) + 3) & ~3))
466:
467: /* Define where to put the arguments to a function.
468: Value is zero to push the argument on the stack,
469: or a hard register in which to store the argument.
470:
471: MODE is the argument's machine mode.
472: TYPE is the data type of the argument (as a tree).
473: This is null for libcalls where that information may
474: not be available.
475: CUM is a variable of type CUMULATIVE_ARGS which gives info about
476: the preceding args and about the function being called.
477: NAMED is nonzero if this argument is a named parameter
478: (otherwise it is an extra parameter matching an ellipsis). */
479:
480: /* On Convex, all args are pushed. */
481:
482: #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0
483:
484: /* This macro generates the assembly code for function entry.
485: FILE is a stdio stream to output the code to.
486: SIZE is an int: how many units of temporary storage to allocate.
487: Refer to the array `regs_ever_live' to determine which registers
488: to save; `regs_ever_live[I]' is nonzero if register number I
489: is ever used in the function. This macro is responsible for
490: knowing which registers should not be saved even if used. */
491:
492: #define FUNCTION_PROLOGUE(FILE, SIZE) \
493: { if ((SIZE) != 0) fprintf (FILE, "\tsub.w #%d,sp\n", ((SIZE) + 3) & -4);}
494:
495: /* Output assembler code for a block containing the constant parts
496: of a trampoline, leaving space for the variable parts. */
497:
498: /* On convex, the code for a trampoline is
499: ld.w #<link>,s0
500: jmp <func> */
501:
502: #define TRAMPOLINE_TEMPLATE(FILE) \
503: { \
504: ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x11c8)); \
505: ASM_OUTPUT_SHORT (FILE, const0_rtx); \
506: ASM_OUTPUT_SHORT (FILE, const0_rtx); \
507: ASM_OUTPUT_SHORT (FILE, gen_rtx (CONST_INT, VOIDmode, 0x0140)); \
508: ASM_OUTPUT_SHORT (FILE, const0_rtx); \
509: ASM_OUTPUT_SHORT (FILE, const0_rtx); \
510: }
511:
512: /* Length in units of the trampoline for entering a nested function. */
513:
514: #define TRAMPOLINE_SIZE 12
515:
516: /* Emit RTL insns to initialize the variable parts of a trampoline.
517: FNADDR is an RTX for the address of the function's pure code.
518: CXT is an RTX for the static chain value for the function. */
519:
520: #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
521: { \
522: emit_move_insn (gen_rtx (MEM, Pmode, plus_constant (TRAMP, 2)), CXT); \
523: emit_move_insn (gen_rtx (MEM, Pmode, plus_constant (TRAMP, 8)), FNADDR); \
524: emit_call_insn (gen_call (gen_rtx (MEM, QImode, \
525: gen_rtx (SYMBOL_REF, Pmode, \
526: "__enable_execute_stack")), \
527: const0_rtx)); \
528: }
529:
530: /* Output assembler code to FILE to increment profiler label # LABELNO
531: for profiling a function entry. */
532:
533: #define FUNCTION_PROFILER(FILE, LABELNO) \
534: fprintf (FILE, "\tldea LP%d,a1\n\tcallq mcount\n", (LABELNO));
535:
536: /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
537: the stack pointer does not matter. The value is tested only in
538: functions that have frame pointers.
539: No definition is equivalent to always zero. */
540:
541: #define EXIT_IGNORE_STACK 1
542:
543: /* This macro generates the assembly code for function exit,
544: on machines that need it. If FUNCTION_EPILOGUE is not defined
545: then individual return instructions are generated for each
546: return statement. Args are same as for FUNCTION_PROLOGUE. */
547:
548: /* #define FUNCTION_EPILOGUE(FILE, SIZE) */
549:
550: /* Store in the variable DEPTH the initial difference between the
551: frame pointer reg contents and the stack pointer reg contents,
552: as of the start of the function body. This depends on the layout
553: of the fixed parts of the stack frame and on how registers are saved. */
554: #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \
555: { (DEPTH) = get_frame_size (); }
556:
557: /* Addressing modes, and classification of registers for them. */
558:
559: /* #define HAVE_POST_INCREMENT */
560: /* #define HAVE_POST_DECREMENT */
561:
562: /* #define HAVE_PRE_DECREMENT */
563: /* #define HAVE_PRE_INCREMENT */
564:
565: /* Macros to check register numbers against specific register classes. */
566:
567: /* These assume that REGNO is a hard or pseudo reg number.
568: They give nonzero only if REGNO is a hard reg of the suitable class
569: or a pseudo reg currently allocated to a suitable hard reg.
570: Since they use reg_renumber, they are safe only once reg_renumber
571: has been allocated, which happens in local-alloc.c. */
572:
573: #define REGNO_OK_FOR_INDEX_P(regno) \
574: ((((regno) ^ 010) < 8 || ((reg_renumber[regno] ^ 010) & -8) == 0) \
575: && regno != 8)
576:
577: #define REGNO_OK_FOR_BASE_P(regno) REGNO_OK_FOR_INDEX_P (regno)
578:
579: /* Maximum number of registers that can appear in a valid memory address. */
580:
581: #define MAX_REGS_PER_ADDRESS 1
582:
583: /* 1 if X is an rtx for a constant that is a valid address. */
584:
585: #define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
586:
587: /* Nonzero if the constant value X is a legitimate general operand.
588: It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
589:
590: /* For convex, any single-word constant is ok; the only contexts
591: allowing general_operand of mode DI or DF are movdi and movdf. */
592:
593: #define LEGITIMATE_CONSTANT_P(X) \
594: (GET_CODE (X) != CONST_DOUBLE ? 1 : (LD_D_P (X) || LD_L_P (X)))
595:
596: /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
597: and check its validity for a certain class.
598: We have two alternate definitions for each of them.
599: The usual definition accepts all pseudo regs; the other rejects
600: them unless they have been allocated suitable hard regs.
601: The symbol REG_OK_STRICT causes the latter definition to be used.
602:
603: Most source files want to accept pseudo regs in the hope that
604: they will get allocated to the class that the insn wants them to be in.
605: Source files for reload pass need to be strict.
606: After reload, it makes no difference, since pseudo regs have
607: been eliminated by then. */
608:
609: #ifndef REG_OK_STRICT
610:
611: /* Nonzero if X is a hard reg that can be used as an index
612: or if it is a pseudo reg. */
1.1.1.3 root 613: #define REG_OK_FOR_INDEX_P(X) \
614: (REGNO (X) > 8 \
615: && REGNO (X) != VIRTUAL_STACK_VARS_REGNUM \
616: && REGNO (X) != VIRTUAL_STACK_DYNAMIC_REGNUM \
617: && REGNO (X) != VIRTUAL_OUTGOING_ARGS_REGNUM)
1.1 root 618: /* Nonzero if X is a hard reg that can be used as a base reg
619: or if it is a pseudo reg. */
1.1.1.3 root 620: #define REG_OK_FOR_BASE_P(X) REG_OK_FOR_INDEX_P (X)
1.1 root 621:
622: #else
623:
624: /* Nonzero if X is a hard reg that can be used as an index. */
625: #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
626: /* Nonzero if X is a hard reg that can be used as a base reg. */
627: #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
628:
629: #endif
630:
631: /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
632: that is a valid memory address for an instruction.
633: The MODE argument is the machine mode for the MEM expression
634: that wants to use this address.
635:
636: For Convex, valid addresses are
637: indirectable or (MEM indirectable)
638: where indirectable is
639: const, reg, (PLUS reg const)
640:
641: On C3-series processors, we avoid indirection since it's substantially
642: slower. */
643:
644: /* 1 if X is an address that we could indirect through. */
645: #define INDIRECTABLE_ADDRESS_P(X) \
646: (CONSTANT_ADDRESS_P (X) \
647: || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \
648: || (GET_CODE (X) == PLUS \
649: && GET_CODE (XEXP (X, 0)) == REG \
650: && REG_OK_FOR_BASE_P (XEXP (X, 0)) \
651: && CONSTANT_ADDRESS_P (XEXP (X, 1))) \
652: || (GET_CODE (X) == PLUS \
653: && GET_CODE (XEXP (X, 1)) == REG \
654: && REG_OK_FOR_BASE_P (XEXP (X, 1)) \
655: && CONSTANT_ADDRESS_P (XEXP (X, 0))))
656:
657: /* Go to ADDR if X is a valid address. */
658: #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
659: { register rtx xfoob = (X); \
660: if (INDIRECTABLE_ADDRESS_P (xfoob)) \
661: goto ADDR; \
662: xfoob = XEXP (X, 0); \
663: if (GET_CODE (X) == MEM \
664: && TARGET_INDIRECTS \
665: && INDIRECTABLE_ADDRESS_P (xfoob)) \
666: goto ADDR; \
667: if (GET_CODE (X) == PRE_DEC && REG_P (xfoob) \
668: && REGNO (xfoob) == STACK_POINTER_REGNUM) \
669: goto ADDR; }
670:
671: /* Try machine-dependent ways of modifying an illegitimate address
672: to be legitimate. If we find one, return the new, valid address.
673: This macro is used in only one place: `memory_address' in explow.c.
674:
675: OLDX is the address as it was before break_out_memory_refs was called.
676: In some cases it is useful to look at this to decide what needs to be done.
677:
678: MODE and WIN are passed so that this macro can use
679: GO_IF_LEGITIMATE_ADDRESS.
680:
681: It is always safe for this macro to do nothing. It exists to recognize
682: opportunities to optimize the output.
683:
684: For Convex, nothing needs to be done. */
685:
686: #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}
687:
688: /* Go to LABEL if ADDR (a legitimate address expression)
689: has an effect that depends on the machine mode it is used for. */
690:
691: #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) {}
692:
693: /* Specify the machine mode that this machine uses
694: for the index in the tablejump instruction. */
695: #define CASE_VECTOR_MODE SImode
696:
697: /* Define this if the case instruction expects the table
698: to contain offsets from the address of the table.
699: Do not define this if the table should contain absolute addresses. */
700: /* #define CASE_VECTOR_PC_RELATIVE */
701:
702: /* Define this if the case instruction drops through after the table
703: when the index is out of range. Don't define it if the case insn
704: jumps to the default label instead. */
705: /* #define CASE_DROPS_THROUGH */
706:
707: /* Specify the tree operation to be used to convert reals to integers. */
708: #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
709:
710: /* This is the kind of divide that is easiest to do in the general case. */
711: #define EASY_DIV_EXPR TRUNC_DIV_EXPR
712:
713: /* Define this as 1 if `char' should by default be signed; else as 0. */
714: #define DEFAULT_SIGNED_CHAR 1
715:
716: /* This flag, if defined, says the same insns that convert to a signed fixnum
717: also convert validly to an unsigned one. */
718: #define FIXUNS_TRUNC_LIKE_FIX_TRUNC
719:
720: /* Max number of bytes we can move from memory to memory
721: in one reasonably fast instruction. */
722: #define MOVE_MAX 8
723:
724: /* Define this if zero-extension is slow (more than one real instruction). */
725: /* #define SLOW_ZERO_EXTEND */
726:
727: /* Nonzero if access to memory by bytes is slow and undesirable. */
728: #define SLOW_BYTE_ACCESS 0
729:
730: /* Define if shifts truncate the shift count
731: which implies one can omit a sign-extension or zero-extension
732: of a shift count. */
1.1.1.4 ! root 733: /* #define SHIFT_COUNT_TRUNCATED */
1.1 root 734:
735: /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
736: is done just by pretending it is already truncated. */
737: #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
738:
739: /* On Convex, it is as good to call a constant function address as to
740: call an address kept in a register. */
741: #define NO_FUNCTION_CSE
742:
743: /* When a prototype says `char' or `short', really pass an `int'. */
744: #define PROMOTE_PROTOTYPES
745:
746: /* Specify the machine mode that pointers have.
747: After generation of rtl, the compiler makes no further distinction
748: between pointers and any other objects of this machine mode. */
749: #define Pmode SImode
750:
751: /* A function address in a call instruction
752: is a byte address (for indexing purposes)
753: so give the MEM rtx a byte's mode. */
754: #define FUNCTION_MODE QImode
755:
756: /* Compute the cost of computing a constant rtl expression RTX
757: whose rtx-code is CODE. The body of this macro is a portion
758: of a switch statement. If the code is computed here,
759: return it with a return statement. Otherwise, break from the switch. */
760:
1.1.1.3 root 761: #define CONST_COSTS(RTX,CODE,OUTER_CODE) \
1.1 root 762: case CONST: \
763: case LABEL_REF: \
764: case SYMBOL_REF: \
765: case CONST_INT: \
766: return 0; \
767: case CONST_DOUBLE: \
768: return 2;
769:
770: /* Provide the costs of a rtl expression. This is in the body of a
771: switch on CODE.
772: On C1 and C2, multiply is faster than shift. */
773:
1.1.1.3 root 774: #define RTX_COSTS(RTX,CODE,OUTER_CODE) \
1.1 root 775: case MULT: \
776: total = COSTS_N_INSNS (4); \
777: break; \
778: case LSHIFT: \
779: case ASHIFT: \
780: case LSHIFTRT: \
781: case ASHIFTRT: \
782: total = COSTS_N_INSNS (3); \
783: break;
784:
785: /* Compute the cost of an address. This is meant to approximate the size
786: and/or execution delay of an insn using that address. If the cost is
787: approximated by the RTL complexity, including CONST_COSTS above, as
788: is usually the case for CISC machines, this macro should not be defined.
789: For aggressively RISCy machines, only one insn format is allowed, so
790: this macro should be a constant. The value of this macro only matters
791: for valid addresses. */
792:
793: #define ADDRESS_COST(RTX) (GET_CODE (RTX) == MEM ? 3 : 1)
794:
795: /* Specify the cost of a branch insn; roughly the number of extra insns that
796: should be added to avoid a branch. */
797:
798: #define BRANCH_COST 0
799:
800: /* Check a `double' value for validity for a particular machine mode. */
801:
802: #define CHECK_FLOAT_VALUE(mode, d) \
803: if ((mode) == SFmode) \
804: { \
805: if ((d) > 1.7014117331926443e+38) \
806: { error ("magnitude of constant too large for `float'"); \
807: (d) = 1.7014117331926443e+38; } \
808: else if ((d) < -1.7014117331926443e+38) \
809: { error ("magnitude of constant too large for `float'"); \
810: (d) = -1.7014117331926443e+38; } \
811: else if (((d) > 0) && ((d) < 2.9387358770557188e-39)) \
812: { warning ("`float' constant truncated to zero"); \
813: (d) = 0.0; } \
814: else if (((d) < 0) && ((d) > -2.9387358770557188e-39)) \
815: { warning ("`float' constant truncated to zero"); \
816: (d) = 0.0; } \
817: }
818:
819: /* Tell final.c how to eliminate redundant test instructions. */
820:
821: /* Here we define machine-dependent flags and fields in cc_status
822: (see `conditions.h'). No extra ones are needed for convex. */
823:
824: /* Store in cc_status the expressions
825: that the condition codes will describe
826: after execution of an instruction whose pattern is EXP.
827: Do not alter them if the instruction would not alter the cc's. */
828:
829: #define NOTICE_UPDATE_CC(EXP,INSN) {}
830:
831: /* Control the assembler format that we output. */
832:
833: /* Output at beginning of assembler file. */
834:
835: #define ASM_FILE_START(FILE) fprintf (FILE, ";NO_APP\n")
836:
837: /* Output to assembler file text saying following lines
838: may contain character constants, extra white space, comments, etc. */
839:
840: #define ASM_APP_ON ";APP\n"
841:
842: /* Output to assembler file text saying following lines
843: no longer contain unusual constructs. */
844:
845: #define ASM_APP_OFF ";NO_APP\n"
846:
1.1.1.4 ! root 847: /* Output something following the gcc2_compiled tag to keep that label from
! 848: hiding a real function name for tools like adb and prof. */
! 849:
! 850: #define ASM_IDENTIFY_GCC(FILE) \
! 851: fprintf (FILE, "gcc2_compiled.:\n\tds.h 0\n");
! 852:
1.1 root 853: /* Alignment with Convex's assembler goes like this:
854: .text can be .aligned up to a halfword.
855: .data and .bss can be .aligned up to a longword.
856: .lcomm is not supported, explicit declarations in .bss must be used instead.
857: We get alignment for word and longword .text data by conventionally
858: using .text 2 for word-aligned data and .text 3 for longword-aligned
859: data. This requires that the data's size be a multiple of its alignment,
860: which seems to be always true. */
861:
862: /* Output before read-only data. */
863:
864: #define TEXT_SECTION_ASM_OP (current_section_is_text = 1, ".text")
865:
866: /* Output before writable data. */
867:
868: #define DATA_SECTION_ASM_OP (current_section_is_text = 0, ".data")
869:
870: /* Output before uninitialized data. */
871:
872: #define BSS_SECTION_ASM_OP (current_section_is_text = 0, ".bss")
873:
874: /* Define the .bss section for ASM_OUTPUT_LOCAL to use. */
875:
876: #define EXTRA_SECTIONS in_bss
877:
878: #define EXTRA_SECTION_FUNCTIONS \
879: void \
880: bss_section () \
881: { \
882: if (in_section != in_bss) \
883: { \
884: fprintf (asm_out_file, "%s\n", BSS_SECTION_ASM_OP); \
885: in_section = in_bss; \
886: } \
887: }
888:
889: /* This is how to output an assembler line
890: that says to advance the location counter
891: to a multiple of 2**LOG bytes. */
892:
893: #define ASM_OUTPUT_ALIGN(FILE,LOG) \
894: if (current_section_is_text && (LOG) > 1) \
895: fprintf (FILE, ".text %d\n", LOG); \
896: else if (current_section_is_text) \
897: fprintf (FILE, ".text\n.align %d\n", 1 << (LOG)); \
898: else \
899: fprintf (FILE, ".align %d\n", 1 << (LOG))
900:
901: /* How to refer to registers in assembler output.
902: This sequence is indexed by compiler's hard-register-number (see above). */
903:
904: #define REGISTER_NAMES \
905: {"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", \
906: "sp", "a1", "a2", "a3", "a4", "a5", "ap", "fp"}
907:
908: /* This is BSD, so it wants DBX format. */
909:
910: #define DBX_DEBUGGING_INFO
911:
912: /* How to renumber registers for dbx and gdb. */
913:
914: #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
915:
916: /* Do not break .stabs pseudos into continuations. */
917:
918: #define DBX_CONTIN_LENGTH 0
919:
920: /* This is the char to use for continuation (in case we need to turn
921: continuation back on). */
922:
923: #define DBX_CONTIN_CHAR '?'
924:
925: /* Don't use stab extensions until GDB v4 port is available for convex. */
926:
927: #define DEFAULT_GDB_EXTENSIONS 0
928: #define DBX_NO_XREFS
929:
930: /* This is how to output the definition of a user-level label named NAME,
931: such as the label on a static function or variable NAME. */
932:
933: #define ASM_OUTPUT_LABEL(FILE,NAME) \
934: do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
935:
936: /* This is how to output a command to make the user-level label named NAME
937: defined for reference from other files. */
938:
939: #define ASM_GLOBALIZE_LABEL(FILE,NAME) \
940: do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
941:
942: /* This is how to output a reference to a user-level label named NAME. */
943:
944: #define ASM_OUTPUT_LABELREF(FILE,NAME) \
945: fprintf (FILE, "_%s", NAME)
946:
947: /* This is how to output an internal numbered label where
948: PREFIX is the class of label and NUM is the number within the class. */
949:
950: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
951: fprintf (FILE, "%s%d:\n", PREFIX, NUM)
952:
953: /* Put case tables in .text 2, where they will be word-aligned */
954:
955: #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
956: ASM_OUTPUT_ALIGN (FILE, 2); \
957: ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM)
958:
959: #define ASM_OUTPUT_CASE_END(FILE,NUM,TABLE) \
960: ASM_OUTPUT_ALIGN (FILE, 1)
961:
962: /* This is how to store into the string LABEL
963: the symbol_ref name of an internal numbered label where
964: PREFIX is the class of label and NUM is the number within the class.
965: This is suitable for output with `assemble_name'. */
966:
967: #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
968: sprintf (LABEL, "*%s%d", PREFIX, NUM)
969:
970: /* This is how to output an assembler line defining a `double' constant. */
971:
972: #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
973: fprintf (FILE, "\tds.d %.17e\n", (VALUE))
974:
975: /* This is how to output an assembler line defining a `float' constant. */
976:
977: #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
978: fprintf (FILE, "\tds.s %.9e\n", (VALUE))
979:
980: /* This is how to output an assembler line defining an `int' constant. */
981:
982: #define ASM_OUTPUT_INT(FILE,VALUE) \
983: ( fprintf (FILE, "\tds.w "), \
984: output_addr_const (FILE, (VALUE)), \
985: fprintf (FILE, "\n"))
986:
987: /* Likewise for a `long long int' constant. */
988:
989: #define ASM_OUTPUT_DOUBLE_INT(FILE,VALUE) \
990: { \
991: if (GET_CODE (VALUE) == CONST_DOUBLE) \
992: fprintf (FILE, "\tds.w %d,%d\n", \
993: const_double_high_int (VALUE), const_double_low_int (VALUE)); \
994: else if (GET_CODE (VALUE) == CONST_INT) \
995: { \
996: int val = INTVAL (VALUE); \
997: fprintf (FILE, "\tds.w %d,%d\n", val < 0 ? -1 : 0, val); \
998: } \
999: else \
1000: abort (); \
1001: }
1002:
1003: /* Likewise for `char' and `short' constants. */
1004:
1005: #define ASM_OUTPUT_SHORT(FILE,VALUE) \
1006: ( fprintf (FILE, "\tds.h "), \
1007: output_addr_const (FILE, (VALUE)), \
1008: fprintf (FILE, "\n"))
1009:
1010: #define ASM_OUTPUT_CHAR(FILE,VALUE) \
1011: ( fprintf (FILE, "\tds.b "), \
1012: output_addr_const (FILE, (VALUE)), \
1013: fprintf (FILE, "\n"))
1014:
1015: /* This is how to output an assembler line for a numeric constant byte. */
1016:
1017: #define ASM_OUTPUT_BYTE(FILE,VALUE) \
1018: fprintf (FILE, "\tds.b %#x\n", (VALUE))
1019:
1020: /* This is how to output a string */
1021:
1022: #define ASM_OUTPUT_ASCII(FILE,STR,SIZE) do { \
1023: int i; \
1024: fprintf ((FILE), "\tds.b \""); \
1025: for (i = 0; i < (SIZE); i++) { \
1026: register int c = (STR)[i] & 0377; \
1027: if (c >= ' ' && c < 0177 && c != '\\' && c != '"') \
1028: putc (c, (FILE)); \
1029: else \
1030: fprintf ((FILE), "\\%03o", c);} \
1031: fprintf ((FILE), "\"\n");} while (0)
1032:
1033: /* This is how to output an insn to push a register on the stack.
1034: It need not be very fast code. */
1035:
1036: #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
1037: fprintf (FILE, "\tpsh.%c %s\n", \
1038: S_REGNO_P (REGNO) ? 'l' : 'w', \
1039: reg_names[REGNO])
1040:
1041: /* This is how to output an insn to pop a register from the stack.
1042: It need not be very fast code. */
1043:
1044: #define ASM_OUTPUT_REG_POP(FILE,REGNO) \
1045: fprintf (FILE, "\tpop.%c %s\n", \
1046: S_REGNO_P (REGNO) ? 'l' : 'w', \
1047: reg_names[REGNO])
1048:
1049: /* This is how to output an element of a case-vector that is absolute. */
1050:
1051: #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
1052: fprintf (FILE, "\tds.w L%d\n", VALUE)
1053:
1054: /* This is how to output an element of a case-vector that is relative.
1055: (not used on Convex) */
1056:
1057: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
1058: fprintf (FILE, "\tds.w L%d-L%d\n", VALUE, REL)
1059:
1060: /* This is how to output an assembler line
1061: that says to advance the location counter by SIZE bytes. */
1062:
1063: #define ASM_OUTPUT_SKIP(FILE,SIZE) \
1064: fprintf (FILE, "\tds.b %u(0)\n", (SIZE))
1065:
1066: /* This says how to output an assembler line
1067: to define a global common symbol. */
1068:
1069: #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
1070: ( fputs (".comm ", (FILE)), \
1071: assemble_name ((FILE), (NAME)), \
1072: fprintf ((FILE), ",%u\n", (ROUNDED)))
1073:
1074: /* This says how to output an assembler line
1075: to define a local common symbol. */
1076:
1077: #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
1078: ( bss_section (), \
1079: assemble_name ((FILE), (NAME)), \
1080: fprintf ((FILE), ":\tbs.b %u\n", (ROUNDED)))
1081:
1082: /* Store in OUTPUT a string (made with alloca) containing
1083: an assembler-name for a local static variable named NAME.
1084: LABELNO is an integer which is different for each call. */
1085:
1086: #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
1087: ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
1088: sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
1089:
1090: /* Define the parentheses used to group arithmetic operations
1091: in assembler code. */
1092:
1093: #define ASM_OPEN_PAREN "("
1094: #define ASM_CLOSE_PAREN ")"
1095:
1096: /* Define results of standard character escape sequences. */
1097: #define TARGET_BELL 007
1098: #define TARGET_BS 010
1099: #define TARGET_TAB 011
1100: #define TARGET_NEWLINE 012
1101: #define TARGET_VT 013
1102: #define TARGET_FF 014
1103: #define TARGET_CR 015
1104:
1105: /* Print an instruction operand X on file FILE.
1106: CODE is the code from the %-spec that requested printing this operand;
1107: if `%z3' was used to print operand 3, then CODE is 'z'. */
1108:
1109: #define PRINT_OPERAND(FILE, X, CODE) \
1110: { if (GET_CODE (X) == REG) \
1111: fprintf (FILE, "%s", reg_names[REGNO (X)]); \
1112: else if (GET_CODE (X) == MEM) \
1113: output_address (XEXP (X, 0)); \
1114: else if (GET_CODE (X) == CONST_DOUBLE \
1115: && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) \
1116: { union { double d; int i[2]; } u; \
1117: u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \
1118: fprintf (FILE, "#%.9e", u.d); } \
1119: else { putc ('#', FILE); output_addr_const (FILE, X); }}
1120:
1121: /* Print a memory operand whose address is X, on file FILE. */
1122:
1123: #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
1124: { \
1125: register rtx addr = ADDR; \
1126: register rtx index = 0; \
1127: register rtx offset = 0; \
1128: \
1129: if (GET_CODE (addr) == MEM) \
1130: { \
1131: fprintf (FILE, "@"); \
1132: addr = XEXP (addr, 0); \
1133: } \
1134: \
1135: switch (GET_CODE (addr)) \
1136: { \
1137: case REG: \
1138: index = addr; \
1139: break; \
1140: \
1141: case PLUS: \
1142: index = XEXP (addr, 0); \
1143: if (REG_P (index)) \
1144: offset = XEXP (addr, 1); \
1145: else \
1146: { \
1147: offset = XEXP (addr, 0); \
1148: index = XEXP (addr, 1); \
1149: if (! REG_P (index)) abort (); \
1150: } \
1151: break; \
1152: \
1153: default: \
1154: offset = addr; \
1155: break; \
1156: } \
1157: \
1158: if (offset) \
1159: output_addr_const (FILE, offset); \
1160: \
1161: if (index) \
1162: fprintf (FILE, "(%s)", reg_names[REGNO (index)]); \
1163: }
1164:
1165: /* Definitions for g++. */
1166:
1167: /* Do not put out GNU stabs for constructors and destructors.
1168: ld bounces them. */
1169:
1170: #define FASCIST_ASSEMBLER
1171:
1172: /* Convex user addresses are negative, so use positive numbers
1173: to mean `vtable index'. */
1174:
1175: #define VTABLE_USES_MASK
1176: #define VINDEX_MAX ((unsigned) 0x80000000)
1177: #define SET_DECL_VINDEX(DECL, INDEX) \
1178: (DECL_VINDEX (DECL) = (INDEX))
1179:
1.1.1.3 root 1180: #if 0 /* collect2.c should no longer need these. */
1.1 root 1181: /* Defs for compiling collect2.c in -pcc mode during bootstrap. */
1182:
1183: #ifdef COLLECT
1184:
1.1.1.3 root 1185: #ifndef __STDC__
1.1 root 1186:
1187: #define WTERMSIG(x) (((union wait *) &(x))->w_termsig)
1188: #define WEXITSTATUS(x) (((union wait *) &(x))->w_retcode)
1189:
1190: #endif
1191:
1192: #endif /* COLLECT */
1.1.1.3 root 1193: #endif /* 0 */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.