]>
gcc.gnu.org Git - gcc.git/blob - gcc/config/1750a/1750a.h
1 /* Definitions of target machine for GNU compiler.
2 Copyright (C) 1994, 1995 Free Software Foundation, Inc.
3 Contributed by O.M.Kellogg, DASA (okellogg@salyko.cube.net).
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 1, or (at your option)
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
22 /* Names to predefine in the preprocessor for this target machine. */
24 /* See tm-sun3.h, tm-sun2.h, tm-isi68.h for different CPP_PREDEFINES. */
25 #define CPP_PREDEFINES ""
27 /* Print subsidiary information on the compiler version in use. */
29 #define TARGET_VERSION fprintf (stderr, " (1750A, IEEE syntax)");
31 #define TARGET_VERSION fprintf (stderr, " (MIL-STD-1750A)");
34 /* Run-time compilation parameters selecting different hardware subsets. */
36 #define TARGET_SWITCHES \
37 { {"vaxc-alignment", 2}, \
38 { "", TARGET_DEFAULT}}
40 /* Default target_flags if no switches specified. */
42 #ifndef TARGET_DEFAULT
43 #define TARGET_DEFAULT 1
46 /*****************************************************************************/
48 /* SPECIAL ADDITION FOR MIL-STD-1750A by O.M.Kellogg, 15-Apr-1993 */
49 /* See file aux-output.c for the actual data instances. */
50 struct datalabel_array
{
55 struct jumplabel_array
{
59 enum section
{ Init
, Normal
, Konst
, Static
};
60 #define DATALBL_ARRSIZ 256
61 #define JMPLBL_ARRSIZ 256
63 extern struct datalabel_array datalbl
[];
64 extern struct jumplabel_array jmplbl
[];
65 extern int datalbl_ndx
, jmplbl_ndx
, label_pending
, program_counter
;
66 extern enum section current_section
;
67 extern char *sectname
[4];
68 extern char *strdup(), *float_label();
70 /*--------------------------------------------------------------------*/
72 /* target machine storage layout */
74 /* Define this if most significant bit is lowest numbered
75 in instructions that operate on numbered bit-fields.
76 Though 1750 actually counts bits in big-endian fashion, the sign bit
77 is still the most significant bit, which is leftmost. Therefore leaving
78 this little-endian. Adjust short before assembler output when needed:
79 e.g. in QImode, a GCC bit n is a 1750 bit (15-n). */
80 #define BITS_BIG_ENDIAN 0
82 /* Define this if most significant byte of a word is the lowest numbered. */
83 /* For 1750 we can decide arbitrarily
84 since there are no machine instructions for them. */
85 #define BYTES_BIG_ENDIAN 0
87 /* Define this if most significant word of a multiword value is lowest
90 #define WORDS_BIG_ENDIAN 1
92 /* number of bits in an addressable storage unit */
93 #define BITS_PER_UNIT 16
95 /* Width in bits of a "word", which is the contents of a machine register.
96 Note that this is not necessarily the width of data type `int';
97 if using 16-bit ints on a 68000, this would still be 32.
98 But on a machine with 16-bit registers, this would be 16. */
99 #define BITS_PER_WORD 16
101 /* Width of a word, in units (bytes). */
102 #define UNITS_PER_WORD 1
104 /* Width in bits of a pointer.
105 See also the macro `Pmode' defined below. */
106 #define POINTER_SIZE 16
108 #define PTRDIFF_TYPE "int"
110 /* Type to use for `size_t'. If undefined, uses `long unsigned int'. */
111 #define SIZE_TYPE "int"
114 #define TARGET_FLOAT_FORMAT UNKNOWN_FLOAT_FORMAT
117 /* Allocation boundary (in *bits*) for storing pointers in memory. */
118 #define POINTER_BOUNDARY 16
120 /* Allocation boundary (in *bits*) for storing arguments in argument list. */
121 /* 1750: should have had to make this 32 when BITS_PER_WORD is 32. */
122 #define PARM_BOUNDARY 16
124 /* Boundary (in *bits*) on which stack pointer should be aligned. */
125 #define STACK_BOUNDARY 16
127 /* Allocation boundary (in *bits*) for the code of a function. */
128 #define FUNCTION_BOUNDARY 16
130 /* Alignment of field after `int : 0' in a structure. */
131 #define EMPTY_FIELD_BOUNDARY 16
133 /* No data type wants to be aligned rounder than this. */
134 #define BIGGEST_ALIGNMENT 16
136 /* Define this to 1 if move instructions will actually fail to work
137 when given unaligned data. */
138 #define STRICT_ALIGNMENT 0
140 /* Define number of bits in most basic integer type.
141 (If undefined, default is BITS_PER_WORD).
142 #define INT_TYPE_SIZE 16 */
144 /* Define number of bits in short integer type.
145 (If undefined, default is half of BITS_PER_WORD). */
146 #define SHORT_TYPE_SIZE 16
148 /* Define number of bits in long integer type.
149 (If undefined, default is BITS_PER_WORD). */
150 #define LONG_TYPE_SIZE 32
152 /* Define number of bits in long long integer type.
153 (If undefined, default is twice BITS_PER_WORD). */
154 /* 1750 PRELIMINARY : no processor support for `long long', therefore
155 need to check out the long-long opencodings ! */
156 #define LONG_LONG_TYPE_SIZE 64
158 /* Define number of bits in char type.
159 (If undefined, default is one fourth of BITS_PER_WORD). */
160 #define CHAR_TYPE_SIZE 16
162 /* Define number of bits in float type.
163 (If undefined, default is BITS_PER_WORD). */
164 #define FLOAT_TYPE_SIZE 32
166 /* Define number of bits in double type.
167 (If undefined, default is twice BITS_PER_WORD). */
168 #define DOUBLE_TYPE_SIZE 48
170 /*****************************************************************************/
172 /* Standard register usage. */
174 /* Number of actual hardware registers.
175 The hardware registers are assigned numbers for the compiler
176 from 0 to just below FIRST_PSEUDO_REGISTER.
177 All registers that the compiler knows about must be given numbers,
178 even those that are not normally considered general registers. */
179 #define FIRST_PSEUDO_REGISTER 16
181 /* 1 for registers that have pervasive standard uses
182 and are not available for the register allocator.
183 R15 is the 1750A stack pointer. R14 is the frame pointer. */
185 #define FIXED_REGISTERS \
186 { 0, 0, 0, 0, 0, 0, 0, 0, \
187 0, 0, 0, 0, 0, 0, 1, 1 }
189 /* 1 for registers not available across function calls.
190 These must include the FIXED_REGISTERS and also any
191 registers that can be used without being saved.
192 The latter must include the registers where values are returned
193 and the register where structure-value addresses are passed.
194 Aside from that, you can include as many other registers as you like.
195 1750: return value in R0 foll. (depending on size of retval).
196 Should be possible to refine this (how many regs are actually used) */
198 #define CALL_USED_REGISTERS \
199 { 1, 1, 1, 1, 1, 1, 1, 1, \
200 1, 1, 1, 1, 1, 1, 1, 1 }
202 /* Return number of consecutive hard regs needed starting at reg REGNO
203 to hold something of mode MODE.
204 This is ordinarily the length in words of a value of mode MODE
205 but can be less for certain modes in special long registers.
206 All 1750 registers are one word long. */
207 #define HARD_REGNO_NREGS(REGNO, MODE) \
208 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
210 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
211 #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
213 /* Value is 1 if it is a good idea to tie two pseudo registers
214 when one has mode MODE1 and one has mode MODE2.
215 If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
216 for any hard reg, then this must be 0 for correct output. */
217 #define MODES_TIEABLE_P(MODE1, MODE2) 1
219 /* Specify the registers used for certain standard purposes.
220 The values of these macros are register numbers. */
222 /* 1750A pc isn't overloaded on a register. */
223 /* #define PC_REGNUM */
225 /* Register to use for pushing function arguments. */
226 #define STACK_POINTER_REGNUM 15
228 /* Base register for access to local variables of the function. */
229 #define FRAME_POINTER_REGNUM 14
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
237 /* Base register for access to arguments of the function. */
238 #define ARG_POINTER_REGNUM 14
240 /* Define this if successive args to a function occupy decreasing addresses
242 #define ARGS_GROW_DOWNWARD
245 /* Register in which static-chain is passed to a function. */
246 #define STATIC_CHAIN_REGNUM 13
248 /* Register in which address to store a structure value
249 is passed to a function. */
250 #define STRUCT_VALUE_REGNUM 12
252 /* Define this to be 1 if all structure return values must be in memory. */
253 #define DEFAUT_PCC_STRUCT_RETURN 0
255 /*****************************************************************************/
257 /* Define the classes of registers for register constraints in the
258 machine description. Also define ranges of constants.
260 One of the classes must always be named ALL_REGS and include all hard regs.
261 If there is more than one class, another class must be named NO_REGS
262 and contain no registers.
264 The name GENERAL_REGS must be the name of a class (or an alias for
265 another name such as ALL_REGS). This is the class of registers
266 that is allowed by "g" or "r" in a register constraint.
267 Also, registers outside this class are allocated only when
268 instructions express preferences for them.
270 The classes must be numbered in nondecreasing order; that is,
271 a larger-numbered class must never be contained completely
272 in a smaller-numbered class.
274 For any two classes, it is very desirable that there be another
275 class that represents their union. */
277 /* 1750 note: The names (BASE_REGS/INDEX_REGS) are used in their *gcc sense*
278 (i.e. *opposite* to the MIL-STD-1750A defined meanings). This means that
279 R1..R15 are called "base" regs and R12..R15 are "index" regs.
280 Index reg mode (in the gcc sense) is not yet implemented (these are the
281 1750 "Base with Index Reg" instructions, LBX etc. See 1750.md)
283 Here's an example to drive this point home: in "LBX B12,R5"
284 B12 shall be called the "index" reg and R5 shall be the "base" reg.
285 This naming inversion is due to the GCC defined capabilities of
286 "Base" vs. "Index" regs. */
288 enum reg_class
{ NO_REGS
, INDEX_REGS
, BASE_REGS
, ALL_REGS
, LIM_REG_CLASSES
};
290 #define N_REG_CLASSES (int) LIM_REG_CLASSES
292 /* Since GENERAL_REGS is the same class as ALL_REGS,
293 don't give it a different class number; just make it an alias. */
294 #define GENERAL_REGS ALL_REGS
296 /* Give names of register classes as strings for dump file. */
298 #define REG_CLASS_NAMES \
299 { "NO_REGS", "INDEX_REGS", "BASE_REGS", "ALL_REGS" }
301 /* Define which registers fit in which classes.
302 This is an initializer for a vector of HARD_REG_SET
303 of length N_REG_CLASSES.
304 1750 "index" (remember, in the *GCC* sense!) regs are R12 through R15.
305 The only 1750 register not usable as BASE_REG is R0. */
307 #define REG_CLASS_CONTENTS {0, 0xf000, 0xfffe, 0xffff}
309 /* The same information, inverted:
310 Return the class number of the smallest class containing
311 reg number REGNO. This could be a conditional expression
312 or could index an array. */
313 #define REGNO_REG_CLASS(REGNO) \
314 ((REGNO) >= 12 ? INDEX_REGS : (REGNO) > 0 ? BASE_REGS : ALL_REGS)
316 /* The class value for index registers, and the one for base regs. */
318 #define BASE_REG_CLASS BASE_REGS
319 #define INDEX_REG_CLASS INDEX_REGS
321 /* Get reg_class from a letter such as appears in the machine description.
322 For the 1750, we have 'b' for gcc Base regs and 'x' for gcc Index regs. */
324 #define REG_CLASS_FROM_LETTER(C) ((C) == 'b' ? BASE_REGS : \
325 (C) == 'x' ? INDEX_REGS : NO_REGS)
327 /* The letters I,J,K,.. to P in a register constraint string
328 can be used to stand for particular ranges of immediate operands.
329 This macro defines what the ranges are.
330 C is the letter, and VALUE is a constant value.
331 Return 1 if VALUE is in the range specified by C.
334 `I' is used for ISP mode instructions,
335 `J' is used for ISN mode instructions,
336 `K' is used for the STC instruction's constant range,
337 `L' is used for unsigned 8-bit address displacements in instructions
338 of addressing mode "Base Relative",
339 `M' is for IM mode instructions et al.,
340 `O' is a synonym for (const_int 0). */
342 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
343 ((C) == 'I' ? (VALUE) > 0 && (VALUE) <= 16 : \
344 (C) == 'J' ? (VALUE) < 0 && (VALUE) >= -16 : \
345 (C) == 'K' ? (VALUE) >= 0 && (VALUE) <= 15 : \
346 (C) == 'L' ? (VALUE) >= 0 && (VALUE) <= 0xFF : \
347 (C) == 'M' ? (VALUE) >= -0x8000 && (VALUE) <= 0x7FFF : \
348 (C) == 'O' ? (VALUE) == 0 : 0)
350 /* Similar, but for floating constants, and defining letter 'G'.
351 Here VALUE is the CONST_DOUBLE rtx itself. */
352 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
354 /* Given an rtx X being reloaded into a reg required to be
355 in class CLASS, return the class of reg to actually use.
356 In general this is just CLASS; but on some machines
357 in some cases it is preferable to use a more restrictive class.
358 For the 1750A, we force an immediate CONST_DOUBLE value to memory. */
359 #define PREFERRED_RELOAD_CLASS(X,CLASS) \
360 (GET_CODE(X) == CONST_DOUBLE ? NO_REGS : CLASS)
362 /* Return the maximum number of consecutive registers
363 needed to represent mode MODE in a register of class CLASS.
364 On the 1750A, this is the size of MODE in words,
365 since class doesn't make any difference. */
366 #define CLASS_MAX_NREGS(CLASS,MODE) GET_MODE_SIZE(MODE)
368 /*****************************************************************************/
370 /* Stack layout; function entry, exit and calling. */
372 /* Define this if pushing a word on the stack
373 makes the stack pointer a smaller address. */
374 #define STACK_GROWS_DOWNWARD 1
376 /* Define this if the nominal address of the stack frame
377 is at the high-address end of the local variables;
378 goes at a more negative offset in the frame.
379 #define FRAME_GROWS_DOWNWARD
382 /* Offset within stack frame to start allocating local variables at.
383 If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
384 first local allocated. Otherwise, it is the offset to the BEGINNING
385 of the first local allocated.
387 #define STARTING_FRAME_OFFSET 1
389 /* This is the default anyway:
390 #define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) FRAMEADDR
393 /* If we generate an insn to push BYTES bytes,
394 this says how many the stack pointer really advances by.
395 1750 note: what GCC calls a "byte" is really a 16-bit word,
396 because BITS_PER_UNIT is 16. */
398 #define PUSH_ROUNDING(BYTES) (BYTES)
400 /* Define this macro if functions should assume that stack space has
401 been allocated for arguments even when their values are passed in
403 Size, in bytes, of the area reserved for arguments passed in
404 registers for the function represented by FNDECL.
405 #define REG_PARM_STACK_SPACE(FNDECL) 14 */
407 /* Define this if it is the responsibility of the caller to allocate
408 the area reserved for arguments passed in registers.
409 #define OUTGOING_REG_PARM_STACK_SPACE */
411 /* Offset of first parameter from the argument pointer register value.
413 Parameters appear in reversed order on the frame (so when they are
414 popped, they come off in the normal left-to-right order.)
416 one word for the caller's (PC+1) (i.e. the return address)
417 plus total size of called function's "auto" variables
418 plus one word for the caller's frame pointer (i.e. the old FP) */
420 #define FIRST_PARM_OFFSET(FNDECL) \
421 (1 + get_frame_size() + 1)
423 /* Value is 1 if returning from a function call automatically
424 pops the arguments described by the number-of-args field in the call.
425 FUNDECL is the declaration node of the function (as a tree),
426 FUNTYPE is the data type of the function (as a tree),
427 or for a library call it is an identifier node for the subroutine name.
430 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
432 /* Define how to find the value returned by a function.
433 VALTYPE is the data type of the value (as a tree).
434 If the precise function being called is known, FUNC is its FUNCTION_DECL;
435 otherwise, FUNC is 0. */
437 #define FUNCTION_VALUE(VALTYPE, FUNC) \
438 gen_rtx(REG,TYPE_MODE(VALTYPE),0)
440 /* Define how to find the value returned by a library function
441 assuming the value has mode MODE. */
442 /* 1750 note: no libcalls yet */
444 #define LIBCALL_VALUE(MODE) printf("LIBCALL_VALUE called!\n"), \
447 /* 1 if N is a possible register number for a function value. */
449 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
451 /* 1 if the tree TYPE should be returned in memory instead of in regs.
452 #define RETURN_IN_MEMORY(TYPE) \
453 (int_size_in_bytes(TYPE) > 12)
456 /* Define this if PCC uses the nonreentrant convention for returning
457 structure and union values.
458 #define PCC_STATIC_STRUCT_RETURN */
460 /* 1 if N is a possible register number for function argument passing. */
462 #define FUNCTION_ARG_REGNO_P(N) ((N) < 12)
464 /*****************************************************************************/
466 /* Define a data type for recording info about an argument list
467 during the scan of that argument list. This data type should
468 hold all necessary information about the function itself
469 and about the args processed so far, enough to enable macros
470 such as FUNCTION_ARG to determine where the next arg should go.
472 For 1750A, this is a single integer, which is a number of words
473 of arguments scanned so far. */
475 #define CUMULATIVE_ARGS int
477 /* Initialize a variable CUM of type CUMULATIVE_ARGS
478 for a call to a function whose data type is FNTYPE.
479 For a library call, FNTYPE is 0.
481 For 1750A, the offset starts at 0. */
483 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) ((CUM) = 0)
485 /* Update the data in CUM to advance over an argument
486 of mode MODE and data type TYPE.
487 (TYPE is null for libcalls where that information may not be available.)
489 1750 note: "int_size_in_bytes()" returns a unit relative to
490 BITS_PER_UNIT, so in our case not bytes, but 16-bit words. */
492 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
493 ((CUM) += (MODE) == BLKmode ? int_size_in_bytes(TYPE) : GET_MODE_SIZE(MODE))
495 /* Define where to put the arguments to a function.
496 Value is zero to push the argument on the stack,
497 or a hard register in which to store the argument.
499 MODE is the argument's machine mode.
500 TYPE is the data type of the argument (as a tree).
501 This is null for libcalls where that information may
503 CUM is a variable of type CUMULATIVE_ARGS which gives info about
504 the preceding args and about the function being called.
505 NAMED is nonzero if this argument is a named parameter
506 (otherwise it is an extra parameter matching an ellipsis). */
508 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
509 (rtx) function_arg(CUM,MODE,TYPE,NAMED)
511 (! MUST_PASS_IN_STACK(MODE,TYPE) && \
513 ((MODE)==BLKmode ? int_size_in_bytes(TYPE) : GET_MODE_SIZE (MODE)) \
514 ? gen_rtx (REG, MODE, CUM) \
518 /* Define the following macro if function calls on the target machine
519 do not preserve any registers; in other words, if `CALL_USED_REGISTERS'
520 has 1 for all registers. This macro enables `-fcaller-saves' by
521 default. Eventually that option will be nabled by default on all
522 machines and both the option and this macro will be eliminated. */
524 #define DEFAULT_CALLER_SAVES
527 /* This macro generates the assembly code for function entry.
528 FILE is a stdio stream to output the code to.
529 SIZE is an int: how many units of temporary storage to allocate.
530 Refer to the array `regs_ever_live' to determine which registers
531 to save; `regs_ever_live[I]' is nonzero if register number I
532 is ever used in the function. This macro is responsible for
533 knowing which registers should not be saved even if used. */
536 #define FUNCTION_PROLOGUE(FILE, SIZE) { \
537 register int regno, none_used=1; \
538 extern char call_used_regs[]; \
539 fprintf(FILE, "; regs used in this function: "); \
540 for (regno = 0; regno < 15; regno++) \
541 if (regs_ever_live[regno]) { \
542 fprintf(FILE," %s",reg_names[regno]); \
546 fprintf(FILE," (none)"); \
547 fprintf(FILE,"\n"); \
549 fprintf(FILE,"\t%s\tr15,%d ; reserve local-variable space\n",\
550 (SIZE <= 16 ? "sisp" : "sim"),SIZE); \
551 fprintf(FILE,"\tpshm\tr14,r14 ; push old frame\n"); \
552 fprintf(FILE,"\tlr\tr14,r15 ; set new frame\n"); \
553 program_counter = 0; jmplbl_ndx = -1; \
556 /************* 1750: PROFILER HANDLING NOT YET DONE !!!!!!! *************/
557 /* Output assembler code to FILE to increment profiler label # LABELNO
558 for profiling a function entry. */
560 #define FUNCTION_PROFILER(FILE, LABELNO) \
561 fprintf (FILE, "; got into FUNCTION_PROFILER with label # %d\n", (LABELNO))
563 /* Output assembler code to FILE to initialize this source file's
564 basic block profiling info, if that has not already been done. */
565 #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \
566 fprintf (FILE, "; got into FUNCTION_BLOCK_PROFILER with label # %d\n",LABELNO)
568 /* Output assembler code to FILE to increment the entry-count for
569 the BLOCKNO'th basic block in this source file. */
570 #define BLOCK_PROFILER(FILE, BLOCKNO) \
571 fprintf (FILE, "; got into BLOCK_PROFILER with block # %d\n",BLOCKNO)
573 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
574 the stack pointer does not matter. The value is tested only in
575 functions that have frame pointers.
576 No definition is equivalent to always zero. */
578 #define EXIT_IGNORE_STACK 1
580 /* This macro generates the assembly code for function exit,
581 on machines that need it. If FUNCTION_EPILOGUE is not defined
582 then individual return instructions are generated for each
583 return statement. Args are same as for FUNCTION_PROLOGUE.
585 The function epilogue should not depend on the current stack pointer!
586 It should use the frame pointer only. This is mandatory because
587 of alloca; we also take advantage of it to omit stack adjustments
590 #define FUNCTION_EPILOGUE(FILE, SIZE) { \
591 fprintf(FILE,"\tlr\tr15,r14 ; set stack ptr to frame ptr\n"); \
592 fprintf(FILE,"\tpopm\tr14,r14 ; restore previous frame ptr\n"); \
594 fprintf(FILE,"\t%s\tr14,%d ; free up local-var space\n", \
595 (SIZE <= 16 ? "aisp" : "aim"),SIZE); \
596 fprintf(FILE,"\turs\tr15\n"); }
598 /* If the memory address ADDR is relative to the frame pointer,
599 correct it to be relative to the stack pointer instead.
600 This is for when we don't use a frame pointer.
601 ADDR should be a variable name. */
603 #define FIX_FRAME_POINTER_ADDRESS(ADDR,DEPTH) \
604 fprintf(stderr,"FIX_FRAME_POINTER_ADDRESS called, DEPTH=%d\n"), \
607 /* Store in the variable DEPTH the initial difference between the
608 frame pointer reg contents and the stack pointer reg contents,
609 as of the start of the function body. This depends on the layout
610 of the fixed parts of the stack frame and on how registers are saved.
612 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) DEPTH = 0
614 /* 1750: not needed 'cause we have INITIAL_FRAME_POINTER_OFFSET.
615 #define ELIMINABLE_REGS { \
616 { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
617 { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }, \
618 { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM } }
620 #define CAN_ELIMINATE(FROM, TO) 1
622 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) { OFFSET = 0; }
626 /* Output assembler code for a block containing the constant parts
627 of a trampoline, leaving space for the variable parts. */
629 #define TRAMPOLINE_TEMPLATE(FILE) fprintf(FILE,"TRAMPOLINE_TEMPLATE called\n")
631 /* Length in units of the trampoline for entering a nested function. */
633 #define TRAMPOLINE_SIZE 2
635 /* Emit RTL insns to initialize the variable parts of a trampoline.
636 FNADDR is an RTX for the address of the function's pure code.
637 CXT is an RTX for the static chain value for the function. */
639 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) printf("INITIALIZE_TRAMPO called\n")
641 emit_move_insn (gen_rtx (MEM, QImode, plus_constant (TRAMP, 1)), CXT); \
642 emit_move_insn (gen_rtx (MEM, QImode, plus_constant (TRAMP, 6)), FNADDR); \
646 /*****************************************************************************/
648 /* Addressing modes, and classification of registers for them. */
650 /* 1750 doesn't have a lot of auto-incr./decr. - just for the stack ptr. */
652 /* #define HAVE_POST_INCREMENT just for R15 (stack pointer) */
653 /* #define HAVE_POST_DECREMENT */
654 /* #define HAVE_PRE_DECREMENT just for R15 (stack pointer) */
655 /* #define HAVE_PRE_INCREMENT */
657 /* Macros to check register numbers against specific register classes. */
659 /* These assume that REGNO is a hard or pseudo reg number.
660 They give nonzero only if REGNO is a hard reg of the suitable class
661 or a pseudo reg currently allocated to a suitable hard reg.
662 Since they use reg_renumber, they are safe only once reg_renumber
663 has been allocated, which happens in local-alloc.c.
664 1750 note: The words BASE and INDEX are used in their GCC senses:
665 The "Index Registers", R12 through R15, can have an address displacement
666 int the range 0..255 words.
669 #define REGNO_OK_FOR_BASE_P(REGNO) \
670 ((REGNO) > 0 && (REGNO) <= 15 || \
671 reg_renumber[REGNO] > 0 && reg_renumber[REGNO] < 15)
672 #define REGNO_OK_FOR_INDEX_P(REGNO) \
673 ((REGNO) >= 12 && (REGNO) <= 15 || \
674 reg_renumber[REGNO] >= 12 && reg_renumber[REGNO] <= 15)
676 /* Now macros that check whether X is a register and also,
677 strictly, whether it is in a specified class.
679 /* 1 if X is an address register */
681 #define ADDRESS_REG_P(X) (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X)))
683 /* Maximum number of registers that can appear in a valid memory address. */
684 #define MAX_REGS_PER_ADDRESS 1
686 /* Recognize any constant value that is a valid address. */
688 #define CONSTANT_ADDRESS_P(X) CONSTANT_P(X)
690 /* Nonzero if the constant value X is a legitimate general operand.
691 It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
693 #define LEGITIMATE_CONSTANT_P(X) 1
695 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
696 and check its validity for a certain class.
697 We have two alternate definitions for each of them.
698 The usual definition accepts all pseudo regs; the other rejects
699 them unless they have been allocated suitable hard regs.
700 The symbol REG_OK_STRICT causes the latter definition to be used.
702 Most source files want to accept pseudo regs in the hope that
703 they will get allocated to the class that the insn wants them to be in.
704 Source files for reload pass need to be strict.
705 After reload, it makes no difference, since pseudo regs have
706 been eliminated by then. */
710 /* Nonzero if X is a hard reg that can be used as an index. */
711 #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
712 /* Nonzero if X is a hard reg that can be used as a base reg. */
713 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
717 /* Nonzero if X is a hard reg that can be used as an index
718 or if it is a pseudo reg. */
719 #define REG_OK_FOR_INDEX_P(X) (REGNO (X) >= 12)
720 /* Nonzero if X is a hard reg that can be used as a base reg
721 or if it is a pseudo reg. */
722 #define REG_OK_FOR_BASE_P(X) (REGNO (X) > 0)
727 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
728 that is a valid memory address for an instruction.
729 The MODE argument is the machine mode for the MEM expression
730 that wants to use this address.
731 The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS.
733 1750 note: Currently we don't implement address expressions that use
734 GCC "Index"-class regs. To be expanded to handle the 1750 "Base with Index"
735 instructions (see also MAX_REGS_PER_ADDRESS and others). */
737 #define GO_IF_BASED_ADDRESS(X, ADDR) { \
738 if ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P(X))) \
740 if (GET_CODE (X) == PLUS) \
741 { register rtx x0 = XEXP(X,0), x1 = XEXP(X,1); \
742 if ((REG_P(x0) && REG_OK_FOR_BASE_P(x0) && CONSTANT_ADDRESS_P(x1)) \
743 || (REG_P(x1) && REG_OK_FOR_BASE_P(x1) && CONSTANT_ADDRESS_P(x0))) \
746 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) { \
747 if (CONSTANT_ADDRESS_P(X)) goto ADDR; \
748 GO_IF_BASED_ADDRESS(X,ADDR) }
751 /* Try machine-dependent ways of modifying an illegitimate address
752 to be legitimate. If we find one, return the new, valid address.
753 This macro is used in only one place: `memory_address' in explow.c.
755 OLDX is the address as it was before break_out_memory_refs was called.
756 In some cases it is useful to look at this to decide what needs to be done.
758 MODE and WIN are passed so that this macro can use
759 GO_IF_LEGITIMATE_ADDRESS.
761 It is always safe for this macro to do nothing. It exists to recognize
762 opportunities to optimize the output. */
764 #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)
766 /* Go to LABEL if ADDR (a legitimate address expression)
767 has an effect that depends on the machine mode it is used for.
768 On the 68000, only predecrement and postincrement address depend thus
769 (the amount of decrement or increment being the length of the operand). */
770 /* 1750: not used. */
772 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
774 /*****************************************************************************/
776 /* Specify the machine mode that this machine uses
777 for the index in the tablejump instruction. */
778 #define CASE_VECTOR_MODE QImode
780 /* Define this if the tablejump instruction expects the table
781 to contain offsets from the address of the table.
782 Do not define this if the table should contain absolute addresses. */
783 /* #define CASE_VECTOR_PC_RELATIVE */
785 /* Specify the tree operation to be used to convert reals to integers. */
786 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
788 /* This is the kind of divide that is easiest to do in the general case. */
789 #define EASY_DIV_EXPR TRUNC_DIV_EXPR
791 /* Define this as 1 if `char' should by default be signed; else as 0. */
792 #define DEFAULT_SIGNED_CHAR 1
794 /* Max number of bytes we can move from memory to memory
795 in one reasonably fast instruction. */
796 /* (was: "1750: not counting the MOV instruction") */
799 /* Define this if zero-extension is slow (more than one real instruction). */
800 /* #define SLOW_ZERO_EXTEND */
802 /* Nonzero if access to memory by bytes is slow and undesirable. */
803 #define SLOW_BYTE_ACCESS 0
805 /* Define if shifts truncate the shift count
806 which implies one can omit a sign-extension or zero-extension
808 /* #define SHIFT_COUNT_TRUNCATED 1 */
810 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
811 is done just by pretending it is already truncated. */
812 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
814 /* We assume that the store-condition-codes instructions store 0 for false
815 and some other value for true. This is the value stored for true. */
817 #define STORE_FLAG_VALUE 1
819 /* When a prototype says `char' or `short', really pass an `int'.
820 1750: for now, `char' is 16 bits wide anyway.
821 #define PROMOTE_PROTOTYPES */
823 /* Specify the machine mode that pointers have.
824 After generation of rtl, the compiler makes no further distinction
825 between pointers and any other objects of this machine mode. */
828 /* A function address in a call instruction
829 is a 16-bit address (for indexing purposes) */
830 #define FUNCTION_MODE QImode
832 /* Compute the cost of computing a constant rtl expression RTX
833 whose rtx-code is CODE. The body of this macro is a portion
834 of a switch statement. If the code is computed here,
835 return it with a return statement. Otherwise, break from the switch. */
836 /* 1750 note: haven't paid attention to this yet. */
838 #define CONST_COSTS(RTX,CODE,OUTER_CODE) \
840 if (INTVAL(RTX) >= -16 && INTVAL(RTX) <= 16) return 1; \
848 #define ADDRESS_COST(ADDRESS) (memop_valid(ADDRESS) ? 3 : 1000)
850 /* Tell final.c how to eliminate redundant test instructions. */
852 /* Here we define machine-dependent flags and fields in cc_status
853 (see `conditions.h'). */
854 /* MIL-STD-1750: none -- just has the garden variety C,P,Z,N flags. */
856 /* Store in cc_status the expressions
857 that the condition codes will describe
858 after execution of an instruction whose pattern is EXP.
859 Do not alter them if the instruction would not alter the cc's.
860 1750: See file out-1750a.c for notice_update_cc(). */
862 #define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP)
864 /**********************************************/
865 /* Produce debugging info in the DWARF format
866 #define DWARF_DEBUGGING_INFO
869 /*****************************************************************************/
871 /* Control the assembler format that we output. */
873 /* Output at beginning of assembler file. */
875 #define ASM_FILE_START(FILE) { \
877 if ((p = (char *)strrchr(main_input_filename,'/')) != NULL ? 1 : \
878 (p = (char *)strrchr(main_input_filename,']')) != NULL) \
881 p = main_input_filename; \
883 if (p = (char *)strchr(name,'.')) \
885 fprintf(FILE,"\tname %s\n",name); \
886 fprintf(FILE,"\tnolist\n\tinclude \"ms1750.inc\"\n\tlist\n\n"); \
887 fprintf(FILE,"\tglobal\t__main\n\n"); }
889 /* Output at end of assembler file.
890 For 1750, we copy the data labels accrued in datalbl[] from the Constants
891 section (Konst) to the Writable-Data section (Static). */
893 #define ASM_FILE_END(FILE) \
895 if (datalbl_ndx >= 0) { \
897 fprintf(FILE,"\n\tstatic\ninit_srel\n"); \
898 for (i = 0; i <= datalbl_ndx; i++) { \
899 if (datalbl[i].name == NULL) \
901 fprintf(stderr, "asm_file_end internal datalbl err\n"); \
904 fprintf(FILE,"%s \tblock %d\n", \
905 datalbl[i].name,datalbl[i].size); \
906 cum_size += datalbl[i].size; \
908 fprintf(FILE,"\n\tinit\n"); \
909 fprintf(FILE,"\tlim\tr0,init_srel\n"); /* destin. */ \
910 fprintf(FILE,"\tlim\tr1,%d\n",cum_size); /* count */ \
911 fprintf(FILE,"\tlim\tr2,K%s\n",datalbl[0].name); /* source */ \
912 fprintf(FILE,"\tmov\tr0,r2\n"); \
913 fprintf(FILE,"\n\tnormal\n"); \
914 datalbl_ndx = -1; /* reset stuff */ \
915 for (i = 0; i < DATALBL_ARRSIZ; i++) \
916 datalbl[i].size = 0; \
918 fprintf(FILE,"\n\tend\n"); \
921 /* Output to assembler file text saying following lines
922 may contain character constants, extra white space, comments, etc. */
924 #define ASM_APP_ON "\n\tif 0\n; by ASM_APP_ON\n"
926 /* Output to assembler file text saying following lines
927 no longer contain unusual constructs. */
929 #define ASM_APP_OFF "\n\tendif\n"
932 #define EXTRA_SECTIONS in_readonly_data
934 #define EXTRA_SECTION_FUNCTIONS \
935 void const_section() \
937 fprintf(asm_out_file,"\tkonst\n"); \
938 current_section = Konst; \
940 check_section(sect) \
943 if (current_section != sect) { \
944 fprintf(asm_out_file,"\t%s\n",sectname[(int)sect]); \
945 current_section = sect; \
950 in_section = in_text; \
953 in_section = in_data; \
956 in_section = in_readonly_data; \
962 /* Function that switches to the read-only data section (optional) */
963 #define READONLY_DATA_SECTION const_section
965 /* Output before program init section */
966 #define INIT_SECTION_ASM_OP "\n\tinit ; init_section\n"
968 /* Output before program text section */
969 #define TEXT_SECTION_ASM_OP "\n\tnormal ; text_section\n"
971 /* Output before writable data.
972 1750 Note: This is actually read-only data. The copying from read-only
973 to writable memory is done elsewhere (in ASM_FILE_END.)
975 #define DATA_SECTION_ASM_OP "\n\tkonst ; data_section\n"
977 /* How to refer to registers in assembler output.
978 This sequence is indexed by compiler's hard-register-number (see above). */
980 #define REGISTER_NAMES \
981 { "0", "1", "2", "3", "4", "5", "6", "7", \
982 "8", "9","10","11","12","13","14","15" }
984 /* How to renumber registers for dbx and gdb. */
986 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
988 /****************** Assembler output formatting **********************/
990 #define ASM_IDENTIFY_GCC(FILE) fputs ("; gcc2_compiled:\n", FILE)
992 #define ASM_COMMENT_START ";"
994 #define ASM_OUTPUT_FUNNAM(FILE,NAME) \
995 fprintf(FILE,"%s\n",NAME)
997 #define ASM_OUTPUT_OPCODE(FILE,PTR) do { \
998 while (*(PTR) != '\0' && *(PTR) != ' ') { \
999 putc (*(PTR), FILE); \
1002 while (*(PTR) == ' ') \
1004 putc ('\t', FILE); \
1005 program_counter += 2; \
1008 #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \
1009 fprintf(FILE,"%s\n",NAME)
1011 /* This is how to output the definition of a user-level label named NAME,
1012 such as the label on a static function or variable NAME. */
1013 /* 1750 note: Labels are prefixed with a 'K'. This is because handling
1014 has been changed for labels to be output in the "Constants" section
1015 (named "Konst"), and special initialization code takes care of copying
1016 the Const-section data into the writable data section (named "Static").
1017 In the Static section we therefore have the true label names (i.e.
1018 not prefixed with 'K'). */
1020 #define ASM_OUTPUT_LABEL(FILE,NAME) \
1021 do { if (NAME[0] == '.') { \
1022 fprintf(stderr,"Oops! label %s can't begin with '.'\n",NAME); \
1026 check_section(Konst); \
1027 fprintf(FILE,"K%s\n",NAME); \
1028 datalbl[++datalbl_ndx].name = (char *)strdup (NAME); \
1029 label_pending = 1; \
1034 /* This is how to output a command to make the user-level label named NAME
1035 defined for reference from other files. */
1037 #define ASM_GLOBALIZE_LABEL(FILE,NAME) do { \
1038 fprintf (FILE, "\tglobal %s\t; export\n", NAME); \
1041 /* This is how to output a reference to a user-level label named NAME.
1042 `assemble_name' uses this. */
1044 #define ASM_OUTPUT_LABELREF(FILE,NAME) \
1045 fprintf (FILE, "%s", NAME)
1047 /* This is how to output an internal numbered label where
1048 PREFIX is the class of label and NUM is the number within the class. */
1050 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
1052 if (strcmp(PREFIX,"LC") == 0) { \
1053 label_pending = 1; \
1054 datalbl[++datalbl_ndx].name = (char *) malloc (9); \
1055 sprintf(datalbl[datalbl_ndx].name,"LC%d",NUM); \
1056 check_section(Konst); \
1057 fprintf(FILE,"K%s%d\n",PREFIX,NUM); \
1059 else if (find_jmplbl(NUM) < 0) { \
1060 jmplbl[++jmplbl_ndx].num = NUM; \
1061 jmplbl[jmplbl_ndx].pc = program_counter; \
1062 fprintf(FILE, "%s%d\n", PREFIX, NUM); \
1067 /* This is how to store into the string LABEL
1068 the symbol_ref name of an internal numbered label where
1069 PREFIX is the class of label and NUM is the number within the class.
1070 This is suitable for output with `assemble_name'. */
1072 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
1073 sprintf (LABEL, "%s%d", PREFIX, NUM)
1075 /* Output at the end of a jump table.
1076 1750: To be uncommented when we can put jump tables in Konst.
1077 #define ASM_OUTPUT_CASE_END(FILE,NUM,INSN) \
1078 fprintf (FILE, "\tnormal\t; case_end\n")
1081 /* Currently, it is not possible to put jump tables in section Konst.
1082 This is because there is a one-to-one relation between sections Konst
1083 and Static (i.e., all Konst data are copied to Static, and the order
1084 of data is the same between the two sections.) However, jump tables are
1085 not copied to Static, which destroys the equivalence between Konst and
1086 Static. When a more intelligent Konst-to-Static copying mechanism is
1087 implemented (i.e. one that excludes the copying of jumptables), then
1088 ASM_OUTPUT_CASE_END shall be defined, and JUMP_LABELS_IN_TEXT_SECTION
1089 shall be undefined. */
1091 #define JUMP_TABLES_IN_TEXT_SECTION 1
1093 /* This is how to output an assembler line defining a 1750A `float'
1096 #define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE) \
1098 if (label_pending) \
1099 label_pending = 0; \
1101 datalbl[++datalbl_ndx].name = float_label('D',VALUE); \
1102 sprintf (datalbl[datalbl_ndx].value, "%lf", (double) VALUE); \
1103 datalbl[datalbl_ndx].size = 2; \
1104 fprintf (FILE, "\tdataf\t%lf\n",VALUE); \
1107 /* This is how to output an assembler line defining a 1750A `double'
1110 #define ASM_OUTPUT_THREE_QUARTER_FLOAT(FILE,VALUE) \
1112 if (label_pending) \
1113 label_pending = 0; \
1115 datalbl[++datalbl_ndx].name = float_label('E',VALUE); \
1116 sprintf (datalbl[datalbl_ndx].value, "%lf", VALUE); \
1117 datalbl[datalbl_ndx].size = 3; \
1118 fprintf(FILE,"\tdataef\t%lf\n",VALUE); \
1121 /* This is how to output an assembler line defining a string constant. */
1123 #define ASM_OUTPUT_ASCII(FILE, PTR, LEN) do { \
1125 if (! label_pending) \
1126 fprintf(FILE,";in ASM_OUTPUT_ASCII without label_pending\n");\
1128 label_pending = 0; \
1129 datalbl[datalbl_ndx].size = LEN; \
1131 for (i = 0; i < LEN; i++) { \
1132 if ((i % 15) == 0) { \
1134 fprintf(FILE,"\n"); \
1135 fprintf(FILE,"\tdata\t"); \
1138 fprintf(FILE,","); \
1139 if (PTR[i] >= 32 && PTR[i] < 127) \
1140 fprintf(FILE,"'%c'",PTR[i]); \
1142 fprintf(FILE,"%d",PTR[i]); \
1144 fprintf(FILE,"\n"); \
1147 /* This is how to output an assembler line defining a `char', `short', or
1149 1750 NOTE: The reason why this macro also outputs `short' and `int'
1150 constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the
1151 usual 8.) This behavior is different from the usual, where
1152 ASM_OUTPUT_CHAR only outputs character constants. The name
1153 of this macro should perhaps be `ASM_OUTPUT_QUARTER_INT' or so.
1156 #define ASM_OUTPUT_CHAR(FILE,VALUE) do { \
1157 if (! label_pending) \
1158 fprintf(FILE,";in ASM_OUTPUT_CHAR without label_pending\n"); \
1160 label_pending = 0; \
1161 datalbl[datalbl_ndx].size = 1; \
1163 fprintf(FILE, "\tdata\t"); output_addr_const(FILE,VALUE); \
1164 fprintf(FILE, "\n"); } while (0)
1166 /* This is how to output an assembler line defining a `long int' constant.
1167 1750 NOTE: The reason why this macro outputs `long' instead of `short'
1168 constants is that for the 1750, BITS_PER_UNIT is 16 (as opposed to the
1169 usual 8.) The name of this macro should perhaps be `ASM_OUTPUT_HALF_INT'.
1172 #define ASM_OUTPUT_SHORT(FILE,VALUE) do { \
1173 if (! label_pending) \
1174 fprintf(FILE,";in ASM_OUTPUT_SHORT without label_pending\n");\
1176 label_pending = 0; \
1177 datalbl[datalbl_ndx].size = 2; \
1179 fprintf(FILE, "\tdatal\t%d\n",INTVAL(VALUE)); \
1182 /* This is how to output an assembler line for a numeric constant byte. */
1184 #define ASM_OUTPUT_BYTE(FILE,VALUE) ASM_OUTPUT_CHAR(FILE,VALUE)
1186 /* This is how to output an insn to push a register on the stack.
1187 It need not be very fast code. */
1189 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
1190 fprintf (FILE, "\tPSHM R%s,R%s\n", reg_names[REGNO])
1192 /* This is how to output an insn to pop a register from the stack.
1193 It need not be very fast code. */
1195 #define ASM_OUTPUT_REG_POP(FILE,REGNO) \
1196 fprintf (FILE, "\tPOPM R%s,R%s\n", reg_names[REGNO])
1198 /* This is how to output an element of a case-vector that is absolute. */
1200 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
1201 fprintf (FILE, "\tdata\tL%d ;addr_vec_elt\n", VALUE)
1203 /* This is how to output an element of a case-vector that is relative. */
1205 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
1206 fprintf (FILE, "\tdata\tL%d-L%d ;addr_diff_elt\n", VALUE,REL)
1208 /* This is how to output an assembler line
1209 that says to advance the location counter
1210 to a multiple of 2**LOG bytes. */
1212 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
1213 fprintf(FILE,"; in ASM_OUTPUT_ALIGN: pwr_of_2_bytcnt=%d\n",LOG)
1215 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
1216 fprintf(FILE,"; in ASM_OUTPUT_SKIP: size=%d\n",SIZE)
1218 /* This says how to output an assembler line
1219 to define a global common symbol. */
1221 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) do { \
1222 check_section(Static); \
1223 fprintf (FILE, "\tcommon %s,%d\n", NAME, SIZE); \
1226 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) do { \
1227 fprintf (FILE, "\tglobal %s\t; import\n", NAME); \
1230 /* This says how to output an assembler line
1231 to define a local common symbol. */
1233 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) do { \
1234 check_section (Static); \
1235 fprintf(FILE,"%s \tblock %d\t; local common\n",NAME,SIZE); \
1238 /* Store in OUTPUT a string (made with alloca) containing
1239 an assembler-name for a local static variable named NAME.
1240 LABELNO is an integer which is different for each call. */
1242 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
1243 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
1244 sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
1246 #define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME) do { \
1247 fprintf(FILE, "\tinit\n\t"); assemble_name(NAME); \
1248 fprintf(FILE," ;constructor"); } while (0)
1250 #define ASM_OUTPUT_DESTRUCTOR(FILE, NAME) do { \
1251 fprintf(FILE, "\tinit\n\t"); assemble_name(NAME); \
1252 fprintf(FILE," ;destructor"); } while (0)
1254 /* Define the parentheses used to group arithmetic operations
1255 in assembler code. */
1257 #define ASM_OPEN_PAREN "("
1258 #define ASM_CLOSE_PAREN ")"
1260 /* Define results of standard character escape sequences. */
1261 #define TARGET_BELL 007
1262 #define TARGET_BS 010
1263 #define TARGET_TAB 011
1264 #define TARGET_NEWLINE 012
1265 #define TARGET_VT 013
1266 #define TARGET_FF 014
1267 #define TARGET_CR 015
1270 /* Print operand X (an rtx) in assembler syntax to file FILE.
1271 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
1272 For `%' followed by punctuation, CODE is the punctuation and X is null.
1273 1750 note: there are three special CODE characters:
1274 'D', 'E': print a reference to a floating point constant (D=double,
1275 E=single precision) label name
1276 'F': print a label defining a floating-point constant value
1277 'J': print the absolute value of a negative INT_CONST
1278 (this is used in LISN/CISN/MISN/SISP and others) */
1280 /* 1750A: see file aux-output.c */
1281 #define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE,X,CODE)
1282 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE,ADDR)
This page took 0.099725 seconds and 6 git commands to generate.