Annotation of gcc/config/clipper/clipper.h, revision 1.1.1.3

1.1       root        1: /* Definitions of target machine for GNU compiler.  Clipper version.
1.1.1.3 ! root        2:    Copyright (C) 1987, 1988, 1991, 1993, 1994 Free Software Foundation, Inc.
1.1       root        3:    Contributed by Holger Teutsch ([email protected])
                      4: 
                      5: This file is part of GNU CC.
                      6: 
                      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 2, or (at your option)
                     10: any later version.
                     11: 
                     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.
                     16: 
                     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.  */
                     20: 
                     21: extern struct rtx_def *clipper_builtin_saveregs ();
                     22: extern int clipper_frame_size ();
                     23: 
                     24: /* Print subsidiary information on the compiler version in use.  */
                     25: 
                     26: #define TARGET_VERSION fprintf (stderr, " (clipper)");
                     27: 
                     28: /* Run-time compilation parameters selecting different hardware subsets.  */
                     29: 
                     30: extern int target_flags;
                     31: 
                     32: /* Macros used in the machine description to test the flags.  */
                     33: 
                     34: /* Macro to define tables used to set the flags.
                     35:    This is a list in braces of pairs in braces,
                     36:    each pair being { "NAME", VALUE }
                     37:    where VALUE is the bits to set or minus the bits to clear.
                     38:    An empty string NAME is used to identify the default VALUE.  */
                     39: 
1.1.1.2   root       40: #define TARGET_SWITCHES                \
                     41:   { { "c400", 1 },             \
                     42:     { "c300", -1 },            \
                     43:     { "", TARGET_DEFAULT} }
                     44: 
                     45: #define TARGET_C400 1
                     46: #define TARGET_C300 0
1.1       root       47: 
                     48: /* Default target_flags if no switches specified.  */
                     49: 
                     50: #ifndef TARGET_DEFAULT
1.1.1.2   root       51: #define TARGET_DEFAULT TARGET_C300
1.1       root       52: #endif
                     53: 
1.1.1.3 ! root       54: /* Show that we can debug generated code without a frame pointer.  */
        !            55: #define CAN_DEBUG_WITHOUT_FP
1.1       root       56: 
                     57: /* Target machine storage layout */
                     58: 
                     59: /* Define this if most significant bit is lowest numbered
                     60:    in instructions that operate on numbered bit-fields. */
                     61: 
                     62: #define BITS_BIG_ENDIAN 0
                     63: 
                     64: /* Define this if most significant byte of a word is the lowest numbered.  */
                     65: 
                     66: #define BYTES_BIG_ENDIAN 0
                     67: 
                     68: /* Define this if most significant word of a multiword number is the lowest
                     69:    numbered.  */
                     70: 
                     71: #define WORDS_BIG_ENDIAN 0
                     72: 
                     73: /* Number of bits in an addressable storage unit */
                     74: #define BITS_PER_UNIT 8
                     75: 
                     76: /* Width in bits of a "word", which is the contents of a machine register.
                     77:    Note that this is not necessarily the width of data type `int';
                     78:    if using 16-bit ints on a 68000, this would still be 32.
                     79:    But on a machine with 16-bit registers, this would be 16.  */
                     80: #define BITS_PER_WORD 32
                     81: 
                     82: /* Width of a word, in units (bytes).  */
                     83: #define UNITS_PER_WORD 4
                     84: 
                     85: /* Width in bits of a pointer.
                     86:    See also the macro `Pmode' defined below.  */
                     87: #define POINTER_SIZE 32
                     88: 
                     89: /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
                     90: #define PARM_BOUNDARY 32
                     91: 
                     92: /* Largest alignment for stack parameters (if greater than PARM_BOUNDARY).  */
                     93: #define MAX_PARM_BOUNDARY 64
                     94: 
                     95: /* Allocation boundary (in *bits*) for the code of a function.  */
                     96: #define FUNCTION_BOUNDARY 128
                     97: 
                     98: /* Alignment of field after `int : 0' in a structure.  */
                     99: #define EMPTY_FIELD_BOUNDARY 32
                    100: 
                    101: /* Every structure's size must be a multiple of this.  */
                    102: #define STRUCTURE_SIZE_BOUNDARY 8
                    103: 
                    104: /* A bitfield declared as `int' forces `int' alignment for the struct.  */
                    105: #define PCC_BITFIELD_TYPE_MATTERS 1
                    106: 
                    107: /* No data type wants to be aligned rounder than this.  */
                    108: #define BIGGEST_ALIGNMENT 64
                    109: 
                    110: /* No structure field wants to be aligned rounder than this.  */
                    111: #define BIGGEST_FIELD_ALIGNMENT 64
                    112: 
                    113: /*  Make strcpy of constants fast. */
                    114: #define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \
                    115:   ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN))
                    116: 
                    117: /* Make arrays of chars word-aligned for the same reasons.  */
                    118: #define DATA_ALIGNMENT(TYPE, ALIGN)            \
                    119:   (TREE_CODE (TYPE) == ARRAY_TYPE              \
                    120:    && TYPE_MODE (TREE_TYPE (TYPE)) == QImode   \
                    121:    && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
                    122: 
                    123: /* Set this nonzero if move instructions will actually fail to work
                    124:    when given unaligned data.  */
                    125: #define STRICT_ALIGNMENT 1
                    126: 
                    127: /* Let's keep the stack somewhat aligned.  */
                    128: #define STACK_BOUNDARY 64
                    129: 
                    130: /* Define this macro if it is advisible to hold scalars in registers
                    131:    in a wider mode than that declared by the program.  In such cases, 
                    132:    the value is constrained to be within the bounds of the declared
                    133:    type, but kept valid in the wider mode.  The signedness of the
                    134:    extension may differ from that of the type.
                    135: 
                    136:    For Clipper, we always store objects in a full register. */
                    137: 
                    138: #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)  \
                    139:   if (GET_MODE_CLASS (MODE) == MODE_INT                \
                    140:       && GET_MODE_SIZE (MODE) < UNITS_PER_WORD)        \
                    141:     {                                          \
                    142:       (UNSIGNEDP) = 0;                         \
                    143:       (MODE) = SImode;                         \
                    144:     }
                    145: 
                    146: 
                    147: /* Define this if function arguments should also be promoted using the above
                    148:    procedure.  */
                    149: 
                    150: /* FIXME: do we loose compatibility to acc if we define this? */
                    151: 
                    152: /* #define PROMOTE_FUNCTION_ARGS */
                    153: 
                    154: /* Likewise, if the function return value is promoted.  */
                    155: 
                    156: /* #define PROMOTE_FUNCTION_RETURN */
                    157: 
                    158: 
                    159: /* Standard register usage.  */
                    160: 
                    161: /* Number of actual hardware registers.
                    162:    The hardware registers are assigned numbers for the compiler
                    163:    from 0 to just below FIRST_PSEUDO_REGISTER.
                    164:    All registers that the compiler knows about must be given numbers,
                    165:    even those that are not normally considered general registers.  */
                    166: #define FIRST_PSEUDO_REGISTER 32
                    167: 
                    168: /* 1 for registers that have pervasive standard uses
                    169:    and are not available for the register allocator.
                    170:    On the clipper, these are the FP and SP .  */
                    171: #define FIXED_REGISTERS \
                    172: {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,\
1.1.1.2   root      173:  0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1} /* Default: C300 */
1.1       root      174: 
                    175: /* 1 for registers not available across function calls.
                    176:    These must include the FIXED_REGISTERS and also any
                    177:    registers that can be used without being saved.
                    178:    The latter must include the registers where values are returned
                    179:    and the register where structure-value addresses are passed.
                    180:    Aside from that, you can include as many other registers as you like.  */
                    181: #define CALL_USED_REGISTERS \
                    182: {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,\
1.1.1.2   root      183:  1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1} /* default: C300 */
                    184: 
                    185: /* Zero or more C statements that may conditionally modify two
                    186:    variables `fixed_regs' and `call_used_regs' (both of type `char
                    187:    []') after they have been initialized from the two preceding
                    188:    macros. A C400 has additional floating registers f8 -> f15 */
                    189: 
                    190: #define CONDITIONAL_REGISTER_USAGE     \
                    191:    if (target_flags & TARGET_C400)     \
                    192:      { int i;                          \
                    193:        for (i = 24; i < 32; i++) fixed_regs[i] = call_used_regs[i] = 0; }
1.1       root      194: 
                    195: /* Return number of consecutive hard regs needed starting at reg REGNO
                    196:    to hold something of mode MODE.
                    197:    This is ordinarily the length in words of a value of mode MODE
                    198:    but can be less for certain modes in special long registers.
                    199:    On the clipper, fp registers are 64 bits.  */
                    200: 
                    201: #define HARD_REGNO_NREGS(REGNO, MODE)   \
                    202:   ((REGNO) >= 16 ? 1 \
                    203:    : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
                    204: 
                    205: /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
1.1.1.2   root      206:    On the clipper 0-15 may hold any mode but DImode and DFmode must be even.
                    207:    Registers 16-31 hold SFmode and DFmode */
1.1       root      208: 
1.1.1.2   root      209: #define HARD_REGNO_MODE_OK(REGNO, MODE)                                        \
                    210:   ((REGNO) < 16                                                        \
                    211:    ? ((MODE) != DImode && (MODE) != DFmode || ((REGNO) & 1) == 0)      \
                    212:    : ((MODE) == SFmode || (MODE) == DFmode))
1.1       root      213: 
                    214: /* Value is 1 if it is a good idea to tie two pseudo registers
                    215:    when one has mode MODE1 and one has mode MODE2.
                    216:    If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
                    217:    for any hard reg, then this must be 0 for correct output.  */
                    218: #define MODES_TIEABLE_P(MODE1, MODE2)  ((MODE1) == (MODE2))
                    219: 
                    220: /* Specify the registers used for certain standard purposes.
                    221:    The values of these macros are register numbers.  */
                    222: 
                    223: /* clipper has extra PC  */
                    224: /* #define PC_REGNUM */
                    225: 
                    226: /* Register to use for pushing function arguments.  */
                    227: #define STACK_POINTER_REGNUM 15
                    228: 
                    229: /* Base register for access to local variables of the function.  */
                    230: #define FRAME_POINTER_REGNUM 14
                    231: 
                    232: /* Value should be nonzero if functions must have frame pointers.
                    233:    Zero means the frame pointer need not be set up (and parms
                    234:    may be accessed via the stack pointer) in functions that seem suitable.
                    235:    This is computed in `reload', in reload1.c.  */
                    236: #define FRAME_POINTER_REQUIRED \
                    237:    (! leaf_function_p ())
                    238: 
                    239: /* Base register for access to arguments of the function.  */
                    240: #define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM
                    241: 
                    242: /* Register in which static-chain is passed to a function.  */
                    243: #define STATIC_CHAIN_REGNUM 2
                    244: 
                    245: /* Register in which address to store a structure value
                    246:    is passed to a function.  */
                    247: #define STRUCT_VALUE_REGNUM 0
                    248: 
                    249: /* Define the classes of registers for register constraints in the
                    250:    machine description.  Also define ranges of constants.
                    251: 
                    252:    One of the classes must always be named ALL_REGS and include all hard regs.
                    253:    If there is more than one class, another class must be named NO_REGS
                    254:    and contain no registers.
                    255: 
                    256:    The name GENERAL_REGS must be the name of a class (or an alias for
                    257:    another name such as ALL_REGS).  This is the class of registers
                    258:    that is allowed by "g" or "r" in a register constraint.
                    259:    Also, registers outside this class are allocated only when
                    260:    instructions express preferences for them.
                    261: 
                    262:    The classes must be numbered in nondecreasing order; that is,
                    263:    a larger-numbered class must never be contained completely
                    264:    in a smaller-numbered class.
                    265: 
                    266:    For any two classes, it is very desirable that there be another
                    267:    class that represents their union.  */
                    268:    
                    269: /* The clipper has general and FP regs.  */
                    270: 
                    271: enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS, LIM_REG_CLASSES};
                    272: 
                    273: #define N_REG_CLASSES (int) LIM_REG_CLASSES
                    274: 
                    275: /* Give names of register classes as strings for dump file.   */
                    276: 
                    277: #define REG_CLASS_NAMES \
                    278:  {"NO_REGS", "GENERAL_REGS", "FLOAT_REGS", "ALL_REGS" }
                    279: 
                    280: /* Define which registers fit in which classes.
                    281:    This is an initializer for a vector of HARD_REG_SET
                    282:    of length N_REG_CLASSES.  */
                    283: 
                    284: #define REG_CLASS_CONTENTS {0, 0x0000ffff, 0xffff0000, 0xffffffff}
                    285: 
                    286: /* The same information, inverted:
                    287:    Return the class number of the smallest class containing
                    288:    reg number REGNO.  This could be a conditional expression
                    289:    or could index an array.  */
                    290: 
                    291: #define REGNO_REG_CLASS(REGNO) ((REGNO) >= 16 ? FLOAT_REGS : GENERAL_REGS)
                    292: 
                    293: /* The class value for index registers, and the one for base regs.  */
                    294: 
                    295: #define INDEX_REG_CLASS GENERAL_REGS
                    296: #define BASE_REG_CLASS GENERAL_REGS
                    297: 
                    298: /* Get reg_class from a letter such as appears in the machine description.  */
                    299: 
                    300: #define REG_CLASS_FROM_LETTER(C) \
                    301:   ((C) == 'r' ? GENERAL_REGS : ((C) == 'f' ? FLOAT_REGS: NO_REGS))
                    302: 
                    303: /* The letters I, J, K, L and M in a register constraint string
                    304:    can be used to stand for particular ranges of immediate operands.
                    305:    This macro defines what the ranges are.
                    306:    C is the letter, and VALUE is a constant value.
                    307:    Return 1 if VALUE is in the range specified by C. */
                    308: 
                    309: #define CONST_OK_FOR_LETTER_P(VALUE, C) 0
                    310: 
                    311: /* Similar, but for floating constants, and defining letters G and H.
                    312:    Here VALUE is the CONST_DOUBLE rtx itself. */
                    313: 
                    314: #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
                    315: 
                    316: /* Optional extra constraints for this machine. */
                    317: 
                    318: /* #define EXTRA_CONSTRAINT(OP, C) */
                    319: 
                    320: 
                    321: /* Given an rtx X being reloaded into a reg required to be
                    322:    in class CLASS, return the class of reg to actually use.
                    323:    In general this is just CLASS; but on some machines
                    324:    in some cases it is preferable to use a more restrictive class.  */
                    325: 
                    326: #define PREFERRED_RELOAD_CLASS(X,CLASS)  (CLASS)
                    327: 
                    328: /* Return the maximum number of consecutive registers
                    329:    needed to represent mode MODE in a register of class CLASS.  */
                    330: 
                    331: #define CLASS_MAX_NREGS(CLASS, MODE)   \
                    332:  ((CLASS) == FLOAT_REGS                        \
                    333:   ? 1                                  \
                    334:   : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
                    335: 
                    336: /* Stack layout; function entry, exit and calling.  */
                    337: 
                    338: /* Define this if pushing a word on the stack
                    339:    makes the stack pointer a smaller address.  */
                    340: #define STACK_GROWS_DOWNWARD
                    341: 
                    342: /* Define this if longjmp restores from saved registers
                    343:    rather than from what setjmp saved.  */
                    344: /* #define LONGJMP_RESTORE_FROM_STACK */
                    345: 
                    346: /* Define this if the nominal address of the stack frame
                    347:    is at the high-address end of the local variables;
                    348:    that is, each additional local variable allocated
                    349:    goes at a more negative offset in the frame.  */
                    350: #define FRAME_GROWS_DOWNWARD
                    351: 
                    352: /* Offset within stack frame to start allocating local variables at.
                    353:    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
                    354:    first local allocated.  Otherwise, it is the offset to the BEGINNING
                    355:    of the first local allocated.  */
                    356: #define STARTING_FRAME_OFFSET 0
                    357: 
                    358: /* Given an rtx for the address of a frame,
                    359:    return an rtx for the address of the word in the frame
                    360:    that holds the dynamic chain--the previous frame's address.  */
                    361: #define DYNAMIC_CHAIN_ADDRESS(frame) (frame)
                    362: 
                    363: /* If we generate an insn to push BYTES bytes,
                    364:    this says how many the stack pointer really advances by. */
                    365: 
                    366: /* #define PUSH_ROUNDING(BYTES) (BYTES) */
                    367: 
                    368: /* Keep the stack pointer constant throughout the function. */
                    369: /* we can't set this for clipper as library calls may have 3 args and we pass
                    370:    only 2 args in regs. */
                    371: 
                    372: /* #define ACCUMULATE_OUTGOING_ARGS */
                    373:   
                    374: 
                    375: /* Offset of first parameter from the argument pointer register value.
                    376:    size of PC + FP  */
                    377: 
                    378: #define FIRST_PARM_OFFSET(FNDECL) 8
                    379: 
                    380: /* Value is the number of bytes of arguments automatically
                    381:    popped when returning from a subroutine call.
                    382:    FUNTYPE is the data type of the function (as a tree),
                    383:    or for a library call it is an identifier node for the subroutine name.
                    384:    SIZE is the number of bytes of arguments passed on the stack. */
                    385: 
                    386: #define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0
                    387: 
                    388: /* Define how to find the value returned by a function.
                    389:    VALTYPE is the data type of the value (as a tree).
                    390:    If the precise function being called is known, FUNC is its FUNCTION_DECL;
                    391:    otherwise, FUNC is 0.  */
                    392: 
                    393: #define FUNCTION_VALUE(VALTYPE, FUNC)  \
                    394:   gen_rtx (REG, TYPE_MODE (VALTYPE), ((TYPE_MODE (VALTYPE) == SFmode ||\
                    395:                                       TYPE_MODE (VALTYPE) == DFmode) ? \
                    396:                                        16 : 0))
                    397: 
                    398: /* Define how to find the value returned by a library function
                    399:    assuming the value has mode MODE.  */
                    400: 
                    401: #define LIBCALL_VALUE(MODE)  \
                    402:   gen_rtx (REG, (MODE), ((MODE) == SFmode || (MODE) == DFmode ? 16 : 0))
                    403: 
                    404: 
                    405: /* 1 if N is a possible register number for a function value
                    406:    as seen by the caller.  */
                    407: 
                    408: #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (N) == 16)
                    409: 
                    410: /* 1 if N is a possible register number for function argument passing.  */
                    411: 
                    412: #define FUNCTION_ARG_REGNO_P(N) \
                    413:   ((N) == 0 || (N) == 1 || (N) == 16 || (N) == 17)
                    414: 
                    415: /* Define this if PCC uses the nonreentrant convention for returning
1.1.1.3 ! root      416:    structure and union values. Old Green Hills C-Clipper returns static
        !           417:    structs but the newer Apogee compiler passes structs as hidden arg 0.
        !           418:    Structs etc are always passed in memory */
1.1       root      419: 
1.1.1.3 ! root      420: /* #define PCC_STATIC_STRUCT_RETURN */
1.1       root      421: 
                    422: 
                    423: /* Define a data type for recording info about an argument list
                    424:    during the scan of that argument list.  This data type should
                    425:    hold all necessary information about the function itself
                    426:    and about the args processed so far, enough to enable macros
                    427:    such as FUNCTION_ARG to determine where the next arg should go.
                    428: 
                    429:    Clipper uses 2 register 'slots' that pass arguments in r0/r1 or f0/f1.
                    430:    An argument that must be passed in memory (struct... ) leaves that slot
                    431:    free.
                    432:    We pass 'long long' only in registers when both slots are free.
                    433:    Returned structs must be allocated by the caller, the address is passed
                    434:    in r0.
                    435: 
                    436:    struct ss {..}
                    437: 
                    438:    fun (i,j,k)         i in r0, j in r1, k on stack
                    439:    fun (s,j,k)         s on stack, j in r1, k on stack
                    440:    fun (i,s,k)         i in r0, s on stack, k on stack
                    441:    s1 = fun (i,s,k)    &s1 in r0, i in r1, s on stack, k on stack
                    442: 
                    443:    We must keep enough information for varargs/stdargs.
                    444: 
                    445:    _clipper_cum_args is a struct of 2 integers, with
                    446:        num =  slots used
                    447:        size = size of all stack args = offset to next arg without alignment
                    448: 
                    449:    If we use stdarg.h, size points to the first unnamed arg,
                    450:    see va-clipper.h */
                    451: 
                    452: struct _clipper_cum_args { int num; int size; };
                    453: 
                    454: #define CUMULATIVE_ARGS struct _clipper_cum_args
                    455: 
                    456: /* Initialize a variable CUM of type CUMULATIVE_ARGS
                    457:    for a call to a function whose data type is FNTYPE.
                    458:    For a library call, FNTYPE is 0.
                    459: 
                    460:    clipper passes the address of a struct in r0, set num = 1 in this case */
                    461: 
                    462: #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) \
1.1.1.2   root      463:   ((CUM).num = ((FNTYPE) != 0 && aggregate_value_p (TREE_TYPE (FNTYPE))), \
1.1       root      464:    (CUM).size = 0)
                    465: 
                    466: /* internal helper : size of an argument */
                    467: 
                    468: #define CLIPPER_ARG_SIZE(MODE, TYPE)                           \
1.1.1.3 ! root      469: (((MODE) != BLKmode                                                    \
        !           470:   ? (GET_MODE_SIZE (MODE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD     \
        !           471:   : (int_size_in_bytes (TYPE) + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)        \
        !           472:  * UNITS_PER_WORD)
1.1       root      473: 
                    474: /* Update the data in CUM to advance over an argument
                    475:    of mode MODE and data type TYPE.
                    476:    (TYPE is null for libcalls where that information may not be available.)  */
                    477: 
1.1.1.2   root      478: #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)                         \
                    479: do                                                                           \
                    480: {                                                                            \
                    481:   int reg = 0;                                                               \
                    482:                                                                              \
                    483:   if ((CUM).num < 2                                                          \
                    484:       && (GET_MODE_CLASS(MODE)==MODE_INT || GET_MODE_CLASS(MODE)==MODE_FLOAT) \
                    485:       && (GET_MODE_SIZE (MODE) <= 8)                                         \
                    486:       && ((MODE) != DImode || (CUM).num == 0))                               \
                    487:     {                                                                        \
                    488:       reg = 1;                                                               \
                    489:       if ((MODE) == DImode)                                                  \
                    490:        (CUM).num = 1;                                                        \
                    491:     }                                                                        \
                    492:                                                                              \
                    493:   (CUM).num++;                                                               \
                    494:                                                                              \
                    495:   if (! reg)                                                                 \
                    496:     {                                                                        \
                    497:       int align = FUNCTION_ARG_BOUNDARY (MODE, TYPE) / BITS_PER_UNIT;        \
                    498:       (CUM).size += align - 1;                                               \
1.1.1.3 ! root      499:       (CUM).size &= ~(align - 1);                                            \
1.1.1.2   root      500:       (CUM).size += CLIPPER_ARG_SIZE (MODE, TYPE);                           \
                    501:     }                                                                        \
1.1       root      502: } while (0)
                    503: 
                    504: /* Define where to put the arguments to a function.
                    505:    Value is zero to push the argument on the stack,
                    506:    or a hard register in which to store the argument.
                    507: 
                    508:    MODE is the argument's machine mode.
                    509:    TYPE is the data type of the argument (as a tree).
                    510:     This is null for libcalls where that information may
                    511:     not be available.
                    512:    CUM is a variable of type CUMULATIVE_ARGS which gives info about
                    513:     the preceding args and about the function being called.
                    514:    NAMED is nonzero if this argument is a named parameter
1.1.1.2   root      515:     (otherwise it is an extra parameter matching an ellipsis).
1.1       root      516: 
1.1.1.2   root      517:    2 args may go into regs. These must be MODE_INT or MODE_FLOAT but only
                    518:    if they really fit into ONE register. The exception is a DImode arg
                    519:    that occupies both register slots. */
                    520: 
                    521: #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED)                                \
                    522:   (((CUM).num < 2                                                           \
                    523:     && (GET_MODE_CLASS(MODE)==MODE_INT || GET_MODE_CLASS(MODE)==MODE_FLOAT)  \
                    524:     && (GET_MODE_SIZE (MODE) <= 8)                                          \
                    525:     && ((MODE) != DImode || (CUM).num == 0))                                \
                    526:    ? gen_rtx (REG, (MODE),                                                  \
                    527:              GET_MODE_CLASS(MODE) == MODE_FLOAT ? (CUM).num+16 : (CUM).num) \
                    528:    : 0)
1.1       root      529: 
                    530: /* If defined, a C expression that gives the alignment boundary, in bits,
                    531:    of an argument with the specified mode and type.  If it is not defined,
                    532:    `PARM_BOUNDARY' is used for all arguments.  */
                    533: 
                    534: #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
                    535:   (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_SIZE (MODE)) <= PARM_BOUNDARY \
                    536:     ? PARM_BOUNDARY : 2 * PARM_BOUNDARY)
                    537: 
                    538: /* For an arg passed partly in registers and partly in memory,
                    539:    this is the number of registers used.
1.1.1.2   root      540:    For args passed entirely in registers or entirely in memory, zero.
                    541:    Clipper never passed args partially in regs/mem. */
1.1       root      542: 
1.1.1.2   root      543: /* #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED)  0 */
1.1       root      544: 
                    545: /* Generate necessary RTL for __builtin_saveregs().
                    546:    ARGLIST is the argument list; see expr.c.  */
                    547: 
1.1.1.2   root      548: #define EXPAND_BUILTIN_SAVEREGS(ARGLIST) clipper_builtin_saveregs (ARGLIST)
1.1       root      549: 
                    550: /* This macro generates the assembly code for function entry.
                    551:    FILE is a stdio stream to output the code to.
                    552:    SIZE is an int: how many units of temporary storage to allocate.
                    553:    Refer to the array `regs_ever_live' to determine which registers
                    554:    to save; `regs_ever_live[I]' is nonzero if register number I
                    555:    is ever used in the function.  This macro is responsible for
                    556:    knowing which registers should not be saved even if used.  */
                    557: 
                    558: #define FUNCTION_PROLOGUE(FILE, SIZE) output_function_prologue (FILE,SIZE)
                    559: 
                    560: /* Output assembler code to FILE to increment profiler label # LABELNO
                    561:    for profiling a function entry.  */
                    562: 
                    563: #define FUNCTION_PROFILER(FILE, LABELNO)  /* FIXME */
                    564: 
                    565: /* Output assembler code to FILE to initialize this source file's
                    566:    basic block profiling info, if that has not already been done.  */
                    567: 
                    568: #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO)  /* FIXME */
                    569: 
                    570: /* Output assembler code to FILE to increment the entry-count for
                    571:    the BLOCKNO'th basic block in this source file.  */
                    572: 
                    573: #define BLOCK_PROFILER(FILE, BLOCKNO)  /* FIXME */
                    574: 
                    575: /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
                    576:    the stack pointer does not matter.  The value is tested only in
                    577:    functions that have frame pointers.
                    578:    No definition is equivalent to always zero.  */
                    579: 
                    580: #define EXIT_IGNORE_STACK 1
                    581: 
                    582: /* This macro generates the assembly code for function exit,
                    583:    on machines that need it.  If FUNCTION_EPILOGUE is not defined
                    584:    then individual return instructions are generated for each
                    585:    return statement.  Args are same as for FUNCTION_PROLOGUE.  */
                    586: 
                    587: #define FUNCTION_EPILOGUE(FILE, SIZE) output_function_epilogue(FILE,SIZE)
                    588: 
                    589: /* Store in the variable DEPTH the initial difference between the
                    590:    frame pointer reg contents and the stack pointer reg contents,
                    591:    as of the start of the function body.  This depends on the layout
                    592:    of the fixed parts of the stack frame and on how registers are saved. */
                    593: 
                    594: #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) \
                    595:   DEPTH = clipper_frame_size (get_frame_size ())
                    596: 
                    597: 
                    598: /* Output assembler code for a block containing the constant parts
                    599:    of a trampoline, leaving space for the variable parts.  */
                    600: 
                    601: #define TRAMPOLINE_TEMPLATE(FILE)                                            \
                    602: {                                                                            \
                    603:   fputs ("\tcall   sp,.+4\n", FILE);                                         \
                    604:   fputs ("\tmovw   (sp),r3\n", FILE);                                        \
                    605:   fputs ("\taddq   $4,sp\n", FILE);                                          \
                    606:   fputs ("\tloadw  32(r3),r2\n", FILE);                                              \
                    607:   fputs ("\tloadw  36(r3),r3\n", FILE);                                              \
                    608:   fputs ("\tb      (r3)\n", FILE);                                           \
                    609: }
                    610: 
                    611: /* Length in units of the trampoline for entering a nested function.  */
                    612: 
                    613: #define TRAMPOLINE_SIZE 44
                    614: 
                    615: /* Alignment required for a trampoline.  128 is used to find the
                    616:    beginning of a line in the instruction cache and to allow for
                    617:    instruction cache lines of up to 128 bytes.  */
                    618: 
                    619: #define TRAMPOLINE_ALIGNMENT 128
                    620: 
                    621: /* Section in which to place the trampoline.  */
                    622: 
                    623: #define TRAMPOLINE_SECTION text_section
                    624: 
                    625: /* Emit RTL insns to initialize the variable parts of a trampoline.
                    626:    FNADDR is an RTX for the address of the function's pure code.
                    627:    CXT is an RTX for the static chain value for the function.  */
                    628: 
                    629: #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                      \
                    630: {                                                                      \
                    631:   emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 36)), CXT); \
                    632:   emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 40)), FNADDR); \
                    633: }
                    634: 
                    635: /* Addressing modes, and classification of registers for them.  */
                    636: 
                    637: /* #define HAVE_POST_DECREMENT */
                    638: 
                    639: /* #define HAVE_PRE_INCREMENT */
                    640: 
                    641: /* Macros to check register numbers against specific register classes.  */
                    642: 
                    643: /* These assume that REGNO is a hard or pseudo reg number.
                    644:    They give nonzero only if REGNO is a hard reg of the suitable class
                    645:    or a pseudo reg currently allocated to a suitable hard reg.
                    646:    Since they use reg_renumber, they are safe only once reg_renumber
                    647:    has been allocated, which happens in local-alloc.c.  */
                    648: 
                    649: #define REGNO_OK_FOR_INDEX_P(regno)  \
                    650: ((regno) < 16 || (unsigned)reg_renumber[regno] < 16)
                    651: #define REGNO_OK_FOR_BASE_P(regno) \
                    652: ((regno) < 16 || (unsigned)reg_renumber[regno] < 16)
                    653: 
                    654: /* Maximum number of registers that can appear in a valid memory address.  */
                    655: 
                    656: #define MAX_REGS_PER_ADDRESS 2
                    657: 
                    658: /* 1 if X is an rtx for a constant that is a valid address.  */
                    659: 
                    660: #define CONSTANT_ADDRESS_P(X)   \
                    661:   (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF             \
                    662:    || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST               \
                    663:    || GET_CODE (X) == HIGH)
                    664: 
                    665: /* Nonzero if the constant value X is a legitimate general operand.
                    666:    It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
                    667: 
                    668: #define LEGITIMATE_CONSTANT_P(X) 1
                    669: 
                    670: /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
                    671:    and check its validity for a certain class.
                    672:    We have two alternate definitions for each of them.
                    673:    The usual definition accepts all pseudo regs; the other rejects
                    674:    them unless they have been allocated suitable hard regs.
                    675:    The symbol REG_OK_STRICT causes the latter definition to be used.
                    676: 
                    677:    Most source files want to accept pseudo regs in the hope that
                    678:    they will get allocated to the class that the insn wants them to be in.
                    679:    Source files for reload pass need to be strict.
                    680:    After reload, it makes no difference, since pseudo regs have
                    681:    been eliminated by then.  */
                    682: 
                    683:   /* clipper doesn't have true indexing */
                    684: 
                    685: #ifndef REG_OK_STRICT
                    686: 
                    687: /* Nonzero if X is a hard reg that can be used as an index
                    688:    or if it is a pseudo reg.  */
                    689: 
                    690: #define REG_OK_FOR_INDEX_P(X) \
                    691:   (REGNO (X) < 16 || REGNO(X) >= FIRST_PSEUDO_REGISTER)
                    692: 
                    693: /* Nonzero if X is a hard reg that can be used as a base reg
                    694:    or if it is a pseudo reg.  */
                    695: 
                    696: #define REG_OK_FOR_BASE_P(X) \
                    697:   (REGNO (X) < 16 || REGNO(X) >= FIRST_PSEUDO_REGISTER)
                    698: 
                    699: #else
                    700: 
                    701: /* Nonzero if X is a hard reg that can be used as an index.  */
                    702: #define REG_OK_FOR_INDEX_P(X) (REGNO(X) < 16)
                    703: 
                    704: /* Nonzero if X is a hard reg that can be used as a base reg.  */
                    705: #define REG_OK_FOR_BASE_P(X) (REGNO(X) < 16)
                    706: 
                    707: #endif
                    708: 
                    709: /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
                    710:    that is a 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.
                    713: 
                    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.  */
                    716: 
                    717: /* Non-zero if X is an address which can be indirected. */
                    718: 
                    719: #define INDIRECTABLE_CONSTANT_ADDRESS_P(X) 0
                    720: 
                    721: #define INDIRECTABLE_ADDRESS_P(X)  \
                    722:   (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X))
                    723: 
                    724: /* Go to ADDR if X is a valid address not using indexing.
                    725:    (This much is the easy part.)  */
                    726: 
                    727: #define GO_IF_NONINDEXED_ADDRESS(X, ADDR)      \
                    728: { if (CONSTANT_ADDRESS_P (X)) goto ADDR;       \
                    729:   if (INDIRECTABLE_ADDRESS_P (X)) goto ADDR; }
                    730: 
                    731: #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
                    732: { register rtx xfoo = (X);                     \
                    733:   GO_IF_NONINDEXED_ADDRESS (xfoo, ADDR);       \
                    734:   if (GET_CODE (xfoo) == PLUS)                 \
                    735:     { register rtx xfoo0, xfoo1;               \
                    736:       xfoo0 = XEXP (xfoo, 0);                  \
                    737:       xfoo1 = XEXP (xfoo, 1);                  \
                    738:     /* handle reg + reg -> [r1](r0) */         \
                    739:       if (INDIRECTABLE_ADDRESS_P (xfoo0) && INDIRECTABLE_ADDRESS_P (xfoo1)) \
                    740:        goto ADDR;                                                      \
                    741:     /* Handle <symbol>(reg) -> xxx(r0) */                              \
                    742:       if (INDIRECTABLE_ADDRESS_P (xfoo0) && CONSTANT_ADDRESS_P (xfoo1))        \
                    743:        goto ADDR;                                                      \
                    744:       if (INDIRECTABLE_ADDRESS_P (xfoo1) && CONSTANT_ADDRESS_P (xfoo0))        \
                    745:        goto ADDR; }}
                    746: 
                    747: 
                    748: /* Try machine-dependent ways of modifying an illegitimate address
                    749:    to be legitimate.  If we find one, return the new, valid address.
                    750:    This macro is used in only one place: `memory_address' in explow.c.
                    751: 
                    752:    OLDX is the address as it was before break_out_memory_refs was called.
                    753:    In some cases it is useful to look at this to decide what needs to be done.
                    754: 
                    755:    MODE and WIN are passed so that this macro can use
                    756:    GO_IF_LEGITIMATE_ADDRESS.
                    757: 
                    758:    It is always safe for this macro to do nothing.  It exists to recognize
                    759:    opportunities to optimize the output.
                    760: 
                    761:    For the clipper, nothing needs to be done.  */
                    762: 
                    763: #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)  {}
                    764: 
                    765: /* Go to LABEL if ADDR (a legitimate address expression)
                    766:    has an effect that depends on the machine mode it is used for. */
                    767: 
                    768: #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) {}
                    769: 
                    770: 
                    771: /* Specify the machine mode that this machine uses
                    772:    for the index in the tablejump instruction.  */
                    773: #define CASE_VECTOR_MODE SImode
                    774: 
                    775: /* Define this if the case instruction expects the table
                    776:    to contain offsets from the address of the table.
                    777:    Do not define this if the table should contain absolute addresses.  */
                    778: /* #define CASE_VECTOR_PC_RELATIVE */
                    779: 
                    780: /* Define this if the case instruction drops through after the table
                    781:    when the index is out of range.  Don't define it if the case insn
                    782:    jumps to the default label instead.  */
                    783: /* #define CASE_DROPS_THROUGH */
                    784: 
1.1.1.2   root      785: /* Define if operations between registers always perform the operation
                    786:    on the full register even if a narrower mode is specified.  */
                    787: #define WORD_REGISTER_OPERATIONS
                    788: 
                    789: /* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD
                    790:    will either zero-extend or sign-extend.  The value of this macro should
                    791:    be the code that says which one of the two operations is implicitly
                    792:    done, NIL if none.  */
                    793: #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
1.1       root      794: 
                    795: /* Specify the tree operation to be used to convert reals to integers.  */
                    796: #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
                    797: 
                    798: /* This is the kind of divide that is easiest to do in the general case.  */
                    799: #define EASY_DIV_EXPR TRUNC_DIV_EXPR
                    800: 
                    801: /* Define this as 1 if `char' should by default be signed; else as 0.  */
                    802: #define DEFAULT_SIGNED_CHAR 1
                    803: 
                    804: /* This flag, if defined, says the same insns that convert to a signed fixnum
                    805:    also convert validly to an unsigned one.  */
                    806: #define FIXUNS_TRUNC_LIKE_FIX_TRUNC
                    807: 
                    808: /* Max number of bytes we can move from memory to memory
                    809:    in one reasonably fast instruction.  */
                    810: #define MOVE_MAX 4
                    811: 
                    812: /* MOVE_RATIO is the number of move instructions that is better than a
                    813:    block move.  Make this large on clipper, since the block move is very
                    814:    inefficient with small blocks, and the hard register needs of the
                    815:    block move require much reload work. */
                    816: 
                    817: #define MOVE_RATIO 20
                    818: 
                    819: /* Define this if zero-extension is slow (more than one real instruction).  */
                    820: /* #define SLOW_ZERO_EXTEND */
                    821: 
                    822: /* Nonzero if access to memory by bytes is slow and undesirable.  */
                    823: #define SLOW_BYTE_ACCESS 0
                    824: 
                    825: /* Define if shifts truncate the shift count
                    826:    which implies one can omit a sign-extension or zero-extension
                    827:    of a shift count.  */
                    828: /* #define SHIFT_COUNT_TRUNCATED */
                    829: 
                    830: /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
                    831:    is done just by pretending it is already truncated.  */
                    832: #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
                    833: 
                    834: /* Specify the machine mode that pointers have.
                    835:    After generation of rtl, the compiler makes no further distinction
                    836:    between pointers and any other objects of this machine mode.  */
                    837: #define Pmode SImode
                    838: 
                    839: /* A function address in a call instruction
                    840:    is a byte address (for indexing purposes)
                    841:    so give the MEM rtx a byte's mode.  */
                    842: #define FUNCTION_MODE QImode
                    843: 
                    844: /* This machine uses IEEE floats.  */
                    845: 
                    846: #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
                    847: 
                    848: /* Check a `double' value for validity for a particular machine mode.
                    849:    This is defined to avoid crashes outputting certain constants.
                    850:    Since we output the number in hex, the assembler won't choke on it.  */
                    851: /* #define CHECK_FLOAT_VALUE(MODE,VALUE) */
                    852: 
                    853: 
                    854: /* Compute the cost of computing a constant rtl expression RTX
                    855:    whose rtx-code is CODE.  The body of this macro is a portion
                    856:    of a switch statement.  If the code is computed here,
                    857:    return it with a return statement.  Otherwise, break from the switch.  */
                    858: 
                    859: /* On a Clipper, constants from 0..15 are cheap because they can use the
                    860:    'quick' mode. */
                    861: 
                    862: #define CONST_COSTS(RTX,CODE,OUTER_CODE) \
                    863:   case CONST_INT:                                              \
                    864:     if (0 <= INTVAL (RTX) && INTVAL(RTX) <= 15 ) return 0;     \
                    865:       return 1;                                                        \
                    866:   case CONST:                                                  \
                    867:   case LABEL_REF:                                              \
                    868:   case SYMBOL_REF:                                             \
                    869:     return 3;                                                  \
                    870:   case CONST_DOUBLE:                                           \
                    871:     return 5;
                    872: 
                    873: /* Provide the costs of a rtl expression.  This is in the body of a
                    874:    switch on CODE.  */
                    875: 
                    876: #define RTX_COSTS(X,CODE,OUTER_CODE)                   \
                    877:   case MULT:                                           \
                    878:     return COSTS_N_INSNS (4);                          \
                    879:   case DIV:                                            \
                    880:   case UDIV:                                           \
                    881:   case MOD:                                            \
                    882:   case UMOD:                                           \
                    883:     return COSTS_N_INSNS (40);                         \
                    884:   case ASHIFT:                                         \
                    885:   case LSHIFTRT:                                       \
                    886:   case ASHIFTRT:                                       \
                    887:     return COSTS_N_INSNS (2);                          \
                    888:  case SIGN_EXTEND:                                     \
                    889:     return (GET_CODE (XEXP (X,0)) == REG ? COSTS_N_INSNS (3) : 4);
                    890: 
                    891: /* Specify the cost of a branch insn; roughly the number of extra insns that
                    892:    should be added to avoid a branch */
                    893: 
                    894: /* #define BRANCH_COST 0 */
                    895: 
                    896: 
                    897: /* Tell final.c how to eliminate redundant test instructions.  */
                    898: 
                    899: /* Here we define machine-dependent flags and fields in cc_status
                    900:    (see `conditions.h').  No extra ones are needed for the clipper.  */
                    901: 
                    902: /* Store in cc_status the expressions
                    903:    that the condition codes will describe
                    904:    after execution of an instruction whose pattern is EXP.
                    905:    Do not alter them if the instruction would not alter the cc's.  */
                    906: 
                    907: #define NOTICE_UPDATE_CC(EXP, INSN) \
                    908: {                                                                            \
                    909:   enum attr_cc cc = get_attr_cc (INSN);                                              \
                    910:   rtx dest = SET_DEST (EXP);                                                 \
                    911:   switch (cc)                                                                \
                    912:     {                                                                        \
                    913:     case CC_CHANGE0:                                                         \
                    914:       if (GET_CODE (EXP) == PARALLEL) abort();                               \
                    915:       if (cc_status.value1 && rtx_equal_p (dest, cc_status.value1) ||        \
                    916:          cc_status.value2 && rtx_equal_p (dest, cc_status.value2))           \
                    917:        CC_STATUS_INIT;                                                       \
                    918:       break;                                                                 \
                    919:                                                                              \
                    920:     case CC_SET1:                                                            \
                    921:       if (GET_CODE (EXP) == PARALLEL) abort();                               \
                    922:       cc_status.flags = 0;                                                   \
                    923:       cc_status.value1 = dest;                                               \
                    924:       cc_status.value2 = 0;                                                  \
                    925:       break;                                                                 \
                    926:                                                                              \
                    927:     case CC_SET2:                                                            \
                    928:       if (GET_CODE (EXP) == PARALLEL) abort();                               \
                    929:       cc_status.flags = 0;                                                   \
                    930:       cc_status.value1 = dest;                                               \
                    931:       cc_status.value2 = SET_SRC (EXP);                                              \
                    932:       break;                                                                 \
                    933:                                                                              \
                    934:     case CC_UNCHANGED:                                                       \
                    935:       break;                                                                 \
                    936:                                                                              \
                    937:     case CC_CLOBBER:                                                         \
                    938:       CC_STATUS_INIT;                                                        \
                    939:       break;                                                                 \
                    940:                                                                              \
                    941:     default:                                                                 \
                    942:       abort ();                                                                      \
                    943:     }                                                                        \
                    944: }
                    945: 
                    946: 
                    947: /* Control the assembler format that we output.  */
                    948: 
                    949: /* Output at beginning of assembler file.  */
                    950: 
                    951: #define ASM_FILE_START(FILE) fprintf (FILE, "#NO_APP\n");
                    952: 
                    953: /* Output to assembler file text saying following lines
                    954:    may contain character constants, extra white space, comments, etc.  */
                    955: 
                    956: #define ASM_APP_ON "#APP\n"
                    957: 
                    958: /* Output to assembler file text saying following lines
                    959:    no longer contain unusual constructs.  */
                    960: 
                    961: #define ASM_APP_OFF "#NO_APP\n"
                    962: 
                    963: /* Output before read-only data.  */
                    964: 
                    965: #define TEXT_SECTION_ASM_OP ".text"
                    966: 
                    967: /* Output before writable data.  */
                    968: 
                    969: #define DATA_SECTION_ASM_OP ".data"
                    970: 
                    971: /* How to refer to registers in assembler output.
                    972:    This sequence is indexed by compiler's hard-register-number (see above).  */
                    973: 
                    974: #define REGISTER_NAMES \
                    975: {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", \
                    976:  "r9", "r10", "r11", "r12", "r13", "fp", "sp", \
                    977:  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", \
                    978:  "f9", "f10", "f11", "f12", "f13", "f14", "f15" }
                    979: 
                    980: /* How to renumber registers for dbx and gdb.
                    981:    Clipper needs no change in the numeration.  */
                    982: 
                    983: #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
                    984: 
                    985: 
                    986: /* This is how to output the definition of a user-level label named NAME,
                    987:    such as the label on a static function or variable NAME.  */
                    988: 
                    989: #define ASM_OUTPUT_LABEL(FILE,NAME)    \
                    990:   do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
                    991: 
                    992: /* This is how to output a command to make the user-level label named NAME
                    993:    defined for reference from other files.  */
                    994: 
                    995: #define ASM_GLOBALIZE_LABEL(FILE,NAME) \
                    996:   do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
                    997: 
                    998: /* This is how to output an assembler line defining an `int' constant.  */
                    999: 
                   1000: #define ASM_OUTPUT_INT(FILE,VALUE)  \
                   1001: ( fprintf (FILE, "\t.long "),                  \
                   1002:   output_addr_const (FILE, (VALUE)),           \
                   1003:   fprintf (FILE, "\n"))
                   1004: 
                   1005: /* Likewise for `char' and `short' constants.  */
                   1006: 
                   1007: #define ASM_OUTPUT_SHORT(FILE,VALUE)  \
                   1008: ( fprintf (FILE, "\t.word "),                  \
                   1009:   output_addr_const (FILE, (VALUE)),           \
                   1010:   fprintf (FILE, "\n"))
                   1011: 
                   1012: #define ASM_OUTPUT_CHAR(FILE,VALUE)  \
                   1013: ( fprintf (FILE, "\t.byte "),                  \
                   1014:   output_addr_const (FILE, (VALUE)),           \
                   1015:   fprintf (FILE, "\n"))
                   1016: 
                   1017: /* This is how to output an assembler line for a numeric constant byte.  */
                   1018: 
                   1019: #define ASM_OUTPUT_BYTE(FILE,VALUE)  \
                   1020:   fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
                   1021: 
                   1022: /* This is how to output an insn to push a register on the stack.
                   1023:    It need not be very fast code.  */
                   1024: 
                   1025: #define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \
                   1026:   fprintf (FILE, "\tsubq   $8,sp\n\t%s  %s,(sp)\n",    \
                   1027:           (REGNO) < 16 ? "storw" : "stord", reg_names[REGNO])
                   1028: 
                   1029: /* This is how to output an insn to pop a register from the stack.
                   1030:    It need not be very fast code.  */
                   1031: 
                   1032: #define ASM_OUTPUT_REG_POP(FILE,REGNO)  \
                   1033:   fprintf (FILE, "\t%s  (sp),%s\n\t\addq  $8,sp\n",    \
                   1034:           (REGNO) < 16 ? "loadw" : "loadd", reg_names[REGNO])
                   1035: /* This is how to output an element of a case-vector that is absolute */
                   1036: 
                   1037: #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
                   1038:   fprintf (FILE, "\t.long .L%d\n", VALUE)
                   1039: 
                   1040: /* This is how to output an element of a case-vector that is relative.  */
                   1041: 
                   1042: #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)  \
                   1043:   fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL)
                   1044: 
                   1045: /* This is how to output an assembler line
                   1046:    that says to advance the location counter by SIZE bytes.  */
                   1047: 
                   1048: #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
                   1049:   fprintf (FILE, "\t.space %u\n", (SIZE))
                   1050: 
                   1051: /* This says how to output an assembler line
                   1052:    to define a local common symbol.  */
                   1053: 
                   1054: #define ASM_OUTPUT_ALIGNED_LOCAL(FILE,NAME,SIZE,ALIGN) \
                   1055: ( data_section (),                                     \
                   1056:   fputs ("\t.bss\t", (FILE)),                          \
                   1057:   assemble_name ((FILE), (NAME)),                      \
                   1058:   fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN)/BITS_PER_UNIT))
                   1059: 
                   1060: /* Store in OUTPUT a string (made with alloca) containing
                   1061:    an assembler-name for a local static variable named NAME.
                   1062:    LABELNO is an integer which is different for each call.  */
                   1063: 
                   1064: #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
                   1065: ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),   \
                   1066:   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
                   1067: 
                   1068: /* Define the parentheses used to group arithmetic operations
                   1069:    in assembler code.  */
                   1070: 
                   1071: #define ASM_OPEN_PAREN "("
                   1072: #define ASM_CLOSE_PAREN ")"
                   1073: 
                   1074: /* Define results of standard character escape sequences.  */
                   1075: #define TARGET_BELL 007
                   1076: #define TARGET_BS 010
                   1077: #define TARGET_TAB 011
                   1078: #define TARGET_NEWLINE 012
                   1079: #define TARGET_VT 013
                   1080: #define TARGET_FF 014
                   1081: #define TARGET_CR 015
                   1082: 
                   1083: /* Print an instruction operand X on file FILE.
                   1084:    CODE is the code from the %-spec that requested printing this operand;
                   1085:    if `%z3' was used to print operand 3, then CODE is 'z'.
                   1086: 
                   1087: Clipper operand formatting codes:
                   1088: 
                   1089:  letter           print
                   1090:    C   reverse branch condition
                   1091: */
                   1092: 
                   1093: #define PRINT_OPERAND_PUNCT_VALID_P(CODE)                              \
                   1094:   ((CODE) == 'C')
                   1095: 
                   1096: #define PRINT_OPERAND(FILE, X, CODE)  \
                   1097: { extern char *rev_cond_name ();                                       \
                   1098:   if (CODE == 'C')                                                     \
                   1099:     fputs (rev_cond_name (X), FILE);                                   \
                   1100:   else if (GET_CODE (X) == REG)                                                \
                   1101:     fprintf (FILE, "%s", reg_names[REGNO (X)]);                                \
                   1102:   else if (GET_CODE (X) == MEM)                                                \
                   1103:     output_address (XEXP (X, 0));                                      \
                   1104:   else { putc ('$', FILE); output_addr_const (FILE, X); }}
                   1105: 
                   1106: /* Print a memory operand whose address is X, on file FILE.
                   1107:    This uses a function in output-clipper.c.  */
                   1108: 
                   1109: #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \
                   1110:  print_operand_address (FILE, ADDR)
                   1111: 
                   1112: /* Define the codes that are matched by predicates in clipper.c */
                   1113: 
                   1114: #define PREDICATE_CODES \
                   1115:   {"int_reg_operand", {SUBREG, REG}},  \
                   1116:   {"fp_reg_operand", {SUBREG, REG}},

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.