1 /* Definitions of target machine for GNU compiler.
2 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001 Free Software Foundation, Inc.
4 Contributed by O.M.Kellogg, DASA (oliver.kellogg@space.otn.dasa.de)
6 This file is part of GNU CC.
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
24 /* Names to predefine in the preprocessor for this target machine. */
26 /* See tm-sun3.h, tm-sun2.h, tm-isi68.h for different CPP_PREDEFINES. */
27 #define CPP_PREDEFINES ""
29 /* Print subsidiary information on the compiler version in use. */
31 #define TARGET_VERSION fprintf (stderr, " (1750A, IEEE syntax)");
33 #define TARGET_VERSION fprintf (stderr, " (MIL-STD-1750A)");
36 /* Run-time compilation parameters selecting different hardware subsets. */
38 #define TARGET_SWITCHES \
39 { {"vaxc-alignment", 2, N_("Use VAX-C alignment")}, \
40 { "", TARGET_DEFAULT, NULL}}
42 /* Default target_flags if no switches specified. */
44 #ifndef TARGET_DEFAULT
45 #define TARGET_DEFAULT 1
48 /*****************************************************************************/
50 /* SPECIAL ADDITION FOR MIL-STD-1750A by O.M.Kellogg, 15-Apr-1993 */
51 /* See file aux-output.c for the actual data instances. */
52 struct datalabel_array {
57 struct jumplabel_array {
61 enum section { Init, Normal, Konst, Static };
62 #define DATALBL_ARRSIZ 256
63 #define JMPLBL_ARRSIZ 256
65 extern struct datalabel_array datalbl[];
66 extern struct jumplabel_array jmplbl[];
67 extern int datalbl_ndx, jmplbl_ndx, label_pending, program_counter;
68 extern enum section current_section;
69 extern const char *const sectname[4];
71 /*--------------------------------------------------------------------*/
73 /* target machine storage layout */
75 /* Define this if most significant bit is lowest numbered
76 in instructions that operate on numbered bit-fields.
77 Though 1750 actually counts bits in big-endian fashion, the sign bit
78 is still the most significant bit, which is leftmost. Therefore leaving
79 this little-endian. Adjust short before assembler output when needed:
80 e.g. in QImode, a GCC bit n is a 1750 bit (15-n). */
81 #define BITS_BIG_ENDIAN 0
83 /* Define this if most significant byte of a word is the lowest numbered. */
84 /* For 1750 we can decide arbitrarily
85 since there are no machine instructions for them. */
86 #define BYTES_BIG_ENDIAN 0
88 /* Define this if most significant word of a multiword value is lowest
91 #define WORDS_BIG_ENDIAN 1
93 /* number of bits in an addressable storage unit */
94 #define BITS_PER_UNIT 16
96 /* Width in bits of a "word", which is the contents of a machine register.
97 Note that this is not necessarily the width of data type `int';
98 if using 16-bit ints on a 68000, this would still be 32.
99 But on a machine with 16-bit registers, this would be 16. */
100 #define BITS_PER_WORD 16
102 /* Width of a word, in units (bytes). */
103 #define UNITS_PER_WORD 1
105 /* Width in bits of a pointer.
106 See also the macro `Pmode' defined below. */
107 #define POINTER_SIZE 16
109 #define PTRDIFF_TYPE "int"
111 /* Type to use for `size_t'. If undefined, uses `long unsigned int'. */
112 #define SIZE_TYPE "int"
115 #define TARGET_FLOAT_FORMAT UNKNOWN_FLOAT_FORMAT
118 /* Allocation boundary (in *bits*) for storing pointers in memory. */
119 #define POINTER_BOUNDARY 16
121 /* Allocation boundary (in *bits*) for storing arguments in argument list. */
122 /* 1750: should have had to make this 32 when BITS_PER_WORD is 32. */
123 #define PARM_BOUNDARY 16
125 /* Boundary (in *bits*) on which stack pointer should be aligned. */
126 #define STACK_BOUNDARY 16
128 /* Allocation boundary (in *bits*) for the code of a function. */
129 #define FUNCTION_BOUNDARY 16
131 /* Alignment of field after `int : 0' in a structure. */
132 #define EMPTY_FIELD_BOUNDARY 16
134 /* No data type wants to be aligned rounder than this. */
135 #define BIGGEST_ALIGNMENT 16
137 /* Define this to 1 if move instructions will actually fail to work
138 when given unaligned data. */
139 #define STRICT_ALIGNMENT 0
141 /* Define number of bits in most basic integer type.
142 (If undefined, default is BITS_PER_WORD).
143 #define INT_TYPE_SIZE 16 */
145 /* Define number of bits in short integer type.
146 (If undefined, default is half of BITS_PER_WORD). */
147 #define SHORT_TYPE_SIZE 16
149 /* Define number of bits in long integer type.
150 (If undefined, default is BITS_PER_WORD). */
151 #define LONG_TYPE_SIZE 32
153 /* Define number of bits in long long integer type.
154 (If undefined, default is twice BITS_PER_WORD). */
155 /* 1750 PRELIMINARY : no processor support for `long long', therefore
156 need to check out the long-long opencodings ! */
157 #define LONG_LONG_TYPE_SIZE 64
159 /* Define number of bits in char type.
160 (If undefined, default is one fourth of BITS_PER_WORD). */
161 #define CHAR_TYPE_SIZE 16
163 /* Define number of bits in float type.
164 (If undefined, default is BITS_PER_WORD). */
165 #define FLOAT_TYPE_SIZE 32
167 /* Define number of bits in double type.
168 (If undefined, default is twice BITS_PER_WORD). */
169 #define DOUBLE_TYPE_SIZE 48
171 /*****************************************************************************/
173 /* Standard register usage. */
175 /* Number of actual hardware registers.
176 The hardware registers are assigned numbers for the compiler
177 from 0 to just below FIRST_PSEUDO_REGISTER.
178 All registers that the compiler knows about must be given numbers,
179 even those that are not normally considered general registers. */
180 #define FIRST_PSEUDO_REGISTER 16
182 /* 1 for registers that have pervasive standard uses
183 and are not available for the register allocator.
184 R15 is the 1750A stack pointer. R14 is the frame pointer. */
186 #define FIXED_REGISTERS \
187 { 0, 0, 0, 0, 0, 0, 0, 0, \
188 0, 0, 0, 0, 0, 0, 1, 1 }
190 /* 1 for registers not available across function calls.
191 These must include the FIXED_REGISTERS and also any
192 registers that can be used without being saved.
193 The latter must include the registers where values are returned
194 and the register where structure-value addresses are passed.
195 Aside from that, you can include as many other registers as you like.
196 1750: return value in R0 foll. (depending on size of retval).
197 Should be possible to refine this (how many regs are actually used) */
199 #define CALL_USED_REGISTERS \
200 { 1, 1, 1, 1, 1, 1, 1, 1, \
201 1, 1, 1, 1, 1, 1, 1, 1 }
203 /* Order in which to allocate registers. Each register must be
204 listed once, even those in FIXED_REGISTERS. List frame pointer
205 late and fixed registers last. Note that, in general, we prefer
206 registers listed in CALL_USED_REGISTERS, keeping the others
207 available for storage of persistent values. */
209 /* #define REG_ALLOC_ORDER \
210 { 2, 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }
213 /* Return number of consecutive hard regs needed starting at reg REGNO
214 to hold something of mode MODE.
215 This is ordinarily the length in words of a value of mode MODE
216 but can be less for certain modes in special long registers.
217 All 1750 registers are one word long. */
218 #define HARD_REGNO_NREGS(REGNO, MODE) \
219 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
221 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
222 #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
224 /* Value is 1 if it is a good idea to tie two pseudo registers
225 when one has mode MODE1 and one has mode MODE2.
226 If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
227 for any hard reg, then this must be 0 for correct output. */
228 #define MODES_TIEABLE_P(MODE1, MODE2) 1
230 /* Specify the registers used for certain standard purposes.
231 The values of these macros are register numbers. */
233 /* 1750A pc isn't overloaded on a register. */
234 /* #define PC_REGNUM */
236 /* Register to use for pushing function arguments. */
237 #define STACK_POINTER_REGNUM 15
239 /* Base register for access to local variables of the function. */
240 #define FRAME_POINTER_REGNUM 14
242 /* Value should be nonzero if functions must have frame pointers.
243 Zero means the frame pointer need not be set up (and parms
244 may be accessed via the stack pointer) in functions that seem suitable.
245 This is computed in `reload', in reload1.c. */
246 #define FRAME_POINTER_REQUIRED 0
248 /* Base register for access to arguments of the function. */
249 #define ARG_POINTER_REGNUM 14
251 /* Define this if successive args to a function occupy decreasing addresses
253 #define ARGS_GROW_DOWNWARD
256 /* Register in which static-chain is passed to a function. */
257 #define STATIC_CHAIN_REGNUM 13
259 /* Place in which caller passes the structure value address.
260 0 means push the value on the stack like an argument.
261 #define STRUCT_VALUE 0
264 /* Register in which address to store a structure value
265 arrives in the function.
266 #define STRUCT_VALUE_INCOMING 0
269 /* Register in which address to store a structure value
270 is passed to a function. */
271 #define STRUCT_VALUE_REGNUM 12
273 /* Define this to be 1 if all structure return values must be in memory. */
274 #define DEFAULT_PCC_STRUCT_RETURN 0
276 /*****************************************************************************/
278 /* Define the classes of registers for register constraints in the
279 machine description. Also define ranges of constants.
281 One of the classes must always be named ALL_REGS and include all hard regs.
282 If there is more than one class, another class must be named NO_REGS
283 and contain no registers.
285 The name GENERAL_REGS must be the name of a class (or an alias for
286 another name such as ALL_REGS). This is the class of registers
287 that is allowed by "g" or "r" in a register constraint.
288 Also, registers outside this class are allocated only when
289 instructions express preferences for them.
291 The classes must be numbered in nondecreasing order; that is,
292 a larger-numbered class must never be contained completely
293 in a smaller-numbered class.
295 For any two classes, it is very desirable that there be another
296 class that represents their union. */
298 /* 1750 note: The names (BASE_REGS/INDEX_REGS) are used in their *gcc sense*
299 (i.e. *opposite* to the MIL-STD-1750A defined meanings). This means that
300 R1..R15 are called "base" regs and R12..R15 are "index" regs.
301 Index reg mode (in the gcc sense) is not yet implemented (these are the
302 1750 "Base with Index Reg" instructions, LBX etc. See 1750.md)
304 Here's an example to drive this point home: in "LBX B12,R5"
305 B12 shall be called the "index" reg and R5 shall be the "base" reg.
306 This naming inversion is due to the GCC defined capabilities of
307 "Base" vs. "Index" regs. */
309 enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLASSES };
311 #define N_REG_CLASSES (int) LIM_REG_CLASSES
313 /* Since GENERAL_REGS is the same class as ALL_REGS,
314 don't give it a different class number; just make it an alias. */
315 #define GENERAL_REGS ALL_REGS
317 /* Give names of register classes as strings for dump file. */
319 #define REG_CLASS_NAMES \
320 { "NO_REGS", "R2", "R0_1", "INDEX_REGS", "BASE_REGS", "ALL_REGS" }
322 /* Define which registers fit in which classes.
323 This is an initializer for a vector of HARD_REG_SET
324 of length N_REG_CLASSES.
325 1750 "index" (remember, in the *GCC* sense!) regs are R12 through R15.
326 The only 1750 register not usable as BASE_REG is R0. */
328 #define REG_CLASS_CONTENTS { {0}, {0x0004}, {0x0003}, {0xf000}, {0xfffe}, {0xffff} }
330 /* The same information, inverted:
331 Return the class number of the smallest class containing
332 reg number REGNO. This could be a conditional expression
333 or could index an array. */
334 #define REGNO_REG_CLASS(REGNO) ((REGNO) == 2 ? R2 : (REGNO) == 0 ? R0_1 : \
335 (REGNO) >= 12 ? INDEX_REGS : (REGNO) > 0 ? BASE_REGS : ALL_REGS)
337 /* The class value for index registers, and the one for base regs. */
339 #define BASE_REG_CLASS BASE_REGS
340 #define INDEX_REG_CLASS INDEX_REGS
342 /* Get reg_class from a letter such as appears in the machine description.
343 For the 1750, we have 'z' for R0_1, 't' for R2, 'b' for gcc Base regs
344 and 'x' for gcc Index regs. */
346 #define REG_CLASS_FROM_LETTER(C) ((C) == 't' ? R2 : \
347 (C) == 'z' ? R0_1 : \
348 (C) == 'b' ? BASE_REGS : \
349 (C) == 'x' ? INDEX_REGS : NO_REGS)
351 /* The letters I,J,K,.. to P in a register constraint string
352 can be used to stand for particular ranges of immediate operands.
353 This macro defines what the ranges are.
354 C is the letter, and VALUE is a constant value.
355 Return 1 if VALUE is in the range specified by C.
358 `I' is used for ISP mode instructions,
359 `J' is used for ISN mode instructions,
360 `K' is used for the STC instruction's constant range,
361 `L' is used for unsigned 8-bit address displacements in instructions
362 of addressing mode "Base Relative",
363 `M' is for IM mode instructions et al.,
364 `O' is a synonym for (const_int 0). */
366 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
367 ((C) == 'I' ? (VALUE) > 0 && (VALUE) <= 16 : \
368 (C) == 'J' ? (VALUE) < 0 && (VALUE) >= -16 : \
369 (C) == 'K' ? (VALUE) >= 0 && (VALUE) <= 15 : \
370 (C) == 'L' ? (VALUE) >= 0 && (VALUE) <= 0xFF : \
371 (C) == 'M' ? (VALUE) >= -0x8000 && (VALUE) <= 0x7FFF : \
372 (C) == 'O' ? (VALUE) == 0 : 0)
374 /* Similar, but for floating constants, and defining letter 'G'.
375 Here VALUE is the CONST_DOUBLE rtx itself. */
376 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
377 ((C) == 'G' ? ((VALUE) == CONST0_RTX (HFmode) \
378 || (VALUE) == CONST0_RTX (TQFmode)) : 0)
380 /* Optional extra constraints for this machine.
382 For the 1750, `Q' means that this is a memory operand consisting
383 of the sum of an Index Register (in the GCC sense, i.e. R12..R15)
384 and a constant in the range 0..255. This constraint is used for
385 the Base Register with Offset address mode instructions (LB,STB,AB,..) */
387 #define EXTRA_CONSTRAINT(OP, C) \
388 ((C) == 'Q' && b_mode_operand (OP))
390 /* Given an rtx X being reloaded into a reg required to be
391 in class CLASS, return the class of reg to actually use.
392 In general this is just CLASS; but on some machines
393 in some cases it is preferable to use a more restrictive class. */
395 #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
397 /* Return the maximum number of consecutive registers
398 needed to represent mode MODE in a register of class CLASS.
399 On the 1750A, this is the size of MODE in words,
400 since class doesn't make any difference. */
401 #define CLASS_MAX_NREGS(CLASS,MODE) GET_MODE_SIZE(MODE)
403 /*****************************************************************************/
405 /* Stack layout; function entry, exit and calling. */
407 /* Define this if pushing a word on the stack
408 makes the stack pointer a smaller address. */
409 #define STACK_GROWS_DOWNWARD 1
411 /* Define this if the nominal address of the stack frame
412 is at the high-address end of the local variables;
413 goes at a more negative offset in the frame.
414 #define FRAME_GROWS_DOWNWARD
417 /* Offset within stack frame to start allocating local variables at.
418 If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
419 first local allocated. Otherwise, it is the offset to the BEGINNING
420 of the first local allocated.
422 #define STARTING_FRAME_OFFSET 1
424 /* This is the default anyway:
425 #define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) FRAMEADDR
428 /* If we generate an insn to push BYTES bytes,
429 this says how many the stack pointer really advances by.
430 1750 note: what GCC calls a "byte" is really a 16-bit word,
431 because BITS_PER_UNIT is 16. */
433 #define PUSH_ROUNDING(BYTES) (BYTES)
435 /* Define this macro if functions should assume that stack space has
436 been allocated for arguments even when their values are passed in
438 Size, in bytes, of the area reserved for arguments passed in
439 registers for the function represented by FNDECL.
440 #define REG_PARM_STACK_SPACE(FNDECL) 14 */
442 /* Define this if it is the responsibility of the caller to allocate
443 the area reserved for arguments passed in registers.
444 #define OUTGOING_REG_PARM_STACK_SPACE */
446 /* Offset of first parameter from the argument pointer register value.
448 Parameters appear in reversed order on the frame (so when they are
449 popped, they come off in the normal left-to-right order.)
451 one word for the caller's (PC+1) (i.e. the return address)
452 plus total size of called function's "auto" variables
453 plus one word for the caller's frame pointer (i.e. the old FP) */
455 #define FIRST_PARM_OFFSET(FNDECL) \
456 (1 + get_frame_size() + 1)
458 /* Value is 1 if returning from a function call automatically
459 pops the arguments described by the number-of-args field in the call.
460 FUNDECL is the declaration node of the function (as a tree),
461 FUNTYPE is the data type of the function (as a tree),
462 or for a library call it is an identifier node for the subroutine name.
465 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
467 /* Define how to find the value returned by a function.
468 VALTYPE is the data type of the value (as a tree).
469 If the precise function being called is known, FUNC is its FUNCTION_DECL;
470 otherwise, FUNC is 0. */
472 #define FUNCTION_VALUE(VALTYPE, FUNC) \
473 gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
475 /* Define how to find the value returned by a library function
476 assuming the value has mode MODE. */
477 /* 1750 note: no libcalls yet */
479 #define LIBCALL_VALUE(MODE) printf("LIBCALL_VALUE called!\n"), \
480 gen_rtx_REG (MODE, 0)
482 /* 1 if N is a possible register number for a function value. */
484 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
486 /* 1 if the tree TYPE should be returned in memory instead of in regs.
487 #define RETURN_IN_MEMORY(TYPE) \
488 (int_size_in_bytes(TYPE) > 12)
491 /* Define this if PCC uses the nonreentrant convention for returning
492 structure and union values.
493 #define PCC_STATIC_STRUCT_RETURN */
495 /* 1 if N is a possible register number for function argument passing. */
497 #define FUNCTION_ARG_REGNO_P(N) ((N) < 12)
499 /*****************************************************************************/
501 /* Define a data type for recording info about an argument list
502 during the scan of that argument list. This data type should
503 hold all necessary information about the function itself
504 and about the args processed so far, enough to enable macros
505 such as FUNCTION_ARG to determine where the next arg should go.
507 For 1750A, this is a single integer, which is a number of words
508 of arguments scanned so far. */
510 #define CUMULATIVE_ARGS int
512 /* Initialize a variable CUM of type CUMULATIVE_ARGS
513 for a call to a function whose data type is FNTYPE.
514 For a library call, FNTYPE is 0.
516 For 1750A, the offset starts at 0. */
518 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) ((CUM) = 0)
520 /* Update the data in CUM to advance over an argument
521 of mode MODE and data type TYPE.
522 (TYPE is null for libcalls where that information may not be available.)
524 1750 note: "int_size_in_bytes()" returns a unit relative to
525 BITS_PER_UNIT, so in our case not bytes, but 16-bit words. */
527 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
528 ((CUM) += (MODE) == BLKmode ? int_size_in_bytes(TYPE) : GET_MODE_SIZE(MODE))
530 /* Define where to put the arguments to a function.
531 Value is zero to push the argument on the stack,
532 or a hard register in which to store the argument.
534 MODE is the argument's machine mode.
535 TYPE is the data type of the argument (as a tree).
536 This is null for libcalls where that information may
538 CUM is a variable of type CUMULATIVE_ARGS which gives info about
539 the preceding args and about the function being called.
540 NAMED is nonzero if this argument is a named parameter
541 (otherwise it is an extra parameter matching an ellipsis). */
543 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) function_arg (CUM,MODE,TYPE,NAMED)
545 /* Define the following macro if function calls on the target machine
546 do not preserve any registers; in other words, if `CALL_USED_REGISTERS'
547 has 1 for all registers. This macro enables `-fcaller-saves' by
548 default. Eventually that option will be enabled by default on all
549 machines and both the option and this macro will be eliminated. */
551 #define DEFAULT_CALLER_SAVES
554 /* This macro generates the assembly code for function entry.
555 FILE is a stdio stream to output the code to.
556 SIZE is an int: how many units of temporary storage to allocate.
557 Refer to the array `regs_ever_live' to determine which registers
558 to save; `regs_ever_live[I]' is nonzero if register number I
559 is ever used in the function. This macro is responsible for
560 knowing which registers should not be saved even if used. */
563 #define FUNCTION_PROLOGUE(FILE, SIZE) { \
564 if (flag_verbose_asm) \
566 int regno, regs_used = 0; \
567 fprintf (FILE, "\t; registers used: "); \
568 for (regno = 0; regno < 14; regno++) \
569 if (regs_ever_live[regno]) \
571 fprintf (FILE, " %s", reg_names[regno]); \
574 if (regs_used == 0) \
575 fprintf (FILE, "(none)"); \
579 fprintf (FILE, "\n\t%s\tr15,%d", \
580 (SIZE <= 16 ? "sisp" : "sim"), SIZE); \
581 if (flag_verbose_asm) \
582 fprintf (FILE, " ; reserve local-variable space"); \
584 if (frame_pointer_needed) \
586 fprintf(FILE, "\n\tpshm\tr14,r14"); \
587 if (flag_verbose_asm) \
588 fprintf (FILE, " ; push old frame"); \
589 fprintf (FILE, "\n\tlr\tr14,r15"); \
590 if (flag_verbose_asm) \
591 fprintf (FILE, " ; set new frame"); \
593 fprintf (FILE, "\n"); \
594 program_counter = 0; \
598 /************* 1750: PROFILER HANDLING NOT YET DONE !!!!!!! *************/
599 /* Output assembler code to FILE to increment profiler label # LABELNO
600 for profiling a function entry. */
602 #define FUNCTION_PROFILER(FILE, LABELNO) \
603 fprintf (FILE, "; got into FUNCTION_PROFILER with label # %d\n", (LABELNO))
605 /* Output assembler code to FILE to initialize this source file's
606 basic block profiling info, if that has not already been done. */
607 #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \
608 fprintf (FILE, "; got into FUNCTION_BLOCK_PROFILER with label # %d\n",LABELNO)
610 /* Output assembler code to FILE to increment the entry-count for
611 the BLOCKNO'th basic block in this source file. */
612 #define BLOCK_PROFILER(FILE, BLOCKNO) \
613 fprintf (FILE, "; got into BLOCK_PROFILER with block # %d\n",BLOCKNO)
615 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
616 the stack pointer does not matter. The value is tested only in
617 functions that have frame pointers.
618 No definition is equivalent to always zero. */
620 #define EXIT_IGNORE_STACK 0
622 /* This macro generates the assembly code for function exit,
623 on machines that need it. If FUNCTION_EPILOGUE is not defined
624 then individual return instructions are generated for each
625 return statement. Args are same as for FUNCTION_PROLOGUE.
627 The function epilogue should not depend on the current stack pointer!
628 It should use the frame pointer only. This is mandatory because
629 of alloca; we also take advantage of it to omit stack adjustments
632 #define FUNCTION_EPILOGUE(FILE, SIZE) { \
633 if (frame_pointer_needed) \
635 fprintf (FILE, "\tlr\tr15,r14"); \
636 if (flag_verbose_asm) \
637 fprintf (FILE, " ; set stack ptr to frame ptr"); \
638 fprintf (FILE, "\n\tpopm\tr14,r14"); \
639 if (flag_verbose_asm) \
640 fprintf (FILE, " ; restore previous frame ptr"); \
641 fprintf (FILE, "\n"); \
645 fprintf (FILE, "\t%s\tr15,%d", \
646 (SIZE <= 16 ? "aisp" : "aim"), SIZE); \
647 if (flag_verbose_asm) \
648 fprintf (FILE, " ; free up local-var space"); \
649 fprintf (FILE, "\n"); \
651 fprintf (FILE, "\turs\tr15\n\n"); \
654 /* If the memory address ADDR is relative to the frame pointer,
655 correct it to be relative to the stack pointer instead.
656 This is for when we don't use a frame pointer.
657 ADDR should be a variable name.
659 #define FIX_FRAME_POINTER_ADDRESS(ADDR,DEPTH)
662 /* Store in the variable DEPTH the initial difference between the
663 frame pointer reg contents and the stack pointer reg contents,
664 as of the start of the function body. This depends on the layout
665 of the fixed parts of the stack frame and on how registers are saved.
666 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) DEPTH = 0
669 #define ELIMINABLE_REGS { \
670 { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
671 { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }, \
672 { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM } }
674 #define CAN_ELIMINATE(FROM, TO) 1
676 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
677 OFFSET = (TO == STACK_POINTER_REGNUM) ? -1 : 0
680 /* Output assembler code for a block containing the constant parts
681 of a trampoline, leaving space for the variable parts. */
683 #define TRAMPOLINE_TEMPLATE(FILE) fprintf(FILE,"TRAMPOLINE_TEMPLATE called\n")
685 /* Length in units of the trampoline for entering a nested function. */
687 #define TRAMPOLINE_SIZE 2
689 /* Emit RTL insns to initialize the variable parts of a trampoline.
690 FNADDR is an RTX for the address of the function's pure code.
691 CXT is an RTX for the static chain value for the function. */
693 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) printf("INITIALIZE_TRAMPO called\n")
695 emit_move_insn (gen_rtx_MEM (QImode, plus_constant (TRAMP, 1)), CXT); \
696 emit_move_insn (gen_rtx_MEM (QImode, plus_constant (TRAMP, 6)), FNADDR); \
700 /*****************************************************************************/
702 /* Addressing modes, and classification of registers for them. */
704 /* 1750 doesn't have a lot of auto-incr./decr. - just for the stack ptr. */
706 /* #define HAVE_POST_INCREMENT 0 just for R15 (stack pointer) */
707 /* #define HAVE_POST_DECREMENT 0 */
708 /* #define HAVE_PRE_DECREMENT 0 just for R15 (stack pointer) */
709 /* #define HAVE_PRE_INCREMENT 0 */
711 /* Macros to check register numbers against specific register classes. */
713 /* These assume that REGNO is a hard or pseudo reg number.
714 They give nonzero only if REGNO is a hard reg of the suitable class
715 or a pseudo reg currently allocated to a suitable hard reg.
716 Since they use reg_renumber, they are safe only once reg_renumber
717 has been allocated, which happens in local-alloc.c.
718 1750 note: The words BASE and INDEX are used in their GCC senses:
719 The "Index Registers", R12 through R15, are used in the 1750
720 instructions LB,STB,AB,SBB,MB,DB,LBX,STBX,...
723 #define REGNO_OK_FOR_BASE_P(REGNO) \
724 (((REGNO) > 0 && (REGNO) <= 15) || \
725 (reg_renumber[REGNO] > 0 && reg_renumber[REGNO] <= 15))
726 #define REGNO_OK_FOR_INDEX_P(REGNO) \
727 (((REGNO) >= 12 && (REGNO) <= 15) || \
728 (reg_renumber[REGNO] >= 12 && reg_renumber[REGNO] <= 15))
730 /* Now macros that check whether X is a register and also,
731 strictly, whether it is in a specified class. */
733 /* 1 if X is an address register */
735 #define ADDRESS_REG_P(X) (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X)))
737 /* Maximum number of registers that can appear in a valid memory address. */
738 #define MAX_REGS_PER_ADDRESS 1
740 /* Recognize any constant value that is a valid address. */
742 #define CONSTANT_ADDRESS_P(X) CONSTANT_P(X)
744 /* Nonzero if the constant value X is a legitimate general operand.
745 It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
747 #define LEGITIMATE_CONSTANT_P(X) 1
749 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
750 and check its validity for a certain class.
751 We have two alternate definitions for each of them.
752 The usual definition accepts all pseudo regs; the other rejects
753 them unless they have been allocated suitable hard regs.
754 The symbol REG_OK_STRICT causes the latter definition to be used.
756 Most source files want to accept pseudo regs in the hope that
757 they will get allocated to the class that the insn wants them to be in.
758 Source files for reload pass need to be strict.
759 After reload, it makes no difference, since pseudo regs have
760 been eliminated by then. */
764 /* Nonzero if X is a hard reg that can be used as an index. */
765 #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P(REGNO(X))
766 /* Nonzero if X is a hard reg that can be used as a base reg. */
767 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P(REGNO(X))
771 /* Nonzero if X is a hard reg that can be used as an index
772 or if it is a pseudo reg. */
773 #define REG_OK_FOR_INDEX_P(X) (REGNO (X) >= 12)
774 /* Nonzero if X is a hard reg that can be used as a base reg
775 or if it is a pseudo reg. */
776 #define REG_OK_FOR_BASE_P(X) (REGNO (X) > 0)
781 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
782 that is a valid memory address for an instruction.
783 The MODE argument is the machine mode for the MEM expression
784 that wants to use this address.
785 The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS.
787 1750 note: Currently we don't implement address expressions that use
788 GCC "Index"-class regs. To be expanded to handle the 1750 "Base with Index"
789 instructions (see also MAX_REGS_PER_ADDRESS and others). */
791 #define GO_IF_BASED_ADDRESS(X, ADDR) { \
792 if ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P(X))) \
794 if (GET_CODE (X) == PLUS) \
795 { register rtx x0 = XEXP(X,0), x1 = XEXP(X,1); \
796 if ((REG_P(x0) && REG_OK_FOR_BASE_P(x0) && CONSTANT_ADDRESS_P(x1)) \
797 || (REG_P(x1) && REG_OK_FOR_BASE_P(x1) && CONSTANT_ADDRESS_P(x0))) \
800 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) { \
801 if (CONSTANT_ADDRESS_P(X)) goto ADDR; \
802 GO_IF_BASED_ADDRESS(X,ADDR) }
805 /* Try machine-dependent ways of modifying an illegitimate address
806 to be legitimate. If we find one, return the new, valid address.
807 This macro is used in only one place: `memory_address' in explow.c.
809 OLDX is the address as it was before break_out_memory_refs was called.
810 In some cases it is useful to look at this to decide what needs to be done.
812 MODE and WIN are passed so that this macro can use
813 GO_IF_LEGITIMATE_ADDRESS.
815 It is always safe for this macro to do nothing. It exists to recognize
816 opportunities to optimize the output. */
818 #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)
820 /* Go to LABEL if ADDR (a legitimate address expression)
821 has an effect that depends on the machine mode it is used for.
822 On the 68000, only predecrement and postincrement address depend thus
823 (the amount of decrement or increment being the length of the operand). */
824 /* 1750: not used. */
826 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
828 /*****************************************************************************/
830 /* Specify the machine mode that this machine uses
831 for the index in the tablejump instruction. */
832 #define CASE_VECTOR_MODE QImode
834 /* Define as C expression which evaluates to nonzero if the tablejump
835 instruction expects the table to contain offsets from the address of the
837 Do not define this if the table should contain absolute addresses. */
838 /* #define CASE_VECTOR_PC_RELATIVE 1 */
840 /* Specify the tree operation to be used to convert reals to integers. */
841 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
843 /* This is the kind of divide that is easiest to do in the general case. */
844 #define EASY_DIV_EXPR TRUNC_DIV_EXPR
846 /* Define this as 1 if `char' should by default be signed; else as 0. */
847 #define DEFAULT_SIGNED_CHAR 1
849 /* Max number of bytes we can move from memory to memory
850 in one reasonably fast instruction. */
851 #define MOVE_MAX 65536
853 /* If a memory-to-memory move would take MOVE_RATIO or more simple
854 move-instruction pairs, we will do a movstr or libcall instead. */
857 /* Define this if zero-extension is slow (more than one real instruction). */
858 /* #define SLOW_ZERO_EXTEND */
860 /* Nonzero if access to memory by bytes is slow and undesirable. */
861 #define SLOW_BYTE_ACCESS 0
863 /* Define if shifts truncate the shift count
864 which implies one can omit a sign-extension or zero-extension
866 /* #define SHIFT_COUNT_TRUNCATED 1 */
868 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
869 is done just by pretending it is already truncated. */
870 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
872 /* We assume that the store-condition-codes instructions store 0 for false
873 and some other value for true. This is the value stored for true. */
875 #define STORE_FLAG_VALUE 1
877 /* When a prototype says `char' or `short', really pass an `int'.
878 1750: for now, `char' is 16 bits wide anyway. */
879 #define PROMOTE_PROTOTYPES 0
881 /* Specify the machine mode that pointers have.
882 After generation of rtl, the compiler makes no further distinction
883 between pointers and any other objects of this machine mode. */
886 /* A function address in a call instruction
887 is a 16-bit address (for indexing purposes) */
888 #define FUNCTION_MODE QImode
890 /* Compute the cost of computing a constant rtl expression RTX
891 whose rtx-code is CODE. The body of this macro is a portion
892 of a switch statement. If the code is computed here,
893 return it with a return statement. Otherwise, break from the switch. */
895 #define CONST_COSTS(RTX,CODE,OUTER_CODE) \
897 return (INTVAL(RTX) >= -16 && INTVAL(RTX) <= 16) ? 1 : 3; \
905 #define ADDRESS_COST(ADDRESS) (memop_valid (ADDRESS) ? 3 : 10)
907 #define REGISTER_MOVE_COST(MODE,FROM,TO) 2
909 #define MEMORY_MOVE_COST(M,C,I) 4
911 /* Tell final.c how to eliminate redundant test instructions. */
913 /* Here we define machine-dependent flags and fields in cc_status
914 (see `conditions.h'). */
915 /* MIL-STD-1750: none -- just has the garden variety C,P,Z,N flags. */
917 /* Store in cc_status the expressions
918 that the condition codes will describe
919 after execution of an instruction whose pattern is EXP.
920 Do not alter them if the instruction would not alter the cc's.
921 1750: See file out-1750a.c for notice_update_cc(). */
923 #define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP)
925 /**********************************************/
926 /* Produce debugging info in the DWARF format
927 #define DWARF_DEBUGGING_INFO
930 /*****************************************************************************/
932 /* Control the assembler format that we output. */
934 /* Output at beginning of assembler file. */
936 #define ASM_FILE_START(FILE) { \
938 if ((p = (char *)strrchr(main_input_filename,'/')) != NULL ? 1 : \
939 (p = (char *)strrchr(main_input_filename,']')) != NULL) \
942 p = main_input_filename; \
944 if ((p = (char *)strchr(name,'.'))) \
946 fprintf(FILE,"\tname %s\n",name); \
947 fprintf(FILE,"\tnolist\n\tinclude \"ms1750.inc\"\n\tlist\n\n"); \
948 fprintf(FILE,"\tglobal\t__main\n\n"); }
950 /* Output at end of assembler file.
951 For 1750, we copy the data labels accrued in datalbl[] from the Constants
952 section (Konst) to the Writable-Data section (Static). */
954 #define ASM_FILE_END(FILE) \
956 if (datalbl_ndx >= 0) { \
958 fprintf(FILE,"\n\tstatic\ninit_srel\n"); \
959 for (i = 0; i <= datalbl_ndx; i++) { \
960 if (datalbl[i].name == NULL) \
962 fprintf(stderr, "asm_file_end internal datalbl err\n"); \
965 fprintf(FILE,"%s \tblock %d\n", \
966 datalbl[i].name,datalbl[i].size); \
967 cum_size += datalbl[i].size; \
969 fprintf(FILE,"\n\tinit\n"); \
970 fprintf(FILE,"\tlim\tr0,init_srel\n"); /* destin. */ \
971 fprintf(FILE,"\tlim\tr1,%d\n",cum_size); /* count */ \
972 fprintf(FILE,"\tlim\tr2,K%s\n",datalbl[0].name); /* source */ \
973 fprintf(FILE,"\tmov\tr0,r2\n"); \
974 fprintf(FILE,"\n\tnormal\n"); \
975 datalbl_ndx = -1; /* reset stuff */ \
976 for (i = 0; i < DATALBL_ARRSIZ; i++) \
977 datalbl[i].size = 0; \
979 fprintf(FILE,"\n\tend\n"); \
982 /* Output to assembler file text saying following lines
983 may contain character constants, extra white space, comments, etc. */
985 #define ASM_APP_ON "; ASM_APP_ON\n"
987 /* Output to assembler file text saying following lines
988 no longer contain unusual constructs. */
990 #define ASM_APP_OFF "; ASM_APP_OFF\n"
993 #define EXTRA_SECTIONS in_readonly_data
995 #define EXTRA_SECTION_FUNCTIONS \
996 void const_section() \
998 fprintf(asm_out_file,"\tkonst\n"); \
999 current_section = Konst; \
1001 void check_section(sect) \
1002 enum section sect; \
1004 if (current_section != sect) { \
1005 fprintf(asm_out_file,"\t%s\n",sectname[(int)sect]); \
1006 current_section = sect; \
1011 in_section = in_text; \
1014 in_section = in_data; \
1017 in_section = in_readonly_data; \
1023 /* Function that switches to the read-only data section (optional) */
1024 #define READONLY_DATA_SECTION const_section
1026 /* Output before program init section */
1027 #define INIT_SECTION_ASM_OP "\n\tinit ; init_section\n"
1029 /* Output before program text section */
1030 #define TEXT_SECTION_ASM_OP "\n\tnormal ; text_section\n"
1032 /* Output before writable data.
1033 1750 Note: This is actually read-only data. The copying from read-only
1034 to writable memory is done elsewhere (in ASM_FILE_END.)
1036 #define DATA_SECTION_ASM_OP "\n\tkonst ; data_section\n"
1038 /* How to refer to registers in assembler output.
1039 This sequence is indexed by compiler's hard-register-number (see above). */
1041 #define REGISTER_NAMES \
1042 { "0", "1", "2", "3", "4", "5", "6", "7", \
1043 "8", "9","10","11","12","13","14","15" }
1045 /* How to renumber registers for dbx and gdb. */
1047 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
1049 /****************** Assembler output formatting **********************/
1051 #define ASM_IDENTIFY_GCC(FILE) fputs ("; gcc2_compiled:\n", FILE)
1053 #define ASM_COMMENT_START ";"
1055 #define ASM_OUTPUT_FUNNAM(FILE,NAME) \
1056 fprintf(FILE,"%s\n",NAME)
1058 #define ASM_OUTPUT_OPCODE(FILE,PTR) do { \
1059 while (*(PTR) != '\0' && *(PTR) != ' ') { \
1060 putc (*(PTR), FILE); \
1063 while (*(PTR) == ' ') \
1065 putc ('\t', FILE); \
1066 program_counter += 2; \
1069 #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \
1070 fprintf(FILE,"%s\n",NAME)
1072 /* This is how to output the definition of a user-level label named NAME,
1073 such as the label on a static function or variable NAME. */
1074 /* 1750 note: Labels are prefixed with a 'K'. This is because handling
1075 has been changed for labels to be output in the "Constants" section
1076 (named "Konst"), and special initialization code takes care of copying
1077 the Const-section data into the writable data section (named "Static").
1078 In the Static section we therefore have the true label names (i.e.
1079 not prefixed with 'K'). */
1081 #define ASM_OUTPUT_LABEL(FILE,NAME) \
1082 do { if (NAME[0] == '.') { \
1083 fprintf(stderr,"Oops! label %s can't begin with '.'\n",NAME); \
1087 check_section(Konst); \
1088 fprintf(FILE,"K%s\n",NAME); \
1090 datalbl[++datalbl_ndx].name = (char *)xstrdup (NAME);\
1091 datalbl[datalbl_ndx].size = 0; \
1092 label_pending = 1; \
1097 /* This is how to output a command to make the user-level label named NAME
1098 defined for reference from other files. */
1100 #define ASM_GLOBALIZE_LABEL(FILE,NAME) do { \
1101 fprintf (FILE, "\tglobal %s\t; export\n", NAME); \
1104 /* The prefix to add to user-visible assembler symbols. */
1106 #define USER_LABEL_PREFIX ""
1108 /* This is how to output an internal numbered label where
1109 PREFIX is the class of label and NUM is the number within the class. */
1111 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
1113 if (strcmp(PREFIX,"LC") == 0) { \
1114 label_pending = 1; \
1115 datalbl[++datalbl_ndx].name = (char *) xmalloc (9);\
1116 sprintf(datalbl[datalbl_ndx].name,"LC%d",NUM); \
1117 datalbl[datalbl_ndx].size = 0; \
1118 check_section(Konst); \
1119 fprintf(FILE,"K%s%d\n",PREFIX,NUM); \
1121 else if (find_jmplbl(NUM) < 0) { \
1122 jmplbl[++jmplbl_ndx].num = NUM; \
1123 jmplbl[jmplbl_ndx].pc = program_counter; \
1124 fprintf(FILE, "%s%d\n", PREFIX, NUM); \
1130 /* This is how to store into the string LABEL
1131 the symbol_ref name of an internal numbered label where
1132 PREFIX is the class of label and NUM is the number within the class.
1133 This is suitable for output with `assemble_name'. */
1135 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
1136 sprintf (LABEL, "%s%d", PREFIX, NUM)
1138 /* Output at the end of a jump table.
1139 1750: To be uncommented when we can put jump tables in Konst.
1140 #define ASM_OUTPUT_CASE_END(FILE,NUM,INSN) \
1141 fprintf (FILE, "\tnormal\t; case_end\n")
1144 /* Currently, it is not possible to put jump tables in section Konst.
1145 This is because there is a one-to-one relation between sections Konst
1146 and Static (i.e., all Konst data are copied to Static, and the order
1147 of data is the same between the two sections.) However, jump tables are
1148 not copied to Static, which destroys the equivalence between Konst and
1149 Static. When a more intelligent Konst-to-Static copying mechanism is
1150 implemented (i.e. one that excludes the copying of jumptables), then
1151 ASM_OUTPUT_CASE_END shall be defined, and JUMP_LABELS_IN_TEXT_SECTION
1152 shall be undefined. */
1154 #define JUMP_TABLES_IN_TEXT_SECTION 1
1156 /* This is how to output an assembler line defining a 1750A `float'
1159 #define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE) \
1161 if (label_pending) { \
1162 label_pending = 0; \
1163 sprintf (datalbl[datalbl_ndx].value, "%f", (double) VALUE); \
1165 datalbl[datalbl_ndx].size += 2; \
1166 fprintf (FILE, "\tdataf\t%f\n",VALUE); \
1169 /* This is how to output an assembler line defining a 1750A `double'
1172 #define ASM_OUTPUT_THREE_QUARTER_FLOAT(FILE,VALUE) \
1174 if (label_pending) { \
1175 label_pending = 0; \
1176 sprintf (datalbl[datalbl_ndx].value, "%f", VALUE); \
1178 datalbl[datalbl_ndx].size += 3; \
1179 fprintf(FILE,"\tdataef\t%f\n",VALUE); \
1182 /* This is how to output an assembler line defining a string constant. */
1184 #define ASM_OUTPUT_ASCII(FILE, PTR, LEN) do { \
1186 if (label_pending) \
1187 label_pending = 0; \
1188 datalbl[datalbl_ndx].size += LEN; \
1189 for (i = 0; i < LEN; i++) { \
1190 if ((i % 15) == 0) { \
1192 fprintf(FILE,"\n"); \
1193 fprintf(FILE,"\tdata\t"); \
1196 fprintf(FILE,","); \
1197 if (PTR[i] >= 32 && PTR[i] < 127) \
1198 fprintf(FILE,"'%c'",PTR[i]); \
1200 fprintf(FILE,"%d",PTR[i]); \
1202 fprintf(FILE,"\n"); \
1205 /* This is how to output an assembler line defining a `char', `short', or
1207 1750 NOTE: The reason why this macro also outputs `short' and `int'
1208 constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the
1209 usual 8.) This behavior is different from the usual, where
1210 ASM_OUTPUT_CHAR only outputs character constants. The name
1211 of this macro should perhaps be `ASM_OUTPUT_QUARTER_INT' or so.
1214 #define ASM_OUTPUT_CHAR(FILE,VALUE) do { \
1215 if (label_pending) \
1216 label_pending = 0; \
1217 datalbl[datalbl_ndx].size++; \
1218 fprintf(FILE, "\tdata\t"); \
1219 output_addr_const(FILE, VALUE); \
1220 fprintf(FILE, "\n"); \
1223 /* This is how to output an assembler line defining a `long int' constant.
1224 1750 NOTE: The reason why this macro outputs `long' instead of `short'
1225 constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the
1226 usual 8.) The name of this macro should perhaps be `ASM_OUTPUT_HALF_INT'.
1229 #define ASM_OUTPUT_SHORT(FILE,VALUE) do { \
1230 if (label_pending) \
1231 label_pending = 0; \
1232 datalbl[datalbl_ndx].size += 2; \
1233 fprintf(FILE, "\tdatal\t%d\n",INTVAL(VALUE)); \
1236 /* This is how to output an assembler line for a numeric constant byte. */
1238 #define ASM_OUTPUT_BYTE(FILE,VALUE) do { \
1239 if (label_pending) \
1240 label_pending = 0; \
1241 datalbl[datalbl_ndx].size++; \
1242 fprintf(FILE, "\tdata\t#%x\n", VALUE); \
1245 /* This is how to output an insn to push a register on the stack.
1246 It need not be very fast code. */
1248 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
1249 fprintf (FILE, "\tPSHM R%s,R%s\n", reg_names[REGNO], "FIXME: missing arg")
1251 /* This is how to output an insn to pop a register from the stack.
1252 It need not be very fast code. */
1254 #define ASM_OUTPUT_REG_POP(FILE,REGNO) \
1255 fprintf (FILE, "\tPOPM R%s,R%s\n", reg_names[REGNO], "FIXME: missing arg")
1257 /* This is how to output an element of a case-vector that is absolute. */
1259 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
1260 fprintf (FILE, "\tdata\tL%d ;addr_vec_elt\n", VALUE)
1262 /* This is how to output an element of a case-vector that is relative. */
1264 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
1265 fprintf (FILE, "\tdata\tL%d-L%d ;addr_diff_elt\n", VALUE,REL)
1267 /* This is how to output an assembler line
1268 that says to advance the location counter
1269 to a multiple of 2**LOG bytes. */
1271 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
1272 fprintf(FILE,"; in ASM_OUTPUT_ALIGN: pwr_of_2_bytcnt=%d\n",LOG)
1274 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
1275 fprintf(FILE,"; in ASM_OUTPUT_SKIP: size=%d\n",SIZE)
1277 /* This says how to output an assembler line
1278 to define a global common symbol. */
1280 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) do { \
1281 check_section(Static); \
1282 fprintf (FILE, "\tcommon %s,%d\n", NAME, SIZE); \
1285 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) do { \
1286 fprintf (FILE, "\tglobal %s\t; import\n", NAME); \
1289 /* This says how to output an assembler line
1290 to define a local common symbol. */
1292 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) do { \
1293 check_section (Static); \
1294 fprintf(FILE,"%s \tblock %d\t; local common\n",NAME,SIZE); \
1297 /* Store in OUTPUT a string (made with alloca) containing
1298 an assembler-name for a local static variable named NAME.
1299 LABELNO is an integer which is different for each call. */
1301 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
1302 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
1303 sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
1305 #define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME) do { \
1306 fprintf(FILE, "\tinit\n\t"); assemble_name(FILE, NAME); \
1307 fprintf(FILE," ;constructor\n"); } while (0)
1309 #define ASM_OUTPUT_DESTRUCTOR(FILE, NAME) do { \
1310 fprintf(FILE, "\tinit\n\t"); assemble_name(FILE, NAME); \
1311 fprintf(FILE," ;destructor\n"); } while (0)
1313 /* Define the parentheses used to group arithmetic operations
1314 in assembler code. */
1316 #define ASM_OPEN_PAREN "("
1317 #define ASM_CLOSE_PAREN ")"
1319 /* Define results of standard character escape sequences. */
1320 #define TARGET_BELL 007
1321 #define TARGET_BS 010
1322 #define TARGET_TAB 011
1323 #define TARGET_NEWLINE 012
1324 #define TARGET_VT 013
1325 #define TARGET_FF 014
1326 #define TARGET_CR 015
1329 /* Print operand X (an rtx) in assembler syntax to file FILE.
1330 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
1331 For `%' followed by punctuation, CODE is the punctuation and X is null.
1332 1750 note: there are three special CODE characters:
1333 'D', 'E': print a reference to a floating point constant (D=double,
1334 E=single precision) label name
1335 'F': print a label defining a floating-point constant value
1336 'J': print the absolute value of a negative INT_CONST
1337 (this is used in LISN/CISN/MISN/SISP and others)
1338 'Q': print a 1750 Base-Register-with-offset instruction's operands
1341 /* 1750A: see file aux-output.c */
1342 #define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE,X,CODE)
1343 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE,ADDR)