1 /* Definitions of target machine for GNU compiler. System/370 version.
2 Copyright (C) 1989, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
3 Contributed by Jan Stein (jan@cd.chalmers.se).
4 Modified for C/370 MVS by Dave Pitts (dpitts@nyx.cs.du.edu)
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. */
23 #define TARGET_VERSION printf (" (370/MVS)");
25 /* Options for the preprocessor for this target machine. */
27 #define CPP_SPEC "-trigraphs"
29 /* Names to predefine in the preprocessor for this target machine. */
31 #define CPP_PREDEFINES "-DGCC -Dgcc -DMVS -Dmvs -Asystem(mvs) -Acpu(i370) -Amachine(i370)"
33 /* Run-time compilation parameters selecting different hardware subsets. */
35 extern int target_flags;
37 /* The sizes of the code and literals on the current page. */
39 extern int mvs_page_code, mvs_page_lit;
41 /* The current page number and the base page number for the function. */
43 extern int mvs_page_num, function_base_page;
45 /* True if a label has been emitted. */
47 extern int mvs_label_emitted;
49 /* The name of the current function. */
51 extern char *mvs_function_name;
53 /* The length of the function name malloc'd area. */
55 extern int mvs_function_name_length;
57 /* The amount of space used for outgoing arguments. */
59 extern int current_function_outgoing_args_size;
61 /* Compile using char instructions (mvc, nc, oc, xc). On 4341 use this since
62 these are more than twice as fast as load-op-store.
63 On 3090 don't use this since load-op-store is much faster. */
65 #define TARGET_CHAR_INSTRUCTIONS (target_flags & 1)
67 /* Default target switches */
69 #define TARGET_DEFAULT 1
71 /* Macro to define tables used to set the flags. This is a list in braces
72 of pairs in braces, each pair being { "NAME", VALUE }
73 where VALUE is the bits to set or minus the bits to clear.
74 An empty string NAME is used to identify the default VALUE. */
76 #define TARGET_SWITCHES \
77 { { "char-instructions", 1}, \
78 { "no-char-instructions", -1}, \
79 { "", TARGET_DEFAULT} }
81 /* To use IBM supplied macro function prologue and epilogue, define the
82 following to 1. Should only be needed if IBM changes the definition
83 of their prologue and epilogue. */
85 #define MACROPROLOGUE 0
86 #define MACROEPILOGUE 0
88 /* Target machine storage layout */
90 /* Define this if most significant bit is lowest numbered in instructions
91 that operate on numbered bit-fields. */
93 #define BITS_BIG_ENDIAN 1
95 /* Define this if most significant byte of a word is the lowest numbered. */
97 #define BYTES_BIG_ENDIAN 1
99 /* Define this if MS word of a multiword is the lowest numbered. */
101 #define WORDS_BIG_ENDIAN 1
103 /* Number of bits in an addressable storage unit. */
105 #define BITS_PER_UNIT 8
107 /* Width in bits of a "word", which is the contents of a machine register. */
109 #define BITS_PER_WORD 32
111 /* Width of a word, in units (bytes). */
113 #define UNITS_PER_WORD 4
115 /* Width in bits of a pointer. See also the macro `Pmode' defined below. */
117 #define POINTER_SIZE 32
119 /* Allocation boundary (in *bits*) for storing pointers in memory. */
121 #define POINTER_BOUNDARY 32
123 /* Allocation boundary (in *bits*) for storing arguments in argument list. */
125 #define PARM_BOUNDARY 32
127 /* Boundary (in *bits*) on which stack pointer should be aligned. */
129 #define STACK_BOUNDARY 32
131 /* Allocation boundary (in *bits*) for the code of a function. */
133 #define FUNCTION_BOUNDARY 32
135 /* There is no point aligning anything to a rounder boundary than this. */
137 #define BIGGEST_ALIGNMENT 64
139 /* Alignment of field after `int : 0' in a structure. */
141 #define EMPTY_FIELD_BOUNDARY 32
143 /* Define this if move instructions will actually fail to work when given
146 #define STRICT_ALIGNMENT 0
148 /* Define target floating point format. */
150 #define TARGET_FLOAT_FORMAT IBM_FLOAT_FORMAT
152 /* Define character mapping for cross-compiling. */
154 #define TARGET_EBCDIC 1
157 #define MAP_CHARACTER(c) ((char)(c))
159 #define MAP_CHARACTER(c) ((char)mvs_map_char (c))
162 /* Define maximum length of page minus page escape overhead. */
164 #define MAX_MVS_PAGE_LENGTH 4080
166 /* Define if special allocation order desired. */
168 #define REG_ALLOC_ORDER \
169 { 0, 1, 2, 3, 14, 15, 12, 10, 9, 8, 7, 6, 5, 4, 16, 17, 18, 19, 11, 13 }
171 /* Standard register usage. */
173 /* Number of actual hardware registers. The hardware registers are
174 assigned numbers for the compiler from 0 to just below
175 FIRST_PSEUDO_REGISTER.
176 All registers that the compiler knows about must be given numbers,
177 even those that are not normally considered general registers.
178 For the 370, we give the data registers numbers 0-15,
179 and the floating point registers numbers 16-19. */
181 #define FIRST_PSEUDO_REGISTER 20
183 /* Define base and page registers. */
185 #define BASE_REGISTER 3
186 #define PAGE_REGISTER 4
188 /* 1 for registers that have pervasive standard uses and are not available
189 for the register allocator. On the 370 under C/370, R13 is stack (DSA)
190 pointer, R12 is the TCA pointer, R3 is the base register, R4 is the page
191 origin table pointer and R11 is the arg pointer. */
193 #define FIXED_REGISTERS \
194 { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0 }
195 /*0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19*/
197 /* 1 for registers not available across function calls. These must include
198 the FIXED_REGISTERS and also any registers that can be used without being
200 The latter must include the registers where values are returned
201 and the register where structure-value addresses are passed.
202 NOTE: all floating registers are undefined across calls. */
204 #define CALL_USED_REGISTERS \
205 { 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
206 /*0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19*/
208 /* Return number of consecutive hard regs needed starting at reg REGNO
209 to hold something of mode MODE.
210 This is ordinarily the length in words of a value of mode MODE
211 but can be less for certain modes in special long registers. */
213 #define HARD_REGNO_NREGS(REGNO, MODE) \
214 ((REGNO) > 15 ? 1 : (GET_MODE_SIZE(MODE)+UNITS_PER_WORD-1) / UNITS_PER_WORD)
216 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
217 On the 370, the cpu registers can hold QI, HI, SI, SF and DF. The
218 even registers can hold DI. The floating point registers can hold
221 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
222 ((REGNO) < 16 ? ((REGNO) & 1) == 0 || (MODE) != DImode \
223 : (MODE) == SFmode || (MODE) == DFmode)
225 /* Value is 1 if it is a good idea to tie two pseudo registers when one has
226 mode MODE1 and one has mode MODE2.
227 If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
228 for any hard reg, then this must be 0 for correct output. */
230 #define MODES_TIEABLE_P(MODE1, MODE2) \
231 (((MODE1) == SFmode || (MODE1) == DFmode) \
232 == ((MODE2) == SFmode || (MODE2) == DFmode))
234 /* Mark external references. */
236 #define ENCODE_SECTION_INFO(decl) \
237 if (DECL_EXTERNAL (decl) && TREE_PUBLIC (decl)) \
238 SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
240 /* Specify the registers used for certain standard purposes.
241 The values of these macros are register numbers. */
243 /* 370 PC isn't overloaded on a register. */
245 /* #define PC_REGNUM */
247 /* Register to use for pushing function arguments. */
249 #define STACK_POINTER_REGNUM 13
251 /* Base register for access to local variables of the function. */
253 #define FRAME_POINTER_REGNUM 13
255 /* Value should be nonzero if functions must have frame pointers.
256 Zero means the frame pointer need not be set up (and parms may be
257 accessed via the stack pointer) in functions that seem suitable.
258 This is computed in `reload', in reload1.c. */
260 #define FRAME_POINTER_REQUIRED 1
262 /* Base register for access to arguments of the function. */
264 #define ARG_POINTER_REGNUM 11
266 /* Register in which static-chain is passed to a function. */
268 #define STATIC_CHAIN_REGNUM 10
270 /* Register in which address to store a structure value is passed to
273 #define STRUCT_VALUE_REGNUM 1
275 /* Define the classes of registers for register constraints in the
276 machine description. Also define ranges of constants.
278 One of the classes must always be named ALL_REGS and include all hard regs.
279 If there is more than one class, another class must be named NO_REGS
280 and contain no registers.
282 The name GENERAL_REGS must be the name of a class (or an alias for
283 another name such as ALL_REGS). This is the class of registers
284 that is allowed by "g" or "r" in a register constraint.
285 Also, registers outside this class are allocated only when
286 instructions express preferences for them.
288 The classes must be numbered in nondecreasing order; that is,
289 a larger-numbered class must never be contained completely
290 in a smaller-numbered class.
292 For any two classes, it is very desirable that there be another
293 class that represents their union. */
297 NO_REGS, ADDR_REGS, DATA_REGS,
298 FP_REGS, ALL_REGS, LIM_REG_CLASSES
301 #define GENERAL_REGS DATA_REGS
302 #define N_REG_CLASSES (int) LIM_REG_CLASSES
304 /* Give names of register classes as strings for dump file. */
306 #define REG_CLASS_NAMES \
307 { "NO_REGS", "ADDR_REGS", "DATA_REGS", "FP_REGS", "ALL_REGS" }
309 /* Define which registers fit in which classes. This is an initializer for
310 a vector of HARD_REG_SET of length N_REG_CLASSES. */
312 #define REG_CLASS_CONTENTS {0, 0x0fffe, 0x0ffff, 0xf0000, 0xfffff}
314 /* The same information, inverted:
315 Return the class number of the smallest class containing
316 reg number REGNO. This could be a conditional expression
317 or could index an array. */
319 #define REGNO_REG_CLASS(REGNO) \
320 ((REGNO) >= 16 ? FP_REGS : (REGNO) != 0 ? ADDR_REGS : DATA_REGS)
322 /* The class value for index registers, and the one for base regs. */
324 #define INDEX_REG_CLASS ADDR_REGS
325 #define BASE_REG_CLASS ADDR_REGS
327 /* Get reg_class from a letter such as appears in the machine description. */
329 #define REG_CLASS_FROM_LETTER(C) \
330 ((C) == 'a' ? ADDR_REGS : \
331 ((C) == 'd' ? DATA_REGS : \
332 ((C) == 'f' ? FP_REGS : NO_REGS)))
334 /* The letters I, J, K, L and M in a register constraint string can be used
335 to stand for particular ranges of immediate operands.
336 This macro defines what the ranges are.
337 C is the letter, and VALUE is a constant value.
338 Return 1 if VALUE is in the range specified by C. */
340 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
341 ((C) == 'I' ? (unsigned) (VALUE) < 256 : \
342 (C) == 'J' ? (unsigned) (VALUE) < 4096 : \
343 (C) == 'K' ? (VALUE) >= -32768 && (VALUE) < 32768 : 0)
345 /* Similar, but for floating constants, and defining letters G and H.
346 Here VALUE is the CONST_DOUBLE rtx itself. */
348 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 1
350 /* Given an rtx X being reloaded into a reg required to be in class CLASS,
351 return the class of reg to actually use. In general this is just CLASS;
352 but on some machines in some cases it is preferable to use a more
353 restrictive class. */
355 #define PREFERRED_RELOAD_CLASS(X, CLASS) \
356 (GET_CODE(X) == CONST_DOUBLE ? FP_REGS : \
357 GET_CODE(X) == CONST_INT ? DATA_REGS : \
358 GET_CODE(X) == LABEL_REF || \
359 GET_CODE(X) == SYMBOL_REF || \
360 GET_CODE(X) == CONST ? ADDR_REGS : (CLASS))
362 /* Return the maximum number of consecutive registers needed to represent
363 mode MODE in a register of class CLASS. */
365 #define CLASS_MAX_NREGS(CLASS, MODE) \
366 ((CLASS) == FP_REGS ? 1 : \
367 (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
369 /* Stack layout; function entry, exit and calling. */
371 /* Define this if pushing a word on the stack makes the stack pointer a
374 /* #define STACK_GROWS_DOWNWARD */
376 /* Define this if the nominal address of the stack frame is at the
377 high-address end of the local variables; that is, each additional local
378 variable allocated goes at a more negative offset in the frame. */
380 /* #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 \
388 (STACK_POINTER_OFFSET + current_function_outgoing_args_size)
390 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = STARTING_FRAME_OFFSET
392 /* If we generate an insn to push BYTES bytes, this says how many the stack
393 pointer really advances by. On the 370, we have no push instruction. */
395 /* #define PUSH_ROUNDING(BYTES) */
397 /* Accumulate the outgoing argument count so we can request the right
398 DSA size and determine stack offset. */
400 #define ACCUMULATE_OUTGOING_ARGS
402 /* Define offset from stack pointer, to location where a parm can be
405 #define STACK_POINTER_OFFSET 148
407 /* Offset of first parameter from the argument pointer register value. */
409 #define FIRST_PARM_OFFSET(FNDECL) 0
411 /* 1 if N is a possible register number for function argument passing.
412 On the 370, no registers are used in this way. */
414 #define FUNCTION_ARG_REGNO_P(N) 0
416 /* Define a data type for recording info about an argument list during
417 the scan of that argument list. This data type should hold all
418 necessary information about the function itself and about the args
419 processed so far, enough to enable macros such as FUNCTION_ARG to
420 determine where the next arg should go. */
422 #define CUMULATIVE_ARGS int
424 /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to
425 a function whose data type is FNTYPE.
426 For a library call, FNTYPE is 0. */
428 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) ((CUM) = 0)
430 /* Update the data in CUM to advance over an argument of mode MODE and
431 data type TYPE. (TYPE is null for libcalls where that information
432 may not be available.) */
434 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
435 ((CUM) += ((MODE) == DFmode || (MODE) == SFmode \
437 : (MODE) != BLKmode \
438 ? (GET_MODE_SIZE (MODE) + 3) / 4 \
439 : (int_size_in_bytes (TYPE) + 3) / 4))
441 /* Define where to put the arguments to a function. Value is zero to push
442 the argument on the stack, or a hard register in which to store the
445 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) 0
447 /* For an arg passed partly in registers and partly in memory, this is the
448 number of registers used. For args passed entirely in registers or
449 entirely in memory, zero. */
451 #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0
453 /* Define if returning from a function call automatically pops the
454 arguments described by the number-of-args field in the call. */
456 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
458 /* Define how to find the value returned by a function. VALTYPE is the
459 data type of the value (as a tree).
460 If the precise function being called is known, FUNC is its FUNCTION_DECL;
461 otherwise, FUNC is 15. */
463 #define RET_REG(MODE) ((MODE) == DFmode || (MODE) == SFmode ? 16 : 15)
465 /* On the 370 the return value is in R15 or R16. */
467 #define FUNCTION_VALUE(VALTYPE, FUNC) \
468 gen_rtx(REG, TYPE_MODE (VALTYPE), RET_REG(TYPE_MODE(VALTYPE)))
470 /* Define how to find the value returned by a library function assuming
471 the value has mode MODE. */
473 #define LIBCALL_VALUE(MODE) gen_rtx(REG, MODE, RET_REG(MODE))
475 /* 1 if N is a possible register number for a function value.
476 On the 370 under C/370, R15 and R16 are thus used. */
478 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 15 || (N) == 16)
480 /* This macro definition sets up a default value for `main' to return. */
482 #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
484 /* This macro generates the assembly code for function entry.
485 All of the C/370 environment is preserved. */
486 #define FUNCTION_PROLOGUE(FILE, LSIZE) i370_function_prolog ((FILE), (LSIZE));
488 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
490 if (strlen (NAME) * 2 > mvs_function_name_length) \
492 if (mvs_function_name) \
493 free (mvs_function_name); \
494 mvs_function_name = 0; \
496 if (!mvs_function_name) \
498 mvs_function_name_length = strlen (NAME) * 2; \
499 mvs_function_name = (char *) malloc (mvs_function_name_length); \
500 if (mvs_function_name == 0) \
502 fatal ("virtual memory exceeded"); \
506 if (!strcmp (NAME, "main")) \
507 strcpy (mvs_function_name, "gccmain"); \
509 strcpy (mvs_function_name, NAME); \
512 /* This macro generates the assembly code for function exit, on machines
513 that need it. If FUNCTION_EPILOGUE is not defined then individual
514 return instructions are generated for each return statement. Args are
515 same as for FUNCTION_PROLOGUE.
517 The function epilogue should not depend on the current stack pointer!
518 It should use the frame pointer only. This is mandatory because
519 of alloca; we also take advantage of it to omit stack adjustments
522 #if MACROEPILOGUE == 1
523 #define FUNCTION_EPILOGUE(FILE, LSIZE) \
526 check_label_emit(); \
527 mvs_check_page (FILE,14,0); \
528 fprintf (FILE, "\tEDCEPIL\n"); \
530 fprintf (FILE, "\tDS\t0F\n" ); \
531 fprintf (FILE, "\tLTORG\n"); \
532 fprintf (FILE, "\tDS\t0F\n"); \
533 fprintf (FILE, "PGT%d\tEQU\t*\n", function_base_page); \
535 for ( i = function_base_page; i < mvs_page_num; i++ ) \
536 fprintf (FILE, "\tDC\tA(PG%d)\n", i); \
538 #else /* MACROEPILOGUE != 1 */
539 #define FUNCTION_EPILOGUE(FILE, LSIZE) \
542 check_label_emit(); \
543 mvs_check_page (FILE,14,0); \
544 fprintf (FILE, "\tL\t13,4(,13)\n"); \
545 fprintf (FILE, "\tL\t14,12(,13)\n"); \
546 fprintf (FILE, "\tLM\t2,12,28(13)\n"); \
547 fprintf (FILE, "\tBALR\t1,14\n"); \
548 fprintf (FILE, "\tDC\tA("); \
550 assemble_name (FILE, mvs_function_name); \
551 fprintf (FILE, ")\n" ); \
552 fprintf (FILE, "\tDS\t0F\n" ); \
553 fprintf (FILE, "\tLTORG\n"); \
554 fprintf (FILE, "\tDS\t0F\n"); \
555 fprintf (FILE, "PGT%d\tEQU\t*\n", function_base_page); \
557 for ( i = function_base_page; i < mvs_page_num; i++ ) \
558 fprintf (FILE, "\tDC\tA(PG%d)\n", i); \
560 #endif /* MACROEPILOGUE */
563 /* Output assembler code for a block containing the constant parts of a
564 trampoline, leaving space for the variable parts.
566 On the 370, the trampoline contains these instructions:
570 L STATIC_CHAIN_REGISTER,X
576 #define TRAMPOLINE_TEMPLATE(FILE) \
578 ASM_OUTPUT_SHORT (FILE, GEN_INT (0x05E0)); \
579 ASM_OUTPUT_SHORT (FILE, GEN_INT (0x5800 | STATIC_CHAIN_REGNUM << 4)); \
580 ASM_OUTPUT_SHORT (FILE, GEN_INT (0xE00A)); \
581 ASM_OUTPUT_SHORT (FILE, GEN_INT (0x58F0)); \
582 ASM_OUTPUT_SHORT (FILE, GEN_INT (0xE00E)); \
583 ASM_OUTPUT_SHORT (FILE, GEN_INT (0x07FF)); \
584 ASM_OUTPUT_SHORT (FILE, const0_rtx); \
585 ASM_OUTPUT_SHORT (FILE, const0_rtx); \
586 ASM_OUTPUT_SHORT (FILE, const0_rtx); \
587 ASM_OUTPUT_SHORT (FILE, const0_rtx); \
590 /* Length in units of the trampoline for entering a nested function. */
592 #define TRAMPOLINE_SIZE 20
594 /* Emit RTL insns to initialize the variable parts of a trampoline. */
596 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
598 emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 12)), CXT); \
599 emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 16)), FNADDR); \
602 /* Output assembler code to FILE to increment profiler label # LABELNO
603 for profiling a function entry. */
605 #define FUNCTION_PROFILER(FILE, LABELNO) \
606 fprintf (FILE, "Error: No profiling available.\n")
608 /* Define EXIT_IGNORE_STACK if, when returning from a function, the stack
609 pointer does not matter (provided there is a frame pointer). */
611 #define EXIT_IGNORE_STACK 1
613 /* Addressing modes, and classification of registers for them. */
615 /* #define HAVE_POST_INCREMENT */
616 /* #define HAVE_POST_DECREMENT */
618 /* #define HAVE_PRE_DECREMENT */
619 /* #define HAVE_PRE_INCREMENT */
621 /* These assume that REGNO is a hard or pseudo reg number. They give
622 nonzero only if REGNO is a hard reg of the suitable class or a pseudo
623 reg currently allocated to a suitable hard reg.
624 These definitions are NOT overridden anywhere. */
626 #define REGNO_OK_FOR_INDEX_P(REGNO) \
627 (((REGNO) > 0 && (REGNO) < 16) \
628 || (reg_renumber[REGNO] > 0 && reg_renumber[REGNO] < 16))
630 #define REGNO_OK_FOR_BASE_P(REGNO) REGNO_OK_FOR_INDEX_P(REGNO)
632 #define REGNO_OK_FOR_DATA_P(REGNO) \
633 ((REGNO) < 16 || (unsigned) reg_renumber[REGNO] < 16)
635 #define REGNO_OK_FOR_FP_P(REGNO) \
636 ((unsigned) ((REGNO) - 16) < 4 || (unsigned) (reg_renumber[REGNO] - 16) < 4)
638 /* Now macros that check whether X is a register and also,
639 strictly, whether it is in a specified class. */
641 /* 1 if X is a data register. */
643 #define DATA_REG_P(X) (REG_P (X) && REGNO_OK_FOR_DATA_P (REGNO (X)))
645 /* 1 if X is an fp register. */
647 #define FP_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FP_P (REGNO (X)))
649 /* 1 if X is an address register. */
651 #define ADDRESS_REG_P(X) (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X)))
653 /* Maximum number of registers that can appear in a valid memory address. */
655 #define MAX_REGS_PER_ADDRESS 2
657 /* Recognize any constant value that is a valid address. */
659 #define CONSTANT_ADDRESS_P(X) \
660 (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
661 || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST_DOUBLE \
662 || (GET_CODE (X) == CONST \
663 && GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \
664 || (GET_CODE (X) == CONST \
665 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF \
666 && !SYMBOL_REF_FLAG (XEXP (XEXP (X, 0), 0))))
668 /* Nonzero if the constant value X is a legitimate general operand.
669 It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
671 #define LEGITIMATE_CONSTANT_P(X) 1
673 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check
674 its validity for a certain class. We have two alternate definitions
675 for each of them. The usual definition accepts all pseudo regs; the
676 other rejects them all. The symbol REG_OK_STRICT causes the latter
677 definition to be used.
679 Most source files want to accept pseudo regs in the hope that they will
680 get allocated to the class that the insn wants them to be in.
681 Some source files that are used after register allocation
682 need to be strict. */
684 #ifndef REG_OK_STRICT
686 /* Nonzero if X is a hard reg that can be used as an index or if it is
689 #define REG_OK_FOR_INDEX_P(X) \
690 ((REGNO(X) > 0 && REGNO(X) < 16) || REGNO(X) >= 20)
692 /* Nonzero if X is a hard reg that can be used as a base reg or if it is
695 #define REG_OK_FOR_BASE_P(X) REG_OK_FOR_INDEX_P(X)
697 #else /* REG_OK_STRICT */
699 /* Nonzero if X is a hard reg that can be used as an index. */
701 #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P(REGNO(X))
703 /* Nonzero if X is a hard reg that can be used as a base reg. */
705 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P(REGNO(X))
707 #endif /* REG_OK_STRICT */
709 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a
710 valid memory address for an instruction.
711 The MODE argument is the machine mode for the MEM expression
712 that wants to use this address.
714 The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS,
715 except for CONSTANT_ADDRESS_P which is actually machine-independent. */
717 #define COUNT_REGS(X, REGS, FAIL) \
718 if (REG_P (X) && REG_OK_FOR_BASE_P (X)) \
720 else if (GET_CODE (X) != CONST_INT || (unsigned) INTVAL (X) >= 4096) \
723 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
725 if (REG_P (X) && REG_OK_FOR_BASE_P (X)) \
727 if (GET_CODE (X) == PLUS) \
730 rtx x0 = XEXP (X, 0); \
731 rtx x1 = XEXP (X, 1); \
732 if (GET_CODE (x0) == PLUS) \
734 COUNT_REGS (XEXP (x0, 0), regs, FAIL); \
735 COUNT_REGS (XEXP (x0, 1), regs, FAIL); \
736 COUNT_REGS (x1, regs, FAIL); \
740 else if (GET_CODE (x1) == PLUS) \
742 COUNT_REGS (x0, regs, FAIL); \
743 COUNT_REGS (XEXP (x1, 0), regs, FAIL); \
744 COUNT_REGS (XEXP (x1, 1), regs, FAIL); \
750 COUNT_REGS (x0, regs, FAIL); \
751 COUNT_REGS (x1, regs, FAIL); \
759 /* The 370 has no mode dependent addresses. */
761 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
763 /* Try machine-dependent ways of modifying an illegitimate address
764 to be legitimate. If we find one, return the new, valid address.
765 This macro is used in only one place: `memory_address' in explow.c. */
767 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
769 if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 1))) \
770 (X) = gen_rtx (PLUS, SImode, XEXP (X, 0), \
771 copy_to_mode_reg (SImode, XEXP (X, 1))); \
772 if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 0))) \
773 (X) = gen_rtx (PLUS, SImode, XEXP (X, 1), \
774 copy_to_mode_reg (SImode, XEXP (X, 0))); \
775 if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == MULT) \
776 (X) = gen_rtx (PLUS, SImode, XEXP (X, 1), \
777 force_operand (XEXP (X, 0), 0)); \
778 if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == MULT) \
779 (X) = gen_rtx (PLUS, SImode, XEXP (X, 0), \
780 force_operand (XEXP (X, 1), 0)); \
781 if (memory_address_p (MODE, X)) \
785 /* Specify the machine mode that this machine uses for the index in the
786 tablejump instruction. */
788 #define CASE_VECTOR_MODE SImode
790 /* Define as C expression which evaluates to nonzero if the tablejump
791 instruction expects the table to contain offsets from the address of the
793 Do not define this if the table should contain absolute addresses. */
794 /* #define CASE_VECTOR_PC_RELATIVE 1 */
796 /* Specify the tree operation to be used to convert reals to integers. */
798 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
800 /* Define this if fixuns_trunc is the same as fix_trunc. */
802 #define FIXUNS_TRUNC_LIKE_FIX_TRUNC
804 /* We use "unsigned char" as default. */
806 #define DEFAULT_SIGNED_CHAR 0
808 /* This is the kind of divide that is easiest to do in the general case. */
810 #define EASY_DIV_EXPR TRUNC_DIV_EXPR
812 /* Max number of bytes we can move from memory to memory in one reasonably
817 /* Define this if zero-extension is slow (more than one real instruction). */
819 #define SLOW_ZERO_EXTEND
821 /* Nonzero if access to memory by bytes is slow and undesirable. */
823 #define SLOW_BYTE_ACCESS 1
825 /* Define if shifts truncate the shift count which implies one can omit
826 a sign-extension or zero-extension of a shift count. */
828 /* #define SHIFT_COUNT_TRUNCATED */
830 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
831 is done just by pretending it is already truncated. */
833 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) (OUTPREC != 16)
835 /* We assume that the store-condition-codes instructions store 0 for false
836 and some other value for true. This is the value stored for true. */
838 /* #define STORE_FLAG_VALUE -1 */
840 /* When a prototype says `char' or `short', really pass an `int'. */
842 #define PROMOTE_PROTOTYPES
844 /* Don't perform CSE on function addresses. */
846 #define NO_FUNCTION_CSE
848 /* Specify the machine mode that pointers have.
849 After generation of rtl, the compiler makes no further distinction
850 between pointers and any other objects of this machine mode. */
854 /* A function address in a call instruction is a byte address (for
855 indexing purposes) so give the MEM rtx a byte's mode. */
857 #define FUNCTION_MODE QImode
859 /* Compute the cost of computing a constant rtl expression RTX whose
860 rtx-code is CODE. The body of this macro is a portion of a switch
861 statement. If the code is computed here, return it with a return
862 statement. Otherwise, break from the switch. */
864 #define CONST_COSTS(RTX, CODE, OUTERCODE) \
866 if ((unsigned) INTVAL (RTX) < 0xfff) return 1; \
874 /* Tell final.c how to eliminate redundant test instructions. */
876 /* Here we define machine-dependent flags and fields in cc_status
877 (see `conditions.h'). */
879 /* Store in cc_status the expressions that the condition codes will
880 describe after execution of an instruction whose pattern is EXP.
881 Do not alter them if the instruction would not alter the cc's.
883 On the 370, load insns do not alter the cc's. However, in some
884 cases these instructions can make it possibly invalid to use the
885 saved cc's. In those cases we clear out some or all of the saved
886 cc's so they won't be used. */
888 #define NOTICE_UPDATE_CC(EXP, INSN) \
891 if (GET_CODE (exp) == PARALLEL) /* Check this */ \
892 exp = XVECEXP (exp, 0, 0); \
893 if (GET_CODE (exp) != SET) \
897 if (XEXP (exp, 0) == cc0_rtx) \
899 cc_status.value1 = XEXP (exp, 0); \
900 cc_status.value2 = XEXP (exp, 1); \
901 cc_status.flags = 0; \
905 if (cc_status.value1 \
906 && reg_mentioned_p (XEXP (exp, 0), cc_status.value1)) \
907 cc_status.value1 = 0; \
908 if (cc_status.value2 \
909 && reg_mentioned_p (XEXP (exp, 0), cc_status.value2)) \
910 cc_status.value2 = 0; \
911 switch (GET_CODE (XEXP (exp, 1))) \
913 case PLUS: case MINUS: case MULT: /* case UMULT: */ \
914 case DIV: case UDIV: case NEG: case ASHIFT: \
915 case ASHIFTRT: case AND: case IOR: case XOR: \
916 case ABS: case NOT: \
917 CC_STATUS_SET (XEXP (exp, 0), XEXP (exp, 1)); \
924 #define CC_STATUS_SET(V1, V2) \
926 cc_status.flags = 0; \
927 cc_status.value1 = (V1); \
928 cc_status.value2 = (V2); \
929 if (cc_status.value1 \
930 && reg_mentioned_p (cc_status.value1, cc_status.value2)) \
931 cc_status.value2 = 0; \
934 #define OUTPUT_JUMP(NORMAL, FLOAT, NO_OV) \
935 { if (cc_status.flags & CC_NO_OVERFLOW) return NO_OV; return NORMAL; }
937 /* Control the assembler format that we output. */
939 #define TEXT_SECTION_ASM_OP "* Program text area"
940 #define DATA_SECTION_ASM_OP "* Program data area"
941 #define INIT_SECTION_ASM_OP "* Program initialization area"
942 #define CTOR_LIST_BEGIN /* NO OP */
943 #define CTOR_LIST_END /* NO OP */
945 /* How to refer to registers in assembler output. This sequence is
946 indexed by compiler's hard-register-number (see above). */
948 #define REGISTER_NAMES \
949 { "0", "1", "2", "3", "4", "5", "6", "7", \
950 "8", "9", "10", "11", "12", "13", "14", "15", \
954 /* How to renumber registers for dbx and gdb. */
956 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
958 #define ASM_FILE_START(FILE) fputs ("\tCSECT\n", FILE);
959 #define ASM_FILE_END(FILE) fputs ("\tEND\n", FILE);
960 #define ASM_IDENTIFY_GCC(FILE)
961 #define ASM_COMMENT_START "*"
962 #define ASM_APP_OFF ""
963 #define ASM_APP_ON ""
965 #define ASM_OUTPUT_LABEL(FILE, NAME) \
966 { assemble_name (FILE, NAME); fputs ("\tEQU\t*\n", FILE); }
968 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) /* NO OP */
970 #define ASM_GLOBALIZE_LABEL(FILE, NAME) \
971 { fputs ("\tENTRY\t", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE); }
973 /* MVS externals are limited to 8 characters, upper case only.
974 The '_' is mapped to '@', except for MVS functions, then '#'. */
976 #define MAX_MVS_LABEL_SIZE 8
978 #define ASM_OUTPUT_LABELREF(FILE, NAME) \
980 char *bp, ch, temp[MAX_MVS_LABEL_SIZE + 1]; \
981 if (strlen (NAME) > MAX_MVS_LABEL_SIZE) \
983 strncpy (temp, NAME, MAX_MVS_LABEL_SIZE); \
984 temp[MAX_MVS_LABEL_SIZE] = '\0'; \
987 strcpy (temp,NAME); \
988 if (!strcmp (temp,"main")) \
989 strcpy (temp,"gccmain"); \
990 if (mvs_function_check (temp)) \
994 for (bp = temp; *bp; bp++) \
996 if (islower (*bp)) *bp = toupper (*bp); \
997 if (*bp == '_') *bp = ch; \
999 fprintf (FILE, "%s", temp); \
1002 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
1003 sprintf (LABEL, "*%s%d", PREFIX, NUM)
1005 /* Generate internal label. Since we can branch here from off page, we
1006 must reload the base register. */
1008 #define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \
1010 if (!strcmp (PREFIX,"L")) \
1012 mvs_add_label(NUM); \
1013 mvs_label_emitted = 1; \
1015 fprintf (FILE, "%s%d\tEQU\t*\n", PREFIX, NUM); \
1018 /* Generate case label. */
1020 #define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \
1021 fprintf (FILE, "%s%d\tEQU\t*\n", PREFIX, NUM)
1023 /* This is how to output an element of a case-vector that is absolute. */
1025 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
1026 mvs_check_page (FILE, 4, 0); \
1027 fprintf (FILE, "\tDC\tA(L%d)\n", VALUE)
1029 /* This is how to output an element of a case-vector that is relative. */
1031 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
1032 mvs_check_page (FILE, 4, 0); \
1033 fprintf (FILE, "\tDC\tA(L%d-L%d)\n", VALUE, REL)
1035 /* This is how to output an insn to push a register on the stack.
1036 It need not be very fast code. */
1038 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \
1039 mvs_check_page (FILE, 8, 4); \
1040 fprintf (FILE, "\tS\t13,=F'4'\n\tST\t%s,%d(13)\n", \
1041 reg_names[REGNO], STACK_POINTER_OFFSET)
1043 /* This is how to output an insn to pop a register from the stack.
1044 It need not be very fast code. */
1046 #define ASM_OUTPUT_REG_POP(FILE, REGNO) \
1047 mvs_check_page (FILE, 8, 0); \
1048 fprintf (FILE, "\tL\t%s,%d(13)\n\tLA\t13,4(13)\n", \
1049 reg_names[REGNO], STACK_POINTER_OFFSET)
1051 /* This is how to output an assembler line defining a `double' constant. */
1053 #define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
1054 fprintf (FILE, "\tDC\tD'%.18G'\n", (VALUE))
1056 /* This is how to output an assembler line defining a `float' constant. */
1058 #define ASM_OUTPUT_FLOAT(FILE, VALUE) \
1059 fprintf (FILE, "\tDC\tE'%.9G'\n", (VALUE))
1061 /* This outputs an integer, if not a CONST_INT must be address constant. */
1063 #define ASM_OUTPUT_INT(FILE, EXP) \
1065 if (GET_CODE (EXP) == CONST_INT) \
1067 fprintf (FILE, "\tDC\tF'"); \
1068 output_addr_const (FILE, EXP); \
1069 fprintf (FILE, "'\n"); \
1073 fprintf (FILE, "\tDC\tA("); \
1074 output_addr_const (FILE, EXP); \
1075 fprintf (FILE, ")\n"); \
1079 /* This outputs a short integer. */
1081 #define ASM_OUTPUT_SHORT(FILE, EXP) \
1083 fprintf (FILE, "\tDC\tX'%04X'\n", INTVAL(EXP) & 0xFFFF); \
1086 /* This outputs a byte sized integer. */
1088 #define ASM_OUTPUT_CHAR(FILE, EXP) \
1089 fprintf (FILE, "\tDC\tX'%02X'\n", INTVAL (EXP) )
1091 #define ASM_OUTPUT_BYTE(FILE, VALUE) \
1092 fprintf (FILE, "\tDC\tX'%02X'\n", VALUE)
1094 /* This outputs a text string. The string are chopped up to fit into
1095 an 80 byte record. Also, control and special characters, interpreted
1096 by the IBM assembler, are output numerically. */
1098 #define MVS_ASCII_TEXT_LENGTH 48
1100 #define ASM_OUTPUT_ASCII(FILE, PTR, LEN) \
1104 for (j = 0, i = 0; i < LEN; j++, i++) \
1107 if (iscntrl (c) || c == '&') \
1109 if (j % MVS_ASCII_TEXT_LENGTH != 0 ) \
1110 fprintf (FILE, "'\n"); \
1112 if (c == '&') c = MAP_CHARACTER (c); \
1113 fprintf (FILE, "\tDC\tX'%X'\n", c ); \
1117 if (j % MVS_ASCII_TEXT_LENGTH == 0) \
1118 fprintf (FILE, "\tDC\tC'"); \
1120 fprintf (FILE, "%c%c", c, c); \
1122 fprintf (FILE, "%c", c); \
1123 if (j % MVS_ASCII_TEXT_LENGTH == MVS_ASCII_TEXT_LENGTH - 1) \
1124 fprintf (FILE, "'\n" ); \
1127 if (j % MVS_ASCII_TEXT_LENGTH != 0) \
1128 fprintf (FILE, "'\n"); \
1131 /* This is how to output an assembler line that says to advance the
1132 location counter to a multiple of 2**LOG bytes. */
1134 #define ASM_OUTPUT_ALIGN(FILE, LOG) \
1138 fprintf (FILE, "\tDS\t0H\n" ); \
1140 fprintf (FILE, "\tDS\t0F\n" ); \
1143 /* The maximum length of memory that the IBM assembler will allow in one
1146 #define MAX_CHUNK 32767
1148 /* A C statement to output to the stdio stream FILE an assembler
1149 instruction to advance the location counter by SIZE bytes. Those
1150 bytes should be zero when loaded. */
1152 #define ASM_OUTPUT_SKIP(FILE, SIZE) \
1155 for (s = (SIZE); s > 0; s -= MAX_CHUNK) \
1157 if (s > MAX_CHUNK) \
1161 fprintf (FILE, "\tDS\tXL%d\n", k); \
1165 /* A C statement (sans semicolon) to output to the stdio stream
1166 FILE the assembler definition of a common-label named NAME whose
1167 size is SIZE bytes. The variable ROUNDED is the size rounded up
1168 to whatever alignment the caller wants. */
1170 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
1172 fputs ("\tENTRY\t", FILE); \
1173 assemble_name (FILE, NAME); \
1174 fputs ("\n", FILE); \
1175 fprintf (FILE, "\tDS\t0F\n"); \
1176 ASM_OUTPUT_LABEL (FILE,NAME); \
1177 ASM_OUTPUT_SKIP (FILE,SIZE); \
1180 /* A C statement (sans semicolon) to output to the stdio stream
1181 FILE the assembler definition of a local-common-label named NAME
1182 whose size is SIZE bytes. The variable ROUNDED is the size
1183 rounded up to whatever alignment the caller wants. */
1185 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
1187 fprintf (FILE, "\tDS\t0F\n"); \
1188 ASM_OUTPUT_LABEL (FILE,NAME); \
1189 ASM_OUTPUT_SKIP (FILE,SIZE); \
1192 /* Store in OUTPUT a string (made with alloca) containing an
1193 assembler-name for a local static variable named NAME.
1194 LABELNO is an integer which is different for each call. */
1196 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
1198 (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10); \
1199 sprintf ((OUTPUT), "%s%d", (NAME), (LABELNO)); \
1202 /* Define the parentheses used to group arithmetic operations
1203 in assembler code. */
1205 #define ASM_OPEN_PAREN "("
1206 #define ASM_CLOSE_PAREN ")"
1208 /* Define results of standard character escape sequences. */
1210 #define TARGET_BELL 47
1211 #define TARGET_BS 22
1212 #define TARGET_TAB 5
1213 #define TARGET_NEWLINE 21
1214 #define TARGET_VT 11
1215 #define TARGET_FF 12
1216 #define TARGET_CR 13
1218 /* Print operand X (an rtx) in assembler syntax to file FILE.
1219 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
1220 For `%' followed by punctuation, CODE is the punctuation and X is null. */
1222 #define PRINT_OPERAND(FILE, X, CODE) \
1224 switch (GET_CODE (X)) \
1226 static char curreg[4]; \
1229 strcpy (curreg, reg_names[REGNO (X) + 1]); \
1231 strcpy (curreg, reg_names[REGNO (X)]); \
1232 fprintf (FILE, "%s", curreg); \
1236 rtx addr = XEXP (X, 0); \
1239 if (GET_CODE (addr) == PLUS) \
1240 fprintf (FILE, "%d", INTVAL (XEXP (addr, 1))); \
1242 fprintf (FILE, "0"); \
1244 else if (CODE == 'R') \
1246 if (GET_CODE (addr) == PLUS) \
1247 fprintf (FILE, "%s", reg_names[REGNO (XEXP (addr, 0))]);\
1249 fprintf (FILE, "%s", reg_names[REGNO (addr)]); \
1252 output_address (XEXP (X, 0)); \
1257 mvs_page_lit += 4; \
1258 if (SYMBOL_REF_FLAG (X)) fprintf (FILE, "=V("); \
1259 else fprintf (FILE, "=A("); \
1260 output_addr_const (FILE, X); \
1261 fprintf (FILE, ")"); \
1265 fprintf (FILE, "%d", INTVAL (X) & 0xff); \
1266 else if (CODE == 'X') \
1267 fprintf (FILE, "%02X", INTVAL (X) & 0xff); \
1268 else if (CODE == 'h') \
1269 fprintf (FILE, "%d", (INTVAL (X) << 16) >> 16); \
1270 else if (CODE == 'H') \
1272 mvs_page_lit += 2; \
1273 fprintf (FILE, "=H'%d'", (INTVAL (X) << 16) >> 16); \
1277 mvs_page_lit += 4; \
1278 fprintf (FILE, "=F'%d'", INTVAL (X)); \
1281 case CONST_DOUBLE: \
1282 if (GET_MODE (X) == DImode) \
1286 mvs_page_lit += 4; \
1287 fprintf (FILE, "=XL4'%08X'", CONST_DOUBLE_LOW (X)); \
1289 else if (CODE == 'L') \
1291 mvs_page_lit += 4; \
1292 fprintf (FILE, "=XL4'%08X'", CONST_DOUBLE_HIGH (X)); \
1296 mvs_page_lit += 8; \
1297 fprintf (FILE, "=XL8'%08X%08X'", CONST_DOUBLE_LOW (X), \
1298 CONST_DOUBLE_HIGH (X)); \
1303 union { double d; int i[2]; } u; \
1304 u.i[0] = CONST_DOUBLE_LOW (X); \
1305 u.i[1] = CONST_DOUBLE_HIGH (X); \
1306 if (GET_MODE (X) == SFmode) \
1308 mvs_page_lit += 4; \
1309 fprintf (FILE, "=E'%.9G'", u.d); \
1313 mvs_page_lit += 8; \
1314 fprintf (FILE, "=D'%.18G'", u.d); \
1319 if (GET_CODE (XEXP (X, 0)) == PLUS \
1320 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
1322 mvs_page_lit += 4; \
1323 if (SYMBOL_REF_FLAG (XEXP (XEXP (X, 0), 0))) \
1325 fprintf (FILE, "=V("); \
1326 ASM_OUTPUT_LABELREF (FILE, \
1327 XSTR (XEXP (XEXP (X, 0), 0), 0)); \
1328 fprintf (FILE, ")\n\tA\t%s,=F'%d'", curreg, \
1329 INTVAL (XEXP (XEXP (X, 0), 1))); \
1333 fprintf (FILE, "=A("); \
1334 output_addr_const (FILE, X); \
1335 fprintf (FILE, ")"); \
1340 mvs_page_lit += 4; \
1341 fprintf (FILE, "=F'"); \
1342 output_addr_const (FILE, X); \
1343 fprintf (FILE, "'"); \
1351 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
1353 rtx breg, xreg, offset, plus; \
1355 switch (GET_CODE (ADDR)) \
1358 fprintf (FILE, "0(%s)", reg_names[REGNO (ADDR)]); \
1364 if (GET_CODE (XEXP (ADDR, 0)) == PLUS) \
1366 if (GET_CODE (XEXP (ADDR, 1)) == REG) \
1367 breg = XEXP (ADDR, 1); \
1369 offset = XEXP (ADDR, 1); \
1370 plus = XEXP (ADDR, 0); \
1374 if (GET_CODE (XEXP (ADDR, 0)) == REG) \
1375 breg = XEXP (ADDR, 0); \
1377 offset = XEXP (ADDR, 0); \
1378 plus = XEXP (ADDR, 1); \
1380 if (GET_CODE (plus) == PLUS) \
1382 if (GET_CODE (XEXP (plus, 0)) == REG) \
1385 xreg = XEXP (plus, 0); \
1387 breg = XEXP (plus, 0); \
1391 offset = XEXP (plus, 0); \
1393 if (GET_CODE (XEXP (plus, 1)) == REG) \
1396 xreg = XEXP (plus, 1); \
1398 breg = XEXP (plus, 1); \
1402 offset = XEXP (plus, 1); \
1405 else if (GET_CODE (plus) == REG) \
1418 if (GET_CODE (offset) == LABEL_REF) \
1419 fprintf (FILE, "L%d", \
1420 CODE_LABEL_NUMBER (XEXP (offset, 0))); \
1422 output_addr_const (FILE, offset); \
1425 fprintf (FILE, "0"); \
1427 fprintf (FILE, "(%s,%s)", \
1428 reg_names[REGNO (xreg)], reg_names[REGNO (breg)]); \
1430 fprintf (FILE, "(%s)", reg_names[REGNO (breg)]); \
1433 mvs_page_lit += 4; \
1434 if (SYMBOL_REF_FLAG (ADDR)) fprintf (FILE, "=V("); \
1435 else fprintf (FILE, "=A("); \
1436 output_addr_const (FILE, ADDR); \
1437 fprintf (FILE, ")"); \