home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / config / i386 / i386.h < prev    next >
C/C++ Source or Header  |  1995-12-11  |  76KB  |  2,009 lines

  1. /* Definitions of target machine for GNU compiler for Intel X86
  2.    (386, 486, Pentium).
  3.    Copyright (C) 1988, 1992, 1994, 1995 Free Software Foundation, Inc.
  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, 59 Temple Place - Suite 330,
  20. Boston, MA 02111-1307, USA.  */
  21.  
  22.  
  23. /* The purpose of this file is to define the characteristics of the i386,
  24.    independent of assembler syntax or operating system.
  25.  
  26.    Three other files build on this one to describe a specific assembler syntax:
  27.    bsd386.h, att386.h, and sun386.h.
  28.  
  29.    The actual tm.h file for a particular system should include
  30.    this file, and then the file for the appropriate assembler syntax.
  31.  
  32.    Many macros that specify assembler syntax are omitted entirely from
  33.    this file because they really belong in the files for particular
  34.    assemblers.  These include AS1, AS2, AS3, RP, IP, LPREFIX, L_SIZE,
  35.    PUT_OP_SIZE, USE_STAR, ADDR_BEG, ADDR_END, PRINT_IREG, PRINT_SCALE,
  36.    PRINT_B_I_S, and many that start with ASM_ or end in ASM_OP.  */
  37.  
  38. /* Names to predefine in the preprocessor for this target machine.  */
  39.  
  40. #define I386 1
  41.  
  42. /* Stubs for half-pic support if not OSF/1 reference platform.  */
  43.  
  44. #ifndef HALF_PIC_P
  45. #define HALF_PIC_P() 0
  46. #define HALF_PIC_NUMBER_PTRS 0
  47. #define HALF_PIC_NUMBER_REFS 0
  48. #define HALF_PIC_ENCODE(DECL)
  49. #define HALF_PIC_DECLARE(NAME)
  50. #define HALF_PIC_INIT()    error ("half-pic init called on systems that don't support it.")
  51. #define HALF_PIC_ADDRESS_P(X) 0
  52. #define HALF_PIC_PTR(X) X
  53. #define HALF_PIC_FINISH(STREAM)
  54. #endif
  55.  
  56. /* Run-time compilation parameters selecting different hardware subsets.  */
  57.  
  58. extern int target_flags;
  59.  
  60. /* Macros used in the machine description to test the flags.  */
  61.  
  62. /* configure can arrange to make this 2, to force a 486.  */
  63. #ifndef TARGET_CPU_DEFAULT
  64. #define TARGET_CPU_DEFAULT 0
  65. #endif
  66.  
  67. /* Masks for the -m switches */
  68. #define MASK_80387        000000000001    /* Hardware floating point */
  69. #define MASK_486        000000000002    /* 80486 specific */
  70. #define MASK_NOTUSED1        000000000004    /* bit not currently used */
  71. #define MASK_RTD        000000000010    /* Use ret that pops args */
  72. #define MASK_ALIGN_DOUBLE    000000000020    /* align doubles to 2 word boundary */
  73. #define MASK_SVR3_SHLIB        000000000040    /* Uninit locals into bss */
  74. #define MASK_IEEE_FP        000000000100    /* IEEE fp comparisons */
  75. #define MASK_FLOAT_RETURNS    000000000200    /* Return float in st(0) */
  76. #define MASK_NO_FANCY_MATH_387    000000000400    /* Disable sin, cos, sqrt */
  77.  
  78.                         /* Temporary codegen switches */
  79. #define MASK_DEBUG_ADDR        000001000000    /* Debug GO_IF_LEGITIMATE_ADDRESS */
  80. #define MASK_NO_WIDE_MULTIPLY    000002000000    /* Disable 32x32->64 multiplies */
  81. #define MASK_NO_MOVE        000004000000    /* Don't generate mem->mem */
  82. #define MASK_DEBUG_ARG        000010000000    /* Debug function_arg */   
  83.  
  84. /* Use the floating point instructions */
  85. #define TARGET_80387 (target_flags & MASK_80387)
  86.  
  87. /* Compile using ret insn that pops args.
  88.    This will not work unless you use prototypes at least
  89.    for all functions that can take varying numbers of args.  */  
  90. #define TARGET_RTD (target_flags & MASK_RTD)
  91.  
  92. /* Align doubles to a two word boundary.  This breaks compatibility with
  93.    the published ABI's for structures containing doubles, but produces
  94.    faster code on the pentium.  */
  95. #define TARGET_ALIGN_DOUBLE (target_flags & MASK_ALIGN_DOUBLE)
  96.  
  97. /* Put uninitialized locals into bss, not data.
  98.    Meaningful only on svr3.  */
  99. #define TARGET_SVR3_SHLIB (target_flags & MASK_SVR3_SHLIB)
  100.  
  101. /* Use IEEE floating point comparisons.  These handle correctly the cases
  102.    where the result of a comparison is unordered.  Normally SIGFPE is
  103.    generated in such cases, in which case this isn't needed.  */
  104. #define TARGET_IEEE_FP (target_flags & MASK_IEEE_FP)
  105.  
  106. /* Functions that return a floating point value may return that value
  107.    in the 387 FPU or in 386 integer registers.  If set, this flag causes
  108.    the 387 to be used, which is compatible with most calling conventions. */
  109. #define TARGET_FLOAT_RETURNS_IN_80387 (target_flags & MASK_FLOAT_RETURNS)
  110.  
  111. /* Disable generation of FP sin, cos and sqrt operations for 387.
  112.    This is because FreeBSD lacks these in the math-emulator-code */
  113. #define TARGET_NO_FANCY_MATH_387 (target_flags & MASK_NO_FANCY_MATH_387)
  114.  
  115. /* Temporary switches for tuning code generation */
  116.  
  117. /* Disable 32x32->64 bit multiplies that are used for long long multiplies
  118.    and division by constants, but sometimes cause reload problems.  */
  119. #define TARGET_NO_WIDE_MULTIPLY (target_flags & MASK_NO_WIDE_MULTIPLY)
  120. #define TARGET_WIDE_MULTIPLY (!TARGET_NO_WIDE_MULTIPLY)
  121.  
  122. /* Debug GO_IF_LEGITIMATE_ADDRESS */
  123. #define TARGET_DEBUG_ADDR (target_flags & MASK_DEBUG_ADDR)
  124.  
  125. /* Debug FUNCTION_ARG macros */
  126. #define TARGET_DEBUG_ARG (target_flags & MASK_DEBUG_ARG)
  127.  
  128. /* Hack macros for tuning code generation */
  129. #define TARGET_MOVE    ((target_flags & MASK_NO_MOVE) == 0)    /* Don't generate memory->memory */
  130.  
  131. /* Specific hardware switches */
  132. #ifdef NEXT_SEMANTICS
  133. #define PENTIUM_SWITCHES                        \
  134.   { "pentium",             4},                    \
  135.   { "no-pentium",        -4},
  136. #define TARGET_PENTIUM (target_flags & 4)
  137. #else
  138. #define PENTIUM_SWITCHES
  139. #endif
  140. #define TARGET_486    (target_flags & MASK_486)    /* 80486DX, 80486SX, 80486DX[24] */
  141. #define TARGET_386    (!TARGET_486)             /* 80386 */
  142.  
  143. #define TARGET_SWITCHES                            \
  144. { { "80387",             MASK_80387 },                \
  145.   { "no-80387",            -MASK_80387 },                \
  146.   { "hard-float",         MASK_80387 },                \
  147.   { "soft-float",        -MASK_80387 },                \
  148.   { "no-soft-float",         MASK_80387 },                \
  149.   { "386",            -MASK_486 },                \
  150.   { "no-386",             MASK_486 },                \
  151.   { "486",             MASK_486 },                \
  152.   { "no-486",            -MASK_486 },                \
  153.   PENTIUM_SWITCHES                            \
  154.   { "rtd",             MASK_RTD },                \
  155.   { "no-rtd",            -MASK_RTD },                \
  156.   { "align-double",         MASK_ALIGN_DOUBLE },            \
  157.   { "no-align-double",        -MASK_ALIGN_DOUBLE },            \
  158.   { "svr3-shlib",         MASK_SVR3_SHLIB },            \
  159.   { "no-svr3-shlib",        -MASK_SVR3_SHLIB },            \
  160.   { "ieee-fp",             MASK_IEEE_FP },            \
  161.   { "no-ieee-fp",        -MASK_IEEE_FP },            \
  162.   { "fp-ret-in-387",         MASK_FLOAT_RETURNS },            \
  163.   { "no-fp-ret-in-387",        -MASK_FLOAT_RETURNS },            \
  164.   { "no-fancy-math-387",     MASK_NO_FANCY_MATH_387 },        \
  165.   { "fancy-math-387",        -MASK_NO_FANCY_MATH_387 },        \
  166.   { "no-wide-multiply",         MASK_NO_WIDE_MULTIPLY },        \
  167.   { "wide-multiply",        -MASK_NO_WIDE_MULTIPLY },        \
  168.   { "debug-addr",         MASK_DEBUG_ADDR },            \
  169.   { "no-debug-addr",        -MASK_DEBUG_ADDR },            \
  170.   { "move",            -MASK_NO_MOVE },            \
  171.   { "no-move",             MASK_NO_MOVE },            \
  172.   { "debug-arg",         MASK_DEBUG_ARG },            \
  173.   { "no-debug-arg",        -MASK_DEBUG_ARG },            \
  174.   SUBTARGET_SWITCHES                            \
  175.   { "", TARGET_DEFAULT | TARGET_CPU_DEFAULT}}
  176.  
  177. /* This macro is similar to `TARGET_SWITCHES' but defines names of
  178.    command options that have values.  Its definition is an
  179.    initializer with a subgrouping for each command option.
  180.  
  181.    Each subgrouping contains a string constant, that defines the
  182.    fixed part of the option name, and the address of a variable.  The
  183.    variable, type `char *', is set to the variable part of the given
  184.    option if the fixed part matches.  The actual option name is made
  185.    by appending `-m' to the specified name.  */
  186. #define TARGET_OPTIONS                            \
  187. { { "reg-alloc=",    &i386_reg_alloc_order },            \
  188.   { "regparm=",        &i386_regparm_string },                \
  189.   { "align-loops=",    &i386_align_loops_string },            \
  190.   { "align-jumps=",    &i386_align_jumps_string },            \
  191.   { "align-functions=",    &i386_align_funcs_string },            \
  192.   SUBTARGET_OPTIONS                            \
  193. }
  194.  
  195. /* Sometimes certain combinations of command options do not make
  196.    sense on a particular target machine.  You can define a macro
  197.    `OVERRIDE_OPTIONS' to take account of this.  This macro, if
  198.    defined, is executed once just after all the command options have
  199.    been parsed.
  200.  
  201.    Don't use this macro to turn on various extra optimizations for
  202.    `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
  203.  
  204. #define OVERRIDE_OPTIONS override_options ()
  205.  
  206. /* These are meant to be redefined in the host dependent files */
  207. #define SUBTARGET_SWITCHES
  208. #define SUBTARGET_OPTIONS
  209.  
  210.  
  211. /* target machine storage layout */
  212.  
  213. /* Define for XFmode extended real floating point support.
  214.    This will automatically cause REAL_ARITHMETIC to be defined.  */
  215. #define LONG_DOUBLE_TYPE_SIZE 96
  216.  
  217. /* Define if you don't want extended real, but do want to use the
  218.    software floating point emulator for REAL_ARITHMETIC and
  219.    decimal <-> binary conversion. */
  220. /* #define REAL_ARITHMETIC */
  221.  
  222. /* Define this if most significant byte of a word is the lowest numbered.  */
  223. /* That is true on the 80386.  */
  224.  
  225. #define BITS_BIG_ENDIAN 0
  226.  
  227. /* Define this if most significant byte of a word is the lowest numbered.  */
  228. /* That is not true on the 80386.  */
  229. #define BYTES_BIG_ENDIAN 0
  230.  
  231. /* Define this if most significant word of a multiword number is the lowest
  232.    numbered.  */
  233. /* Not true for 80386 */
  234. #define WORDS_BIG_ENDIAN 0
  235.  
  236. /* number of bits in an addressable storage unit */
  237. #define BITS_PER_UNIT 8
  238.  
  239. /* Width in bits of a "word", which is the contents of a machine register.
  240.    Note that this is not necessarily the width of data type `int';
  241.    if using 16-bit ints on a 80386, this would still be 32.
  242.    But on a machine with 16-bit registers, this would be 16.  */
  243. #define BITS_PER_WORD 32
  244.  
  245. /* Width of a word, in units (bytes).  */
  246. #define UNITS_PER_WORD 4
  247.  
  248. /* Width in bits of a pointer.
  249.    See also the macro `Pmode' defined below.  */
  250. #define POINTER_SIZE 32
  251.  
  252. /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
  253. #define PARM_BOUNDARY 32
  254.  
  255. /* Boundary (in *bits*) on which stack pointer should be aligned.  */
  256. #define STACK_BOUNDARY 32
  257.  
  258. /* Allocation boundary (in *bits*) for the code of a function.
  259.    For i486, we get better performance by aligning to a cache
  260.    line (i.e. 16 byte) boundary.  */
  261. #define FUNCTION_BOUNDARY (1 << (i386_align_funcs + 3))
  262.  
  263. /* Alignment of field after `int : 0' in a structure. */
  264.  
  265. #define EMPTY_FIELD_BOUNDARY 32
  266.  
  267. /* Minimum size in bits of the largest boundary to which any
  268.    and all fundamental data types supported by the hardware
  269.    might need to be aligned. No data type wants to be aligned
  270.    rounder than this.  The i386 supports 64-bit floating point
  271.    quantities, but these can be aligned on any 32-bit boundary.
  272.    The published ABIs say that doubles should be aligned on word
  273.    boundaries, but the Pentium gets better performance with them
  274.    aligned on 64 bit boundaries. */
  275. #define BIGGEST_ALIGNMENT (TARGET_ALIGN_DOUBLE ? 64 : 32)
  276.  
  277. /* Set this non-zero if move instructions will actually fail to work
  278.    when given unaligned data.  */
  279. #define STRICT_ALIGNMENT 0
  280.  
  281. /* If bit field type is int, don't let it cross an int,
  282.    and give entire struct the alignment of an int.  */
  283. /* Required on the 386 since it doesn't have bitfield insns.  */
  284. #define PCC_BITFIELD_TYPE_MATTERS 1
  285.  
  286. /* Maximum power of 2 that code can be aligned to.  */
  287. #define MAX_CODE_ALIGN    6            /* 64 byte alignment */
  288.  
  289. /* Align loop starts for optimal branching.  */
  290. #define ASM_OUTPUT_LOOP_ALIGN(FILE) ASM_OUTPUT_ALIGN (FILE, i386_align_loops)
  291.  
  292. /* This is how to align an instruction for optimal branching.
  293.    On i486 we'll get better performance by aligning on a
  294.    cache line (i.e. 16 byte) boundary.  */
  295. #define ASM_OUTPUT_ALIGN_CODE(FILE) ASM_OUTPUT_ALIGN ((FILE), i386_align_jumps)
  296.  
  297.  
  298. /* Standard register usage.  */
  299.  
  300. /* This processor has special stack-like registers.  See reg-stack.c
  301.    for details. */
  302.  
  303. #define STACK_REGS
  304.  
  305. /* Number of actual hardware registers.
  306.    The hardware registers are assigned numbers for the compiler
  307.    from 0 to just below FIRST_PSEUDO_REGISTER.
  308.    All registers that the compiler knows about must be given numbers,
  309.    even those that are not normally considered general registers.
  310.  
  311.    In the 80386 we give the 8 general purpose registers the numbers 0-7.
  312.    We number the floating point registers 8-15.
  313.    Note that registers 0-7 can be accessed as a  short or int,
  314.    while only 0-3 may be used with byte `mov' instructions.
  315.  
  316.    Reg 16 does not correspond to any hardware register, but instead
  317.    appears in the RTL as an argument pointer prior to reload, and is
  318.    eliminated during reloading in favor of either the stack or frame
  319.    pointer. */
  320.  
  321. #define FIRST_PSEUDO_REGISTER 17
  322.  
  323. /* 1 for registers that have pervasive standard uses
  324.    and are not available for the register allocator.
  325.    On the 80386, the stack pointer is such, as is the arg pointer. */
  326. #define FIXED_REGISTERS \
  327. /*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/       \
  328. {  0, 0, 0, 0, 0, 0, 0, 1, 0,  0,  0,  0,  0,  0,  0,  0,  1 }
  329.  
  330. /* 1 for registers not available across function calls.
  331.    These must include the FIXED_REGISTERS and also any
  332.    registers that can be used without being saved.
  333.    The latter must include the registers where values are returned
  334.    and the register where structure-value addresses are passed.
  335.    Aside from that, you can include as many other registers as you like.  */
  336.  
  337. #define CALL_USED_REGISTERS \
  338. /*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \
  339. {  1, 1, 1, 0, 0, 0, 0, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1 }
  340.  
  341. /* Order in which to allocate registers.  Each register must be
  342.    listed once, even those in FIXED_REGISTERS.  List frame pointer
  343.    late and fixed registers last.  Note that, in general, we prefer
  344.    registers listed in CALL_USED_REGISTERS, keeping the others
  345.    available for storage of persistent values.
  346.  
  347.    Three different versions of REG_ALLOC_ORDER have been tried:
  348.  
  349.    If the order is edx, ecx, eax, ... it produces a slightly faster compiler,
  350.    but slower code on simple functions returning values in eax.
  351.  
  352.    If the order is eax, ecx, edx, ... it causes reload to abort when compiling
  353.    perl 4.036 due to not being able to create a DImode register (to hold a 2
  354.    word union).
  355.  
  356.    If the order is eax, edx, ecx, ... it produces better code for simple
  357.    functions, and a slightly slower compiler.  Users complained about the code
  358.    generated by allocating edx first, so restore the 'natural' order of things. */
  359.  
  360. #define REG_ALLOC_ORDER \
  361. /*ax,dx,cx,bx,si,di,bp,sp,st,st1,st2,st3,st4,st5,st6,st7,arg*/ \
  362. {  0, 1, 2, 3, 4, 5, 6, 7, 8,  9, 10, 11, 12, 13, 14, 15, 16 }
  363.  
  364. /* A C statement (sans semicolon) to choose the order in which to
  365.    allocate hard registers for pseudo-registers local to a basic
  366.    block.
  367.  
  368.    Store the desired register order in the array `reg_alloc_order'.
  369.    Element 0 should be the register to allocate first; element 1, the
  370.    next register; and so on.
  371.  
  372.    The macro body should not assume anything about the contents of
  373.    `reg_alloc_order' before execution of the macro.
  374.  
  375.    On most machines, it is not necessary to define this macro.  */
  376.  
  377. #define ORDER_REGS_FOR_LOCAL_ALLOC order_regs_for_local_alloc ()
  378.  
  379. /* Macro to conditionally modify fixed_regs/call_used_regs.  */
  380. #ifdef NEXT_SEMANTICS
  381. #define FLAG_PIC 0
  382. #else
  383. #define FLAG_PIC flag_pic
  384. #endif
  385. #define CONDITIONAL_REGISTER_USAGE            \
  386.   {                            \
  387.     if (FLAG_PIC)                    \
  388.       {                            \
  389.     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  390.     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  391.       }                            \
  392.     if (! TARGET_80387 && ! TARGET_FLOAT_RETURNS_IN_80387) \
  393.       {                         \
  394.     int i;                         \
  395.     HARD_REG_SET x;                    \
  396.         COPY_HARD_REG_SET (x, reg_class_contents[(int)FLOAT_REGS]); \
  397.         for (i = 0; i < FIRST_PSEUDO_REGISTER; i++ )    \
  398.          if (TEST_HARD_REG_BIT (x, i))             \
  399.       fixed_regs[i] = call_used_regs[i] = 1;     \
  400.       }                            \
  401.   }
  402.  
  403. /* Return number of consecutive hard regs needed starting at reg REGNO
  404.    to hold something of mode MODE.
  405.    This is ordinarily the length in words of a value of mode MODE
  406.    but can be less for certain modes in special long registers.
  407.  
  408.    Actually there are no two word move instructions for consecutive 
  409.    registers.  And only registers 0-3 may have mov byte instructions
  410.    applied to them.
  411.    */
  412.  
  413. #define HARD_REGNO_NREGS(REGNO, MODE)   \
  414.   (FP_REGNO_P (REGNO) ? 1 \
  415.    : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
  416.  
  417. /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
  418.    On the 80386, the first 4 cpu registers can hold any mode
  419.    while the floating point registers may hold only floating point.
  420.    Make it clear that the fp regs could not hold a 16-byte float.  */
  421.  
  422. /* The casts to int placate a compiler on a microvax,
  423.    for cross-compiler testing.  */
  424.  
  425. #define HARD_REGNO_MODE_OK(REGNO, MODE) \
  426.   ((REGNO) < 2 ? 1                        \
  427.    : (REGNO) < 4 ? 1                        \
  428.    : FP_REGNO_P (REGNO)                        \
  429.    ? (((int) GET_MODE_CLASS (MODE) == (int) MODE_FLOAT        \
  430.        || (int) GET_MODE_CLASS (MODE) == (int) MODE_COMPLEX_FLOAT)    \
  431.       && GET_MODE_UNIT_SIZE (MODE) <= 12)            \
  432.    : (int) (MODE) != (int) QImode)
  433.  
  434. /* Value is 1 if it is a good idea to tie two pseudo registers
  435.    when one has mode MODE1 and one has mode MODE2.
  436.    If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
  437.    for any hard reg, then this must be 0 for correct output.  */
  438.  
  439. #define MODES_TIEABLE_P(MODE1, MODE2) ((MODE1) == (MODE2))
  440.  
  441. /* A C expression returning the cost of moving data from a register of class
  442.    CLASS1 to one of CLASS2.
  443.  
  444.    On the i386, copying between floating-point and fixed-point
  445.    registers is expensive.  */
  446.  
  447. #define REGISTER_MOVE_COST(CLASS1, CLASS2)            \
  448.   (((FLOAT_CLASS_P (CLASS1) && ! FLOAT_CLASS_P (CLASS2))        \
  449.     || (! FLOAT_CLASS_P (CLASS1) && FLOAT_CLASS_P (CLASS2))) ? 10    \
  450.    : 2)
  451.  
  452. /* Specify the registers used for certain standard purposes.
  453.    The values of these macros are register numbers.  */
  454.  
  455. /* on the 386 the pc register is %eip, and is not usable as a general
  456.    register.  The ordinary mov instructions won't work */
  457. /* #define PC_REGNUM  */
  458.  
  459. /* Register to use for pushing function arguments.  */
  460. #define STACK_POINTER_REGNUM 7
  461.  
  462. /* Base register for access to local variables of the function.  */
  463. #define FRAME_POINTER_REGNUM 6
  464.  
  465. /* First floating point reg */
  466. #define FIRST_FLOAT_REG 8
  467.  
  468. /* First & last stack-like regs */
  469. #define FIRST_STACK_REG FIRST_FLOAT_REG
  470. #define LAST_STACK_REG (FIRST_FLOAT_REG + 7)
  471.  
  472. /* Value should be nonzero if functions must have frame pointers.
  473.    Zero means the frame pointer need not be set up (and parms
  474.    may be accessed via the stack pointer) in functions that seem suitable.
  475.    This is computed in `reload', in reload1.c.  */
  476. #define FRAME_POINTER_REQUIRED 0
  477.  
  478. /* Base register for access to arguments of the function.  */
  479. #define ARG_POINTER_REGNUM 16
  480.  
  481. /* Register in which static-chain is passed to a function.  */
  482. #define STATIC_CHAIN_REGNUM 2
  483.  
  484. /* Register to hold the addressing base for position independent
  485.    code access to data items.  */
  486. #define PIC_OFFSET_TABLE_REGNUM 3
  487.  
  488. /* Register in which address to store a structure value
  489.    arrives in the function.  On the 386, the prologue
  490.    copies this from the stack to register %eax.  */
  491. #define STRUCT_VALUE_INCOMING 0
  492.  
  493. /* Place in which caller passes the structure value address.
  494.    0 means push the value on the stack like an argument.  */
  495. #define STRUCT_VALUE 0
  496.  
  497. /* A C expression which can inhibit the returning of certain function
  498.    values in registers, based on the type of value.  A nonzero value
  499.    says to return the function value in memory, just as large
  500.    structures are always returned.  Here TYPE will be a C expression
  501.    of type `tree', representing the data type of the value.
  502.  
  503.    Note that values of mode `BLKmode' must be explicitly handled by
  504.    this macro.  Also, the option `-fpcc-struct-return' takes effect
  505.    regardless of this macro.  On most systems, it is possible to
  506.    leave the macro undefined; this causes a default definition to be
  507.    used, whose value is the constant 1 for `BLKmode' values, and 0
  508.    otherwise.
  509.  
  510.    Do not use this macro to indicate that structures and unions
  511.    should always be returned in memory.  You should instead use
  512.    `DEFAULT_PCC_STRUCT_RETURN' to indicate this.  */
  513.  
  514. #define RETURN_IN_MEMORY(TYPE) \
  515.   ((TYPE_MODE (TYPE) == BLKmode) || int_size_in_bytes (TYPE) > 12)
  516.  
  517.  
  518. /* Define the classes of registers for register constraints in the
  519.    machine description.  Also define ranges of constants.
  520.  
  521.    One of the classes must always be named ALL_REGS and include all hard regs.
  522.    If there is more than one class, another class must be named NO_REGS
  523.    and contain no registers.
  524.  
  525.    The name GENERAL_REGS must be the name of a class (or an alias for
  526.    another name such as ALL_REGS).  This is the class of registers
  527.    that is allowed by "g" or "r" in a register constraint.
  528.    Also, registers outside this class are allocated only when
  529.    instructions express preferences for them.
  530.  
  531.    The classes must be numbered in nondecreasing order; that is,
  532.    a larger-numbered class must never be contained completely
  533.    in a smaller-numbered class.
  534.  
  535.    For any two classes, it is very desirable that there be another
  536.    class that represents their union.
  537.  
  538.    It might seem that class BREG is unnecessary, since no useful 386
  539.    opcode needs reg %ebx.  But some systems pass args to the OS in ebx,
  540.    and the "b" register constraint is useful in asms for syscalls.  */
  541.  
  542. enum reg_class
  543. {
  544.   NO_REGS,
  545.   AREG, DREG, CREG, BREG,
  546.   AD_REGS,            /* %eax/%edx for DImode */
  547.   Q_REGS,            /* %eax %ebx %ecx %edx */
  548.   SIREG, DIREG,
  549.   INDEX_REGS,            /* %eax %ebx %ecx %edx %esi %edi %ebp */
  550.   GENERAL_REGS,            /* %eax %ebx %ecx %edx %esi %edi %ebp %esp */
  551.   FP_TOP_REG, FP_SECOND_REG,    /* %st(0) %st(1) */
  552.   FLOAT_REGS,
  553.   ALL_REGS, LIM_REG_CLASSES
  554. };
  555.  
  556. #define N_REG_CLASSES (int) LIM_REG_CLASSES
  557.  
  558. #define FLOAT_CLASS_P(CLASS) (reg_class_subset_p (CLASS, FLOAT_REGS))
  559.  
  560. /* Give names of register classes as strings for dump file.   */
  561.  
  562. #define REG_CLASS_NAMES \
  563. {  "NO_REGS",                \
  564.    "AREG", "DREG", "CREG", "BREG",    \
  565.    "AD_REGS",                \
  566.    "Q_REGS",                \
  567.    "SIREG", "DIREG",            \
  568.    "INDEX_REGS",            \
  569.    "GENERAL_REGS",            \
  570.    "FP_TOP_REG", "FP_SECOND_REG",    \
  571.    "FLOAT_REGS",            \
  572.    "ALL_REGS" }
  573.  
  574. /* Define which registers fit in which classes.
  575.    This is an initializer for a vector of HARD_REG_SET
  576.    of length N_REG_CLASSES.  */
  577.  
  578. #define REG_CLASS_CONTENTS \
  579. {      0,                            \
  580.      0x1,    0x2,  0x4,     0x8,    /* AREG, DREG, CREG, BREG */    \
  581.      0x3,            /* AD_REGS */            \
  582.      0xf,            /* Q_REGS */            \
  583.     0x10,   0x20,        /* SIREG, DIREG */        \
  584.  0x07f,                /* INDEX_REGS */        \
  585.  0x100ff,            /* GENERAL_REGS */        \
  586.   0x0100, 0x0200,        /* FP_TOP_REG, FP_SECOND_REG */    \
  587.   0xff00,            /* FLOAT_REGS */        \
  588.  0x1ffff }
  589.  
  590. /* The same information, inverted:
  591.    Return the class number of the smallest class containing
  592.    reg number REGNO.  This could be a conditional expression
  593.    or could index an array.  */
  594.  
  595. #define REGNO_REG_CLASS(REGNO) (regclass_map[REGNO])
  596.  
  597. /* When defined, the compiler allows registers explicitly used in the
  598.    rtl to be used as spill registers but prevents the compiler from
  599.    extending the lifetime of these registers. */
  600.  
  601. #define SMALL_REGISTER_CLASSES
  602.  
  603. #define QI_REG_P(X) \
  604.   (REG_P (X) && REGNO (X) < 4)
  605. #define NON_QI_REG_P(X) \
  606.   (REG_P (X) && REGNO (X) >= 4 && REGNO (X) < FIRST_PSEUDO_REGISTER)
  607.  
  608. #define FP_REG_P(X) (REG_P (X) && FP_REGNO_P (REGNO (X)))
  609. #define FP_REGNO_P(n) ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG)
  610.   
  611. #define STACK_REG_P(xop) (REG_P (xop) &&                   \
  612.               REGNO (xop) >= FIRST_STACK_REG &&    \
  613.               REGNO (xop) <= LAST_STACK_REG)
  614.  
  615. #define NON_STACK_REG_P(xop) (REG_P (xop) && ! STACK_REG_P (xop))
  616.  
  617. #define STACK_TOP_P(xop) (REG_P (xop) && REGNO (xop) == FIRST_STACK_REG)
  618.  
  619. /* Try to maintain the accuracy of the death notes for regs satisfying the
  620.    following.  Important for stack like regs, to know when to pop. */
  621.  
  622. /* #define PRESERVE_DEATH_INFO_REGNO_P(x) FP_REGNO_P(x) */
  623.  
  624. /* 1 if register REGNO can magically overlap other regs.
  625.    Note that nonzero values work only in very special circumstances. */
  626.  
  627. /* #define OVERLAPPING_REGNO_P(REGNO) FP_REGNO_P (REGNO) */
  628.  
  629. /* The class value for index registers, and the one for base regs.  */
  630.  
  631. #define INDEX_REG_CLASS INDEX_REGS
  632. #define BASE_REG_CLASS GENERAL_REGS
  633.  
  634. /* Get reg_class from a letter such as appears in the machine description.  */
  635.  
  636. #define REG_CLASS_FROM_LETTER(C)    \
  637.   ((C) == 'r' ? GENERAL_REGS :                    \
  638.    (C) == 'q' ? Q_REGS :                    \
  639.    (C) == 'f' ? (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387    \
  640.          ? FLOAT_REGS                    \
  641.          : NO_REGS) :                    \
  642.    (C) == 't' ? (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387    \
  643.          ? FP_TOP_REG                    \
  644.          : NO_REGS) :                    \
  645.    (C) == 'u' ? (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387    \
  646.          ? FP_SECOND_REG                \
  647.          : NO_REGS) :                    \
  648.    (C) == 'a' ? AREG :                        \
  649.    (C) == 'b' ? BREG :                        \
  650.    (C) == 'c' ? CREG :                        \
  651.    (C) == 'd' ? DREG :                        \
  652.    (C) == 'A' ? AD_REGS :                    \
  653.    (C) == 'D' ? DIREG :                        \
  654.    (C) == 'S' ? SIREG : NO_REGS)
  655.  
  656. /* The letters I, J, K, L and M in a register constraint string
  657.    can be used to stand for particular ranges of immediate operands.
  658.    This macro defines what the ranges are.
  659.    C is the letter, and VALUE is a constant value.
  660.    Return 1 if VALUE is in the range specified by C.
  661.  
  662.    I is for non-DImode shifts.
  663.    J is for DImode shifts.
  664.    K and L are for an `andsi' optimization.
  665.    M is for shifts that can be executed by the "lea" opcode.
  666.    */
  667.  
  668. #define CONST_OK_FOR_LETTER_P(VALUE, C)  \
  669.   ((C) == 'I' ? (VALUE) >= 0 && (VALUE) <= 31 :    \
  670.    (C) == 'J' ? (VALUE) >= 0 && (VALUE) <= 63 :    \
  671.    (C) == 'K' ? (VALUE) == 0xff :        \
  672.    (C) == 'L' ? (VALUE) == 0xffff :        \
  673.    (C) == 'M' ? (VALUE) >= 0 && (VALUE) <= 3 :    \
  674.    (C) == 'N' ? (VALUE) >= 0 && (VALUE) <= 255 :\
  675.    0)
  676.  
  677. /* Similar, but for floating constants, and defining letters G and H.
  678.    Here VALUE is the CONST_DOUBLE rtx itself.  We allow constants even if
  679.    TARGET_387 isn't set, because the stack register converter may need to
  680.    load 0.0 into the function value register. */
  681.  
  682. #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  \
  683.   ((C) == 'G' ? standard_80387_constant_p (VALUE) : 0)
  684.  
  685. /* Place additional restrictions on the register class to use when it
  686.    is necessary to be able to hold a value of mode MODE in a reload
  687.    register for which class CLASS would ordinarily be used. */
  688.  
  689. #define LIMIT_RELOAD_CLASS(MODE, CLASS) \
  690.   ((MODE) == QImode && ((CLASS) == ALL_REGS || (CLASS) == GENERAL_REGS) \
  691.    ? Q_REGS : (CLASS))
  692.  
  693. /* Given an rtx X being reloaded into a reg required to be
  694.    in class CLASS, return the class of reg to actually use.
  695.    In general this is just CLASS; but on some machines
  696.    in some cases it is preferable to use a more restrictive class.
  697.    On the 80386 series, we prevent floating constants from being
  698.    reloaded into floating registers (since no move-insn can do that)
  699.    and we ensure that QImodes aren't reloaded into the esi or edi reg.  */
  700.  
  701. /* Put float CONST_DOUBLE in the constant pool instead of fp regs.
  702.    QImode must go into class Q_REGS.
  703.    Narrow ALL_REGS to GENERAL_REGS.  This supports allowing movsf and
  704.    movdf to do mem-to-mem moves through integer regs. */
  705.  
  706. #define PREFERRED_RELOAD_CLASS(X,CLASS)    \
  707.   (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode ? NO_REGS    \
  708.    : GET_MODE (X) == QImode && ! reg_class_subset_p (CLASS, Q_REGS) ? Q_REGS \
  709.    : ((CLASS) == ALL_REGS                        \
  710.       && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) ? GENERAL_REGS    \
  711.    : (CLASS))
  712.  
  713. /* If we are copying between general and FP registers, we need a memory
  714.    location.  */
  715.  
  716. #define SECONDARY_MEMORY_NEEDED(CLASS1,CLASS2,MODE) \
  717.   ((FLOAT_CLASS_P (CLASS1) && ! FLOAT_CLASS_P (CLASS2))    \
  718.    || (! FLOAT_CLASS_P (CLASS1) && FLOAT_CLASS_P (CLASS2)))
  719.  
  720. /* Return the maximum number of consecutive registers
  721.    needed to represent mode MODE in a register of class CLASS.  */
  722. /* On the 80386, this is the size of MODE in words,
  723.    except in the FP regs, where a single reg is always enough.  */
  724. #define CLASS_MAX_NREGS(CLASS, MODE)    \
  725.  (FLOAT_CLASS_P (CLASS) ? 1 :        \
  726.   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
  727.  
  728. /* A C expression whose value is nonzero if pseudos that have been
  729.    assigned to registers of class CLASS would likely be spilled
  730.    because registers of CLASS are needed for spill registers.
  731.  
  732.    The default value of this macro returns 1 if CLASS has exactly one
  733.    register and zero otherwise.  On most machines, this default
  734.    should be used.  Only define this macro to some other expression
  735.    if pseudo allocated by `local-alloc.c' end up in memory because
  736.    their hard registers were needed for spill registers.  If this
  737.    macro returns nonzero for those classes, those pseudos will only
  738.    be allocated by `global.c', which knows how to reallocate the
  739.    pseudo to another register.  If there would not be another
  740.    register available for reallocation, you should not change the
  741.    definition of this macro since the only effect of such a
  742.    definition would be to slow down register allocation.  */
  743.  
  744. #define CLASS_LIKELY_SPILLED_P(CLASS)                    \
  745.   (((CLASS) == AREG)                            \
  746.    || ((CLASS) == DREG)                            \
  747.    || ((CLASS) == CREG)                            \
  748.    || ((CLASS) == BREG)                            \
  749.    || ((CLASS) == AD_REGS)                        \
  750.    || ((CLASS) == SIREG)                        \
  751.    || ((CLASS) == DIREG))
  752.  
  753.  
  754. /* Stack layout; function entry, exit and calling.  */
  755.  
  756. /* Define this if pushing a word on the stack
  757.    makes the stack pointer a smaller address.  */
  758. #define STACK_GROWS_DOWNWARD
  759.  
  760. /* Define this if the nominal address of the stack frame
  761.    is at the high-address end of the local variables;
  762.    that is, each additional local variable allocated
  763.    goes at a more negative offset in the frame.  */
  764. #define FRAME_GROWS_DOWNWARD
  765.  
  766. /* Offset within stack frame to start allocating local variables at.
  767.    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
  768.    first local allocated.  Otherwise, it is the offset to the BEGINNING
  769.    of the first local allocated.  */
  770. #define STARTING_FRAME_OFFSET 0
  771.  
  772. /* If we generate an insn to push BYTES bytes,
  773.    this says how many the stack pointer really advances by.
  774.    On 386 pushw decrements by exactly 2 no matter what the position was.
  775.    On the 386 there is no pushb; we use pushw instead, and this
  776.    has the effect of rounding up to 2.  */
  777.  
  778. #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & (-2))
  779.  
  780. /* Offset of first parameter from the argument pointer register value.  */
  781. #define FIRST_PARM_OFFSET(FNDECL) 0
  782.  
  783. /* Value is the number of bytes of arguments automatically
  784.    popped when returning from a subroutine call.
  785.    FUNDECL is the declaration node of the function (as a tree),
  786.    FUNTYPE is the data type of the function (as a tree),
  787.    or for a library call it is an identifier node for the subroutine name.
  788.    SIZE is the number of bytes of arguments passed on the stack.
  789.  
  790.    On the 80386, the RTD insn may be used to pop them if the number
  791.      of args is fixed, but if the number is variable then the caller
  792.      must pop them all.  RTD can't be used for library calls now
  793.      because the library is compiled with the Unix compiler.
  794.    Use of RTD is a selectable option, since it is incompatible with
  795.    standard Unix calling sequences.  If the option is not selected,
  796.    the caller must always pop the args.
  797.  
  798.    The attribute stdcall is equivalent to RTD on a per module basis.  */
  799.  
  800. #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \
  801.   (i386_return_pops_args (FUNDECL, FUNTYPE, SIZE))
  802.  
  803. /* Define how to find the value returned by a function.
  804.    VALTYPE is the data type of the value (as a tree).
  805.    If the precise function being called is known, FUNC is its FUNCTION_DECL;
  806.    otherwise, FUNC is 0.  */
  807. #define FUNCTION_VALUE(VALTYPE, FUNC)  \
  808.    gen_rtx (REG, TYPE_MODE (VALTYPE), \
  809.         VALUE_REGNO (TYPE_MODE (VALTYPE)))
  810.  
  811. /* Define how to find the value returned by a library function
  812.    assuming the value has mode MODE.  */
  813.  
  814. #define LIBCALL_VALUE(MODE) \
  815.   gen_rtx (REG, MODE, VALUE_REGNO (MODE))
  816.  
  817. /* Define the size of the result block used for communication between
  818.    untyped_call and untyped_return.  The block contains a DImode value
  819.    followed by the block used by fnsave and frstor.  */
  820.  
  821. #define APPLY_RESULT_SIZE (8+108)
  822.  
  823. /* 1 if N is a possible register number for function argument passing.  */
  824. #define FUNCTION_ARG_REGNO_P(N) ((N) >= 0 && (N) < REGPARM_MAX)
  825.  
  826. /* Define a data type for recording info about an argument list
  827.    during the scan of that argument list.  This data type should
  828.    hold all necessary information about the function itself
  829.    and about the args processed so far, enough to enable macros
  830.    such as FUNCTION_ARG to determine where the next arg should go.  */
  831.  
  832. typedef struct i386_args {
  833.   int words;            /* # words passed so far */
  834.   int nregs;            /* # registers available for passing */
  835.   int regno;            /* next available register number */
  836. } CUMULATIVE_ARGS;
  837.  
  838. /* Initialize a variable CUM of type CUMULATIVE_ARGS
  839.    for a call to a function whose data type is FNTYPE.
  840.    For a library call, FNTYPE is 0.  */
  841.  
  842. #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME)    \
  843.   (init_cumulative_args (&CUM, FNTYPE, LIBNAME))
  844.  
  845. /* Update the data in CUM to advance over an argument
  846.    of mode MODE and data type TYPE.
  847.    (TYPE is null for libcalls where that information may not be available.)  */
  848.  
  849. #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)    \
  850.   (function_arg_advance (&CUM, MODE, TYPE, NAMED))
  851.  
  852. /* Define where to put the arguments to a function.
  853.    Value is zero to push the argument on the stack,
  854.    or a hard register in which to store the argument.
  855.  
  856.    MODE is the argument's machine mode.
  857.    TYPE is the data type of the argument (as a tree).
  858.     This is null for libcalls where that information may
  859.     not be available.
  860.    CUM is a variable of type CUMULATIVE_ARGS which gives info about
  861.     the preceding args and about the function being called.
  862.    NAMED is nonzero if this argument is a named parameter
  863.     (otherwise it is an extra parameter matching an ellipsis).  */
  864.  
  865. #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
  866.   (function_arg (&CUM, MODE, TYPE, NAMED))
  867.  
  868. /* For an arg passed partly in registers and partly in memory,
  869.    this is the number of registers used.
  870.    For args passed entirely in registers or entirely in memory, zero.  */
  871.  
  872. #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
  873.   (function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED))
  874.  
  875. /* This macro generates the assembly code for function entry.
  876.    FILE is a stdio stream to output the code to.
  877.    SIZE is an int: how many units of temporary storage to allocate.
  878.    Refer to the array `regs_ever_live' to determine which registers
  879.    to save; `regs_ever_live[I]' is nonzero if register number I
  880.    is ever used in the function.  This macro is responsible for
  881.    knowing which registers should not be saved even if used.  */
  882.  
  883. #define FUNCTION_PROLOGUE(FILE, SIZE)     \
  884.   function_prologue (FILE, SIZE)
  885.  
  886. /* Output assembler code to FILE to increment profiler label # LABELNO
  887.    for profiling a function entry.  */
  888.  
  889. #define FUNCTION_PROFILER(FILE, LABELNO)  \
  890. {                                    \
  891.   if (flag_pic)                                \
  892.     {                                    \
  893.       fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n",        \
  894.            LPREFIX, (LABELNO));                    \
  895.       fprintf (FILE, "\tcall *_mcount@GOT(%%ebx)\n");            \
  896.     }                                    \
  897.   else                                    \
  898.     {                                    \
  899.       fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO));    \
  900.       fprintf (FILE, "\tcall _mcount\n");                \
  901.     }                                    \
  902. }
  903.  
  904. /* A C statement or compound statement to output to FILE some
  905.    assembler code to initialize basic-block profiling for the current
  906.    object module.  This code should call the subroutine
  907.    `__bb_init_func' once per object module, passing it as its sole
  908.    argument the address of a block allocated in the object module.
  909.  
  910.    The name of the block is a local symbol made with this statement:
  911.  
  912.     ASM_GENERATE_INTERNAL_LABEL (BUFFER, "LPBX", 0);
  913.  
  914.    Of course, since you are writing the definition of
  915.    `ASM_GENERATE_INTERNAL_LABEL' as well as that of this macro, you
  916.    can take a short cut in the definition of this macro and use the
  917.    name that you know will result.
  918.  
  919.    The first word of this block is a flag which will be nonzero if the
  920.    object module has already been initialized.  So test this word
  921.    first, and do not call `__bb_init_func' if the flag is nonzero.  */
  922.  
  923. #undef    FUNCTION_BLOCK_PROFILER
  924. #define FUNCTION_BLOCK_PROFILER(STREAM, LABELNO)            \
  925. do                                    \
  926.   {                                    \
  927.     static int num_func = 0;                        \
  928.     rtx xops[8];                            \
  929.     char block_table[80], false_label[80];                \
  930.                                     \
  931.     ASM_GENERATE_INTERNAL_LABEL (block_table, "LPBX", 0);        \
  932.     ASM_GENERATE_INTERNAL_LABEL (false_label, "LPBZ", num_func);    \
  933.                                     \
  934.     xops[0] = const0_rtx;                        \
  935.     xops[1] = gen_rtx (SYMBOL_REF, VOIDmode, block_table);        \
  936.     xops[2] = gen_rtx (MEM, Pmode, gen_rtx (SYMBOL_REF, VOIDmode, false_label)); \
  937.     xops[3] = gen_rtx (MEM, Pmode, gen_rtx (SYMBOL_REF, VOIDmode, "__bb_init_func")); \
  938.     xops[4] = gen_rtx (MEM, Pmode, xops[1]);                \
  939.     xops[5] = stack_pointer_rtx;                    \
  940.     xops[6] = GEN_INT (4);                        \
  941.     xops[7] = gen_rtx (REG, Pmode, 0);    /* eax */            \
  942.                                     \
  943.     CONSTANT_POOL_ADDRESS_P (xops[1]) = TRUE;                \
  944.     CONSTANT_POOL_ADDRESS_P (xops[2]) = TRUE;                \
  945.                                     \
  946.     output_asm_insn (AS2(cmp%L4,%0,%4), xops);                \
  947.     output_asm_insn (AS1(jne,%2), xops);                \
  948.                                     \
  949.     if (!flag_pic)                            \
  950.       output_asm_insn (AS1(push%L1,%1), xops);                \
  951.     else                                \
  952.       {                                    \
  953.     output_asm_insn (AS2 (lea%L7,%a1,%7), xops);            \
  954.     output_asm_insn (AS1 (push%L7,%7), xops);            \
  955.       }                                    \
  956.                                     \
  957.     output_asm_insn (AS1(call,%P3), xops);                \
  958.     output_asm_insn (AS2(add%L0,%6,%5), xops);                \
  959.     ASM_OUTPUT_INTERNAL_LABEL (STREAM, "LPBZ", num_func);        \
  960.     num_func++;                                \
  961.   }                                    \
  962. while (0)
  963.  
  964.  
  965. /* A C statement or compound statement to increment the count
  966.    associated with the basic block number BLOCKNO.  Basic blocks are
  967.    numbered separately from zero within each compilation.  The count
  968.    associated with block number BLOCKNO is at index BLOCKNO in a
  969.    vector of words; the name of this array is a local symbol made
  970.    with this statement:
  971.  
  972.     ASM_GENERATE_INTERNAL_LABEL (BUFFER, "LPBX", 2);
  973.  
  974.    Of course, since you are writing the definition of
  975.    `ASM_GENERATE_INTERNAL_LABEL' as well as that of this macro, you
  976.    can take a short cut in the definition of this macro and use the
  977.    name that you know will result.  */
  978.  
  979. #define BLOCK_PROFILER(STREAM, BLOCKNO)                    \
  980. do                                    \
  981.   {                                    \
  982.     rtx xops[1], cnt_rtx;                        \
  983.     char counts[80];                            \
  984.                                     \
  985.     ASM_GENERATE_INTERNAL_LABEL (counts, "LPBX", 2);            \
  986.     cnt_rtx = gen_rtx (SYMBOL_REF, VOIDmode, counts);            \
  987.     SYMBOL_REF_FLAG (cnt_rtx) = TRUE;                    \
  988.                                     \
  989.     if (BLOCKNO)                            \
  990.       cnt_rtx = plus_constant (cnt_rtx, (BLOCKNO)*4);            \
  991.                                     \
  992.     if (flag_pic)                            \
  993.       cnt_rtx = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, cnt_rtx);    \
  994.                                     \
  995.     xops[0] = gen_rtx (MEM, SImode, cnt_rtx);                \
  996.     output_asm_insn (AS1(inc%L0,%0), xops);                \
  997.   }                                    \
  998. while (0)
  999.  
  1000. /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
  1001.    the stack pointer does not matter.  The value is tested only in
  1002.    functions that have frame pointers.
  1003.    No definition is equivalent to always zero.  */
  1004. /* Note on the 386 it might be more efficient not to define this since 
  1005.    we have to restore it ourselves from the frame pointer, in order to
  1006.    use pop */
  1007.  
  1008. #define EXIT_IGNORE_STACK 1
  1009.  
  1010. /* This macro generates the assembly code for function exit,
  1011.    on machines that need it.  If FUNCTION_EPILOGUE is not defined
  1012.    then individual return instructions are generated for each
  1013.    return statement.  Args are same as for FUNCTION_PROLOGUE.
  1014.  
  1015.    The function epilogue should not depend on the current stack pointer!
  1016.    It should use the frame pointer only.  This is mandatory because
  1017.    of alloca; we also take advantage of it to omit stack adjustments
  1018.    before returning.
  1019.  
  1020.    If the last non-note insn in the function is a BARRIER, then there
  1021.    is no need to emit a function prologue, because control does not fall
  1022.    off the end.  This happens if the function ends in an "exit" call, or
  1023.    if a `return' insn is emitted directly into the function. */
  1024.  
  1025. #define FUNCTION_EPILOGUE(FILE, SIZE)         \
  1026. do {                        \
  1027.   rtx last = get_last_insn ();            \
  1028.   if (last && GET_CODE (last) == NOTE)        \
  1029.     last = prev_nonnote_insn (last);        \
  1030.   if (! last || GET_CODE (last) != BARRIER)    \
  1031.     function_epilogue (FILE, SIZE);        \
  1032. } while (0)
  1033.  
  1034. /* Output assembler code for a block containing the constant parts
  1035.    of a trampoline, leaving space for the variable parts.  */
  1036.  
  1037. /* On the 386, the trampoline contains three instructions:
  1038.      mov #STATIC,ecx
  1039.      mov #FUNCTION,eax
  1040.      jmp @eax  */
  1041. #define TRAMPOLINE_TEMPLATE(FILE)            \
  1042. {                            \
  1043.   ASM_OUTPUT_CHAR (FILE, GEN_INT (0xb9));        \
  1044.   ASM_OUTPUT_SHORT (FILE, const0_rtx);            \
  1045.   ASM_OUTPUT_SHORT (FILE, const0_rtx);            \
  1046.   ASM_OUTPUT_CHAR (FILE, GEN_INT (0xb8));        \
  1047.   ASM_OUTPUT_SHORT (FILE, const0_rtx);            \
  1048.   ASM_OUTPUT_SHORT (FILE, const0_rtx);            \
  1049.   ASM_OUTPUT_CHAR (FILE, GEN_INT (0xff));        \
  1050.   ASM_OUTPUT_CHAR (FILE, GEN_INT (0xe0));        \
  1051. }
  1052.  
  1053. /* Length in units of the trampoline for entering a nested function.  */
  1054.  
  1055. #define TRAMPOLINE_SIZE 12
  1056.  
  1057. /* Emit RTL insns to initialize the variable parts of a trampoline.
  1058.    FNADDR is an RTX for the address of the function's pure code.
  1059.    CXT is an RTX for the static chain value for the function.  */
  1060.  
  1061. #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)            \
  1062. {                                    \
  1063.   emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 1)), CXT); \
  1064.   emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 6)), FNADDR); \
  1065. }
  1066.  
  1067. /* Definitions for register eliminations.
  1068.  
  1069.    This is an array of structures.  Each structure initializes one pair
  1070.    of eliminable registers.  The "from" register number is given first,
  1071.    followed by "to".  Eliminations of the same "from" register are listed
  1072.    in order of preference.
  1073.  
  1074.    We have two registers that can be eliminated on the i386.  First, the
  1075.    frame pointer register can often be eliminated in favor of the stack
  1076.    pointer register.  Secondly, the argument pointer register can always be
  1077.    eliminated; it is replaced with either the stack or frame pointer. */
  1078.  
  1079. #define ELIMINABLE_REGS                \
  1080. {{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM},    \
  1081.  { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM},   \
  1082.  { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
  1083.  
  1084. /* Given FROM and TO register numbers, say whether this elimination is allowed.
  1085.    Frame pointer elimination is automatically handled.
  1086.  
  1087.    For the i386, if frame pointer elimination is being done, we would like to
  1088.    convert ap into sp, not fp.
  1089.  
  1090.    All other eliminations are valid.  */
  1091.  
  1092. #define CAN_ELIMINATE(FROM, TO)                    \
  1093.  ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM    \
  1094.   ? ! frame_pointer_needed                    \
  1095.   : 1)
  1096.  
  1097. /* Define the offset between two registers, one to be eliminated, and the other
  1098.    its replacement, at the start of a routine.  */
  1099.  
  1100. #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)            \
  1101. {                                    \
  1102.   if ((FROM) == ARG_POINTER_REGNUM && (TO) == FRAME_POINTER_REGNUM)    \
  1103.     (OFFSET) = 8;    /* Skip saved PC and previous frame pointer */    \
  1104.   else                                    \
  1105.     {                                    \
  1106.       int regno;                            \
  1107.       int offset = 0;                            \
  1108.                                     \
  1109.       for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)        \
  1110.     if ((regs_ever_live[regno] && ! call_used_regs[regno])        \
  1111.         || (current_function_uses_pic_offset_table            \
  1112.         && regno == PIC_OFFSET_TABLE_REGNUM))            \
  1113.       offset += 4;                            \
  1114.                                     \
  1115.       (OFFSET) = offset + get_frame_size ();                \
  1116.                                     \
  1117.       if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)    \
  1118.     (OFFSET) += 4;    /* Skip saved PC */                \
  1119.     }                                    \
  1120. }
  1121.  
  1122. /* Addressing modes, and classification of registers for them.  */
  1123.  
  1124. /* #define HAVE_POST_INCREMENT */
  1125. /* #define HAVE_POST_DECREMENT */
  1126.  
  1127. /* #define HAVE_PRE_DECREMENT */
  1128. /* #define HAVE_PRE_INCREMENT */
  1129.  
  1130. /* Macros to check register numbers against specific register classes.  */
  1131.  
  1132. /* These assume that REGNO is a hard or pseudo reg number.
  1133.    They give nonzero only if REGNO is a hard reg of the suitable class
  1134.    or a pseudo reg currently allocated to a suitable hard reg.
  1135.    Since they use reg_renumber, they are safe only once reg_renumber
  1136.    has been allocated, which happens in local-alloc.c.  */
  1137.  
  1138. #define REGNO_OK_FOR_INDEX_P(REGNO) \
  1139.   ((REGNO) < STACK_POINTER_REGNUM \
  1140.    || (unsigned) reg_renumber[REGNO] < STACK_POINTER_REGNUM)
  1141.  
  1142. #define REGNO_OK_FOR_BASE_P(REGNO) \
  1143.   ((REGNO) <= STACK_POINTER_REGNUM \
  1144.    || (REGNO) == ARG_POINTER_REGNUM \
  1145.    || (unsigned) reg_renumber[REGNO] <= STACK_POINTER_REGNUM)
  1146.  
  1147. #define REGNO_OK_FOR_SIREG_P(REGNO) ((REGNO) == 4 || reg_renumber[REGNO] == 4)
  1148. #define REGNO_OK_FOR_DIREG_P(REGNO) ((REGNO) == 5 || reg_renumber[REGNO] == 5)
  1149.  
  1150. /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
  1151.    and check its validity for a certain class.
  1152.    We have two alternate definitions for each of them.
  1153.    The usual definition accepts all pseudo regs; the other rejects
  1154.    them unless they have been allocated suitable hard regs.
  1155.    The symbol REG_OK_STRICT causes the latter definition to be used.
  1156.  
  1157.    Most source files want to accept pseudo regs in the hope that
  1158.    they will get allocated to the class that the insn wants them to be in.
  1159.    Source files for reload pass need to be strict.
  1160.    After reload, it makes no difference, since pseudo regs have
  1161.    been eliminated by then.  */
  1162.  
  1163.  
  1164. /* Non strict versions, pseudos are ok */
  1165. #define REG_OK_FOR_INDEX_NONSTRICT_P(X)                    \
  1166.   (REGNO (X) < STACK_POINTER_REGNUM                    \
  1167.    || REGNO (X) >= FIRST_PSEUDO_REGISTER)
  1168.  
  1169. #define REG_OK_FOR_BASE_NONSTRICT_P(X)                    \
  1170.   (REGNO (X) <= STACK_POINTER_REGNUM                    \
  1171.    || REGNO (X) == ARG_POINTER_REGNUM                    \
  1172.    || REGNO (X) >= FIRST_PSEUDO_REGISTER)
  1173.  
  1174. #define REG_OK_FOR_STRREG_NONSTRICT_P(X)                \
  1175.   (REGNO (X) == 4 || REGNO (X) == 5 || REGNO (X) >= FIRST_PSEUDO_REGISTER)
  1176.  
  1177. /* Strict versions, hard registers only */
  1178. #define REG_OK_FOR_INDEX_STRICT_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
  1179. #define REG_OK_FOR_BASE_STRICT_P(X)  REGNO_OK_FOR_BASE_P (REGNO (X))
  1180. #define REG_OK_FOR_STRREG_STRICT_P(X)                    \
  1181.   (REGNO_OK_FOR_DIREG_P (REGNO (X)) || REGNO_OK_FOR_SIREG_P (REGNO (X)))
  1182.  
  1183. #ifndef REG_OK_STRICT
  1184. #define REG_OK_FOR_INDEX_P(X)  REG_OK_FOR_INDEX_NONSTRICT_P(X)
  1185. #define REG_OK_FOR_BASE_P(X)   REG_OK_FOR_BASE_NONSTRICT_P(X)
  1186. #define REG_OK_FOR_STRREG_P(X) REG_OK_FOR_STRREG_NONSTRICT_P(X)
  1187.  
  1188. #else
  1189. #define REG_OK_FOR_INDEX_P(X)  REG_OK_FOR_INDEX_STRICT_P(X)
  1190. #define REG_OK_FOR_BASE_P(X)   REG_OK_FOR_BASE_STRICT_P(X)
  1191. #define REG_OK_FOR_STRREG_P(X) REG_OK_FOR_STRREG_STRICT_P(X)
  1192. #endif
  1193.  
  1194. /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
  1195.    that is a valid memory address for an instruction.
  1196.    The MODE argument is the machine mode for the MEM expression
  1197.    that wants to use this address.
  1198.  
  1199.    The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS,
  1200.    except for CONSTANT_ADDRESS_P which is usually machine-independent.
  1201.  
  1202.    See legitimize_pic_address in i386.c for details as to what
  1203.    constitutes a legitimate address when -fpic is used.  */
  1204.  
  1205. #define MAX_REGS_PER_ADDRESS 2
  1206.  
  1207. #define CONSTANT_ADDRESS_P(X)   \
  1208.   (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF        \
  1209.    || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST        \
  1210.    || GET_CODE (X) == HIGH)
  1211.  
  1212. /* Nonzero if the constant value X is a legitimate general operand.
  1213.    It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
  1214.  
  1215. #define LEGITIMATE_CONSTANT_P(X) 1
  1216.  
  1217. #ifdef REG_OK_STRICT
  1218. #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                \
  1219. {                                    \
  1220.   if (legitimate_address_p (MODE, X, 1))                \
  1221.     goto ADDR;                                \
  1222. }
  1223.  
  1224. #else
  1225. #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                \
  1226. {                                    \
  1227.   if (legitimate_address_p (MODE, X, 0))                \
  1228.     goto ADDR;                                \
  1229. }
  1230.  
  1231. #endif
  1232.  
  1233. /* Try machine-dependent ways of modifying an illegitimate address
  1234.    to be legitimate.  If we find one, return the new, valid address.
  1235.    This macro is used in only one place: `memory_address' in explow.c.
  1236.  
  1237.    OLDX is the address as it was before break_out_memory_refs was called.
  1238.    In some cases it is useful to look at this to decide what needs to be done.
  1239.  
  1240.    MODE and WIN are passed so that this macro can use
  1241.    GO_IF_LEGITIMATE_ADDRESS.
  1242.  
  1243.    It is always safe for this macro to do nothing.  It exists to recognize
  1244.    opportunities to optimize the output.
  1245.  
  1246.    For the 80386, we handle X+REG by loading X into a register R and
  1247.    using R+REG.  R will go in a general reg and indexing will be used.
  1248.    However, if REG is a broken-out memory address or multiplication,
  1249.    nothing needs to be done because REG can certainly go in a general reg.
  1250.  
  1251.    When -fpic is used, special handling is needed for symbolic references.
  1252.    See comments by legitimize_pic_address in i386.c for details.  */
  1253.  
  1254. #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)                \
  1255. {                                    \
  1256.   rtx orig_x = (X);                            \
  1257.   (X) = legitimize_address (X, OLDX, MODE);                \
  1258.   if (memory_address_p (MODE, X))                    \
  1259.     goto WIN;                                \
  1260. }
  1261.  
  1262. /* Nonzero if the constant value X is a legitimate general operand
  1263.    when generating PIC code.  It is given that flag_pic is on and 
  1264.    that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
  1265.  
  1266. #ifdef NEXT_SEMANTICS
  1267. #ifndef MACHOPIC_OPERAND_P
  1268. #define MACHOPIC_OPERAND_P(X) machopic_operand_p (X)
  1269. #endif
  1270. #define LEGITIMATE_PIC_OPERAND_P(X) \
  1271.   (! SYMBOLIC_CONST (X) || MACHOPIC_OPERAND_P (X))
  1272. #else
  1273. #define LEGITIMATE_PIC_OPERAND_P(X) \
  1274.   (! SYMBOLIC_CONST (X)                            \
  1275.    || (GET_CODE (X) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (X)))
  1276. #endif
  1277.  
  1278. #define SYMBOLIC_CONST(X)    \
  1279. (GET_CODE (X) == SYMBOL_REF                        \
  1280.  || GET_CODE (X) == LABEL_REF                        \
  1281.  || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X)))
  1282.  
  1283. /* Go to LABEL if ADDR (a legitimate address expression)
  1284.    has an effect that depends on the machine mode it is used for.
  1285.    On the 80386, only postdecrement and postincrement address depend thus
  1286.    (the amount of decrement or increment being the length of the operand).  */
  1287. #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)    \
  1288.  if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == POST_DEC) goto LABEL
  1289.  
  1290. /* Define this macro if references to a symbol must be treated
  1291.    differently depending on something about the variable or
  1292.    function named by the symbol (such as what section it is in).
  1293.  
  1294.    On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol
  1295.    so that we may access it directly in the GOT.  */
  1296.  
  1297. #define ENCODE_SECTION_INFO(DECL) \
  1298. do                                    \
  1299.   {                                    \
  1300.     if (flag_pic)                            \
  1301.       {                                    \
  1302.     rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'        \
  1303.            ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));        \
  1304.     SYMBOL_REF_FLAG (XEXP (rtl, 0))                    \
  1305.       = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'            \
  1306.          || ! TREE_PUBLIC (DECL));                    \
  1307.       }                                    \
  1308.   }                                    \
  1309. while (0)
  1310.  
  1311. /* Initialize data used by insn expanders.  This is called from
  1312.    init_emit, once for each function, before code is generated.
  1313.    For 386, clear stack slot assignments remembered from previous
  1314.    functions. */
  1315.  
  1316. #define INIT_EXPANDERS clear_386_stack_locals ()
  1317.  
  1318. /* The `FINALIZE_PIC' macro serves as a hook to emit these special
  1319.    codes once the function is being compiled into assembly code, but
  1320.    not before.  (It is not done before, because in the case of
  1321.    compiling an inline function, it would lead to multiple PIC
  1322.    prologues being included in functions which used inline functions
  1323.    and were compiled to assembly language.)  */
  1324.  
  1325. #define FINALIZE_PIC                            \
  1326. do                                    \
  1327.   {                                    \
  1328.     extern int current_function_uses_pic_offset_table;            \
  1329.                                     \
  1330.     current_function_uses_pic_offset_table |= profile_flag | profile_block_flag; \
  1331.   }                                    \
  1332. while (0)
  1333.  
  1334.  
  1335. /* If defined, a C expression whose value is nonzero if IDENTIFIER
  1336.    with arguments ARGS is a valid machine specific attribute for DECL.
  1337.    The attributes in ATTRIBUTES have previously been assigned to DECL.  */
  1338.  
  1339. #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, NAME, ARGS) \
  1340.   (i386_valid_decl_attribute_p (DECL, ATTRIBUTES, NAME, ARGS))
  1341.  
  1342. /* If defined, a C expression whose value is nonzero if IDENTIFIER
  1343.    with arguments ARGS is a valid machine specific attribute for TYPE.
  1344.    The attributes in ATTRIBUTES have previously been assigned to TYPE.  */
  1345.  
  1346. #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, NAME, ARGS) \
  1347.   (i386_valid_type_attribute_p (TYPE, ATTRIBUTES, NAME, ARGS))
  1348.  
  1349. /* If defined, a C expression whose value is zero if the attributes on
  1350.    TYPE1 and TYPE2 are incompatible, one if they are compatible, and
  1351.    two if they are nearly compatible (which causes a warning to be
  1352.    generated).  */
  1353.  
  1354. #define COMP_TYPE_ATTRIBUTES(TYPE1, TYPE2) \
  1355.   (i386_comp_type_attributes (TYPE1, TYPE2))
  1356.  
  1357. /* If defined, a C statement that assigns default attributes to newly
  1358.    defined TYPE.  */
  1359.  
  1360. /* #define SET_DEFAULT_TYPE_ATTRIBUTES (TYPE) */
  1361.  
  1362. /* Max number of args passed in registers.  If this is more than 3, we will
  1363.    have problems with ebx (register #4), since it is a caller save register and
  1364.    is also used as the pic register in ELF.  So for now, don't allow more than
  1365.    3 registers to be passed in registers.  */
  1366.  
  1367. #define REGPARM_MAX 3
  1368.  
  1369.  
  1370. /* Specify the machine mode that this machine uses
  1371.    for the index in the tablejump instruction.  */
  1372. #define CASE_VECTOR_MODE Pmode
  1373.  
  1374. /* Define this if the tablejump instruction expects the table
  1375.    to contain offsets from the address of the table.
  1376.    Do not define this if the table should contain absolute addresses.  */
  1377. /* #define CASE_VECTOR_PC_RELATIVE */
  1378.  
  1379. /* Specify the tree operation to be used to convert reals to integers.
  1380.    This should be changed to take advantage of fist --wfs ??
  1381.  */
  1382. #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
  1383.  
  1384. /* This is the kind of divide that is easiest to do in the general case.  */
  1385. #define EASY_DIV_EXPR TRUNC_DIV_EXPR
  1386.  
  1387. /* Define this as 1 if `char' should by default be signed; else as 0.  */
  1388. #define DEFAULT_SIGNED_CHAR 1
  1389.  
  1390. /* Max number of bytes we can move from memory to memory
  1391.    in one reasonably fast instruction.  */
  1392. #define MOVE_MAX 4
  1393.  
  1394. /* MOVE_RATIO is the number of move instructions that is better than a
  1395.    block move.  Make this large on i386, since the block move is very
  1396.    inefficient with small blocks, and the hard register needs of the
  1397.    block move require much reload work. */
  1398. #define MOVE_RATIO 5
  1399.  
  1400. /* Define this if zero-extension is slow (more than one real instruction).  */
  1401. /* #define SLOW_ZERO_EXTEND */
  1402.  
  1403. /* Nonzero if access to memory by bytes is slow and undesirable.  */
  1404. #define SLOW_BYTE_ACCESS 0
  1405.  
  1406. /* Define if shifts truncate the shift count
  1407.    which implies one can omit a sign-extension or zero-extension
  1408.    of a shift count.  */
  1409. /* One i386, shifts do truncate the count.  But bit opcodes don't. */
  1410.  
  1411. /* #define SHIFT_COUNT_TRUNCATED */
  1412.  
  1413. /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
  1414.    is done just by pretending it is already truncated.  */
  1415. #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
  1416.  
  1417. /* We assume that the store-condition-codes instructions store 0 for false
  1418.    and some other value for true.  This is the value stored for true.  */
  1419.  
  1420. #define STORE_FLAG_VALUE 1
  1421.  
  1422. /* When a prototype says `char' or `short', really pass an `int'.
  1423.    (The 386 can't easily push less than an int.)  */
  1424.  
  1425. #define PROMOTE_PROTOTYPES
  1426.  
  1427. /* Specify the machine mode that pointers have.
  1428.    After generation of rtl, the compiler makes no further distinction
  1429.    between pointers and any other objects of this machine mode.  */
  1430. #define Pmode SImode
  1431.  
  1432. /* A function address in a call instruction
  1433.    is a byte address (for indexing purposes)
  1434.    so give the MEM rtx a byte's mode.  */
  1435. #define FUNCTION_MODE QImode
  1436.  
  1437. /* Define this if addresses of constant functions
  1438.    shouldn't be put through pseudo regs where they can be cse'd.
  1439.    Desirable on the 386 because a CALL with a constant address is
  1440.    not much slower than one with a register address.  On a 486,
  1441.    it is faster to call with a constant address than indirect.  */
  1442. #define NO_FUNCTION_CSE
  1443.  
  1444. /* Provide the costs of a rtl expression.  This is in the body of a
  1445.    switch on CODE. */
  1446.  
  1447. #define RTX_COSTS(X,CODE,OUTER_CODE)                \
  1448.   case MULT:                            \
  1449.     return COSTS_N_INSNS (20);                    \
  1450.   case DIV:                            \
  1451.   case UDIV:                            \
  1452.   case MOD:                            \
  1453.   case UMOD:                            \
  1454.     return COSTS_N_INSNS (20);                    \
  1455.   case ASHIFTRT:                        \
  1456.   case LSHIFTRT:                        \
  1457.   case ASHIFT:                            \
  1458.     return (4 + rtx_cost (XEXP (X, 0), OUTER_CODE)        \
  1459.         + rtx_cost (XEXP (X, 1), OUTER_CODE));        \
  1460.   case PLUS:                            \
  1461.     if (GET_CODE (XEXP (X, 0)) == MULT                \
  1462.     && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT    \
  1463.     && (INTVAL (XEXP (XEXP (X, 0), 1)) == 2            \
  1464.         || INTVAL (XEXP (XEXP (X, 0), 1)) == 4        \
  1465.         || INTVAL (XEXP (XEXP (X, 0), 1)) == 8))        \
  1466.       return (2 + rtx_cost (XEXP (XEXP (X, 0), 0), OUTER_CODE)    \
  1467.           + rtx_cost (XEXP (X, 1), OUTER_CODE));        \
  1468.     break;
  1469.  
  1470.  
  1471. /* Compute the cost of computing a constant rtl expression RTX
  1472.    whose rtx-code is CODE.  The body of this macro is a portion
  1473.    of a switch statement.  If the code is computed here,
  1474.    return it with a return statement.  Otherwise, break from the switch.  */
  1475.  
  1476. #define CONST_COSTS(RTX,CODE,OUTER_CODE) \
  1477.   case CONST_INT:                        \
  1478.   case CONST:                            \
  1479.   case LABEL_REF:                        \
  1480.   case SYMBOL_REF:                        \
  1481.     return flag_pic && SYMBOLIC_CONST (RTX) ? 2 : 0;        \
  1482.   case CONST_DOUBLE:                        \
  1483.     {                                \
  1484.       int code;                            \
  1485.       if (GET_MODE (RTX) == VOIDmode)                \
  1486.     return 2;                        \
  1487.       code = standard_80387_constant_p (RTX);            \
  1488.       return code == 1 ? 0 :                    \
  1489.          code == 2 ? 1 :                    \
  1490.              2;                    \
  1491.     }
  1492.  
  1493. /* Compute the cost of an address.  This is meant to approximate the size
  1494.    and/or execution delay of an insn using that address.  If the cost is
  1495.    approximated by the RTL complexity, including CONST_COSTS above, as
  1496.    is usually the case for CISC machines, this macro should not be defined.
  1497.    For aggressively RISCy machines, only one insn format is allowed, so
  1498.    this macro should be a constant.  The value of this macro only matters
  1499.    for valid addresses.
  1500.  
  1501.    For i386, it is better to use a complex address than let gcc copy
  1502.    the address into a reg and make a new pseudo.  But not if the address
  1503.    requires to two regs - that would mean more pseudos with longer
  1504.    lifetimes.  */
  1505.  
  1506. #define ADDRESS_COST(RTX) \
  1507.   ((CONSTANT_P (RTX)                        \
  1508.     || (GET_CODE (RTX) == PLUS && CONSTANT_P (XEXP (RTX, 1))    \
  1509.     && REG_P (XEXP (RTX, 0)))) ? 0                \
  1510.    : REG_P (RTX) ? 1                        \
  1511.    : 2)
  1512.  
  1513. /* Add any extra modes needed to represent the condition code.
  1514.  
  1515.    For the i386, we need separate modes when floating-point equality
  1516.    comparisons are being done.  */
  1517.  
  1518. #define EXTRA_CC_MODES CCFPEQmode
  1519.  
  1520. /* Define the names for the modes specified above.  */
  1521. #define EXTRA_CC_NAMES "CCFPEQ"
  1522.  
  1523. /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
  1524.    return the mode to be used for the comparison.
  1525.  
  1526.    For floating-point equality comparisons, CCFPEQmode should be used.
  1527.    VOIDmode should be used in all other cases.  */
  1528.  
  1529. #define SELECT_CC_MODE(OP,X,Y) \
  1530.   (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT            \
  1531.    && ((OP) == EQ || (OP) == NE) ? CCFPEQmode : VOIDmode)
  1532.  
  1533. /* Define the information needed to generate branch and scc insns.  This is
  1534.    stored from the compare operation.  Note that we can't use "rtx" here
  1535.    since it hasn't been defined!  */
  1536.  
  1537. extern struct rtx_def *(*i386_compare_gen)(), *(*i386_compare_gen_eq)();
  1538.  
  1539. /* Tell final.c how to eliminate redundant test instructions.  */
  1540.  
  1541. /* Here we define machine-dependent flags and fields in cc_status
  1542.    (see `conditions.h').  */
  1543.  
  1544. /* Set if the cc value is actually in the 80387, so a floating point
  1545.    conditional branch must be output.  */
  1546. #define CC_IN_80387 04000
  1547.  
  1548. /* Set if the CC value was stored in a nonstandard way, so that
  1549.    the state of equality is indicated by zero in the carry bit.  */
  1550. #define CC_Z_IN_NOT_C 010000
  1551.  
  1552. /* Store in cc_status the expressions
  1553.    that the condition codes will describe
  1554.    after execution of an instruction whose pattern is EXP.
  1555.    Do not alter them if the instruction would not alter the cc's.  */
  1556.  
  1557. #define NOTICE_UPDATE_CC(EXP, INSN) \
  1558.   notice_update_cc((EXP))
  1559.  
  1560. /* Output a signed jump insn.  Use template NORMAL ordinarily, or
  1561.    FLOAT following a floating point comparison.
  1562.    Use NO_OV following an arithmetic insn that set the cc's
  1563.    before a test insn that was deleted.
  1564.    NO_OV may be zero, meaning final should reinsert the test insn
  1565.    because the jump cannot be handled properly without it.  */
  1566.  
  1567. #define OUTPUT_JUMP(NORMAL, FLOAT, NO_OV)            \
  1568. {                                \
  1569.   if (cc_prev_status.flags & CC_IN_80387)            \
  1570.     return FLOAT;                        \
  1571.   if (cc_prev_status.flags & CC_NO_OVERFLOW)            \
  1572.     return NO_OV;                        \
  1573.   return NORMAL;                        \
  1574. }
  1575.  
  1576. /* Control the assembler format that we output, to the extent
  1577.    this does not vary between assemblers.  */
  1578.  
  1579. /* How to refer to registers in assembler output.
  1580.    This sequence is indexed by compiler's hard-register-number (see above). */
  1581.  
  1582. /* In order to refer to the first 8 regs as 32 bit regs prefix an "e"
  1583.    For non floating point regs, the following are the HImode names.
  1584.  
  1585.    For float regs, the stack top is sometimes referred to as "%st(0)"
  1586.    instead of just "%st".  PRINT_REG handles this with the "y" code.  */
  1587.  
  1588. #define HI_REGISTER_NAMES \
  1589. {"ax","dx","cx","bx","si","di","bp","sp",          \
  1590.  "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)","" }
  1591.  
  1592. #define REGISTER_NAMES HI_REGISTER_NAMES
  1593.  
  1594. /* Table of additional register names to use in user input.  */
  1595.  
  1596. #define ADDITIONAL_REGISTER_NAMES \
  1597. { "eax", 0, "edx", 1, "ecx", 2, "ebx", 3,    \
  1598.   "esi", 4, "edi", 5, "ebp", 6, "esp", 7,    \
  1599.   "al", 0, "dl", 1, "cl", 2, "bl", 3,        \
  1600.   "ah", 0, "dh", 1, "ch", 2, "bh", 3 }
  1601.  
  1602. /* Note we are omitting these since currently I don't know how
  1603. to get gcc to use these, since they want the same but different
  1604. number as al, and ax.
  1605. */
  1606.  
  1607. /* note the last four are not really qi_registers, but
  1608.    the md will have to never output movb into one of them
  1609.    only a movw .  There is no movb into the last four regs */
  1610.  
  1611. #define QI_REGISTER_NAMES \
  1612. {"al", "dl", "cl", "bl", "si", "di", "bp", "sp",}
  1613.  
  1614. /* These parallel the array above, and can be used to access bits 8:15
  1615.    of regs 0 through 3. */
  1616.  
  1617. #define QI_HIGH_REGISTER_NAMES \
  1618. {"ah", "dh", "ch", "bh", }
  1619.  
  1620. /* How to renumber registers for dbx and gdb.  */
  1621.  
  1622. /* {0,2,1,3,6,7,4,5,12,13,14,15,16,17}  */
  1623. #define DBX_REGISTER_NUMBER(n) \
  1624. ((n) == 0 ? 0 : \
  1625.  (n) == 1 ? 2 : \
  1626.  (n) == 2 ? 1 : \
  1627.  (n) == 3 ? 3 : \
  1628.  (n) == 4 ? 6 : \
  1629.  (n) == 5 ? 7 : \
  1630.  (n) == 6 ? 4 : \
  1631.  (n) == 7 ? 5 : \
  1632.  (n) + 4)
  1633.  
  1634. /* This is how to output the definition of a user-level label named NAME,
  1635.    such as the label on a static function or variable NAME.  */
  1636.  
  1637. #define ASM_OUTPUT_LABEL(FILE,NAME)    \
  1638.   (assemble_name (FILE, NAME), fputs (":\n", FILE))
  1639.  
  1640. /* This is how to output an assembler line defining a `double' constant.  */
  1641.  
  1642. #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                    \
  1643. do { long l[2];                                \
  1644.      REAL_VALUE_TO_TARGET_DOUBLE (VALUE, l);                \
  1645.      if (sizeof (int) == sizeof (long))                    \
  1646.        fprintf (FILE, "%s 0x%x,0x%x\n", ASM_LONG, l[0], l[1]);        \
  1647.      else                                \
  1648.        fprintf (FILE, "%s 0x%lx,0x%lx\n", ASM_LONG, l[0], l[1]);    \
  1649.    } while (0)
  1650.  
  1651. /* This is how to output a `long double' extended real constant. */
  1652.  
  1653. #undef ASM_OUTPUT_LONG_DOUBLE
  1654. #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE)          \
  1655. do { long l[3];                        \
  1656.      REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l);    \
  1657.      if (sizeof (int) == sizeof (long))            \
  1658.        fprintf (FILE, "%s 0x%x,0x%x,0x%x\n", ASM_LONG, l[0], l[1], l[2]); \
  1659.      else                        \
  1660.        fprintf (FILE, "%s 0x%lx,0x%lx,0x%lx\n", ASM_LONG, l[0], l[1], l[2]); \
  1661.    } while (0)
  1662.  
  1663. /* This is how to output an assembler line defining a `float' constant.  */
  1664.  
  1665. #define ASM_OUTPUT_FLOAT(FILE,VALUE)            \
  1666. do { long l;                        \
  1667.      REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);        \
  1668.      if (sizeof (int) == sizeof (long))            \
  1669.        fprintf ((FILE), "%s 0x%x\n", ASM_LONG, l);    \
  1670.      else                        \
  1671.        fprintf ((FILE), "%s 0x%lx\n", ASM_LONG, l);    \
  1672.    } while (0)
  1673.  
  1674. /* Store in OUTPUT a string (made with alloca) containing
  1675.    an assembler-name for a local static variable named NAME.
  1676.    LABELNO is an integer which is different for each call.  */
  1677.  
  1678. #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)    \
  1679. ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),    \
  1680.   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
  1681.  
  1682.  
  1683.  
  1684. /* This is how to output an assembler line defining an `int' constant.  */
  1685.  
  1686. #define ASM_OUTPUT_INT(FILE,VALUE)  \
  1687. ( fprintf (FILE, "%s ", ASM_LONG),        \
  1688.   output_addr_const (FILE,(VALUE)),        \
  1689.   putc('\n',FILE))
  1690.  
  1691. /* Likewise for `char' and `short' constants.  */
  1692. /* is this supposed to do align too?? */
  1693.  
  1694. #define ASM_OUTPUT_SHORT(FILE,VALUE)  \
  1695. ( fprintf (FILE, "%s ", ASM_SHORT),        \
  1696.   output_addr_const (FILE,(VALUE)),        \
  1697.   putc('\n',FILE))
  1698.  
  1699. /*
  1700. #define ASM_OUTPUT_SHORT(FILE,VALUE)  \
  1701. ( fprintf (FILE, "%s ", ASM_BYTE_OP),        \
  1702.   output_addr_const (FILE,(VALUE)),        \
  1703.   fputs (",", FILE),                      \
  1704.   output_addr_const (FILE,(VALUE)),        \
  1705.   fputs (" >> 8\n",FILE))
  1706. */
  1707.  
  1708.  
  1709. #define ASM_OUTPUT_CHAR(FILE,VALUE)  \
  1710. ( fprintf (FILE, "%s ", ASM_BYTE_OP),        \
  1711.   output_addr_const (FILE, (VALUE)),        \
  1712.   putc ('\n', FILE))
  1713.  
  1714. /* This is how to output an assembler line for a numeric constant byte.  */
  1715.  
  1716. #define ASM_OUTPUT_BYTE(FILE,VALUE)  \
  1717.   fprintf ((FILE), "%s 0x%x\n", ASM_BYTE_OP, (VALUE))
  1718.  
  1719. /* This is how to output an insn to push a register on the stack.
  1720.    It need not be very fast code.  */
  1721.  
  1722. #define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \
  1723.   fprintf (FILE, "\tpushl e%s\n", reg_names[REGNO])
  1724.  
  1725. /* This is how to output an insn to pop a register from the stack.
  1726.    It need not be very fast code.  */
  1727.  
  1728. #define ASM_OUTPUT_REG_POP(FILE,REGNO)  \
  1729.   fprintf (FILE, "\tpopl e%s\n", reg_names[REGNO])
  1730.  
  1731. /* This is how to output an element of a case-vector that is absolute.
  1732.      */
  1733.  
  1734. #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
  1735.   fprintf (FILE, "%s %s%d\n", ASM_LONG, LPREFIX, VALUE)
  1736.  
  1737. /* This is how to output an element of a case-vector that is relative.
  1738.    We don't use these on the 386 yet, because the ATT assembler can't do
  1739.    forward reference the differences.  
  1740.  */
  1741.  
  1742. #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
  1743.   fprintf (FILE, "\t.word %s%d-%s%d\n",LPREFIX, VALUE,LPREFIX, REL)
  1744.  
  1745. /* Define the parentheses used to group arithmetic operations
  1746.    in assembler code.  */
  1747.  
  1748. #define ASM_OPEN_PAREN ""
  1749. #define ASM_CLOSE_PAREN ""
  1750.  
  1751. /* Define results of standard character escape sequences.  */
  1752. #define TARGET_BELL 007
  1753. #define TARGET_BS 010
  1754. #define TARGET_TAB 011
  1755. #define TARGET_NEWLINE 012
  1756. #define TARGET_VT 013
  1757. #define TARGET_FF 014
  1758. #define TARGET_CR 015
  1759.  
  1760. /* Print operand X (an rtx) in assembler syntax to file FILE.
  1761.    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
  1762.    The CODE z takes the size of operand from the following digit, and
  1763.    outputs b,w,or l respectively.
  1764.  
  1765.    On the 80386, we use several such letters:
  1766.    f -- float insn (print a CONST_DOUBLE as a float rather than in hex).
  1767.    L,W,B,Q,S,T -- print the opcode suffix for specified size of operand.
  1768.    R -- print the prefix for register names.
  1769.    z -- print the opcode suffix for the size of the current operand.
  1770.    * -- print a star (in certain assembler syntax)
  1771.    w -- print the operand as if it's a "word" (HImode) even if it isn't.
  1772.    b -- print the operand as if it's a byte (QImode) even if it isn't.
  1773.    c -- don't print special prefixes before constant operands.  */
  1774.  
  1775. #define PRINT_OPERAND_PUNCT_VALID_P(CODE)                \
  1776.   ((CODE) == '*')
  1777.  
  1778. /* Print the name of a register based on its machine mode and number.
  1779.    If CODE is 'w', pretend the mode is HImode.
  1780.    If CODE is 'b', pretend the mode is QImode.
  1781.    If CODE is 'k', pretend the mode is SImode.
  1782.    If CODE is 'h', pretend the reg is the `high' byte register.
  1783.    If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op. */
  1784.  
  1785. extern char *hi_reg_name[];
  1786. extern char *qi_reg_name[];
  1787. extern char *qi_high_reg_name[];
  1788.  
  1789. #define PRINT_REG(X, CODE, FILE) \
  1790.   do { if (REGNO (X) == ARG_POINTER_REGNUM)        \
  1791.      abort ();                    \
  1792.        fprintf (FILE, "%s", RP);            \
  1793.        switch ((CODE == 'w' ? 2             \
  1794.         : CODE == 'b' ? 1            \
  1795.         : CODE == 'k' ? 4            \
  1796.         : CODE == 'y' ? 3            \
  1797.         : CODE == 'h' ? 0            \
  1798.         : GET_MODE_SIZE (GET_MODE (X))))    \
  1799.      {                        \
  1800.      case 3:                    \
  1801.        if (STACK_TOP_P (X))                \
  1802.          {                        \
  1803.            fputs ("st(0)", FILE);            \
  1804.            break;                    \
  1805.          }                        \
  1806.      case 4:                    \
  1807.      case 8:                    \
  1808.      case 12:                    \
  1809.        if (! FP_REG_P (X)) fputs ("e", FILE);    \
  1810.      case 2:                    \
  1811.        fputs (hi_reg_name[REGNO (X)], FILE);    \
  1812.        break;                    \
  1813.      case 1:                    \
  1814.        fputs (qi_reg_name[REGNO (X)], FILE);    \
  1815.        break;                    \
  1816.      case 0:                    \
  1817.        fputs (qi_high_reg_name[REGNO (X)], FILE);    \
  1818.        break;                    \
  1819.      }                        \
  1820.      } while (0)
  1821.  
  1822. #define PRINT_OPERAND(FILE, X, CODE)  \
  1823.   print_operand (FILE, X, CODE)
  1824.  
  1825. #define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \
  1826.   print_operand_address (FILE, ADDR)
  1827.  
  1828. /* Print the name of a register for based on its machine mode and number.
  1829.    This macro is used to print debugging output.
  1830.    This macro is different from PRINT_REG in that it may be used in
  1831.    programs that are not linked with aux-output.o.  */
  1832.  
  1833. #define DEBUG_PRINT_REG(X, CODE, FILE) \
  1834.   do { static char *hi_name[] = HI_REGISTER_NAMES;    \
  1835.        static char *qi_name[] = QI_REGISTER_NAMES;    \
  1836.        fprintf (FILE, "%d %s", REGNO (X), RP);    \
  1837.        if (REGNO (X) == ARG_POINTER_REGNUM)        \
  1838.      { fputs ("argp", FILE); break; }        \
  1839.        if (STACK_TOP_P (X))                \
  1840.      { fputs ("st(0)", FILE); break; }        \
  1841.        if (FP_REG_P (X))                \
  1842.      { fputs (hi_name[REGNO(X)], FILE); break; }    \
  1843.        switch (GET_MODE_SIZE (GET_MODE (X)))        \
  1844.      {                        \
  1845.      default:                    \
  1846.        fputs ("e", FILE);                \
  1847.      case 2:                    \
  1848.        fputs (hi_name[REGNO (X)], FILE);        \
  1849.        break;                    \
  1850.      case 1:                    \
  1851.        fputs (qi_name[REGNO (X)], FILE);        \
  1852.        break;                    \
  1853.      }                        \
  1854.      } while (0)
  1855.  
  1856. /* Output the prefix for an immediate operand, or for an offset operand.  */
  1857. #define PRINT_IMMED_PREFIX(FILE)  fputs (IP, (FILE))
  1858. #define PRINT_OFFSET_PREFIX(FILE)  fputs (IP, (FILE))
  1859.  
  1860. /* Routines in libgcc that return floats must return them in an fp reg,
  1861.    just as other functions do which return such values.
  1862.    These macros make that happen.  */
  1863.  
  1864. #define FLOAT_VALUE_TYPE float
  1865. #define INTIFY(FLOATVAL) FLOATVAL
  1866.  
  1867. /* Nonzero if INSN magically clobbers register REGNO.  */
  1868.  
  1869. /* #define INSN_CLOBBERS_REGNO_P(INSN, REGNO)    \
  1870.     (FP_REGNO_P (REGNO)                \
  1871.      && (GET_CODE (INSN) == JUMP_INSN || GET_CODE (INSN) == BARRIER))
  1872. */
  1873.  
  1874. /* a letter which is not needed by the normal asm syntax, which
  1875.    we can use for operand syntax in the extended asm */
  1876.  
  1877. #define ASM_OPERAND_LETTER '#'
  1878.  
  1879. #define RET return ""
  1880. #define AT_SP(mode) (gen_rtx (MEM, (mode), stack_pointer_rtx))
  1881.  
  1882. #ifdef NEXT_SEMANTICS
  1883. /* Floating point precision control. 
  1884.  
  1885.    Define this to a nonzero value if a fppc pass should be performed
  1886.    by default.  -fno-fppc can then be used to turn off the extra pass.
  1887.    For i386, this pass assures full ieee compliance for floating point
  1888.    SF and DF operations, by setting the proper rounding mode to that of 
  1889.    the insn (either single or double), and not extended as it will
  1890.    usually be.  */ 
  1891.  
  1892. /* #define DEFAULT_FPPC */
  1893.  
  1894. /* These are the same order as the fppc attribute.  */
  1895. #define FPPC_STATES SINGLE, DOUBLE, CONFLICT
  1896.  
  1897. /* Record the local variable used to manipulate the FPCR and the last insn
  1898.    that needs to have the precision control set to single precision.  */
  1899.  
  1900. #define FPPC_INFO struct { rtx var, insn; }
  1901.  
  1902. #define FPPC_INFO_INIT(INFO, FIRST)             \
  1903.   do {                            \
  1904.     if (FIRST)                        \
  1905.       (INFO).var = assign_stack_local (HImode, 2, 0);    \
  1906.     (INFO).insn = 0;                    \
  1907.   } while (0)
  1908.  
  1909. #define FPPC_CLASSIFY_INSN(INSN)             \
  1910.   (recog_memoized (INSN) < 0                 \
  1911.    ? NONE                         \
  1912.    : (enum fppc_state) ((int) get_attr_fppc (INSN) - FPPC_SINGLE + SINGLE))
  1913.  
  1914. /* A transition to SINGLE records INSN as the last insn needing single
  1915.    precision.  If the previous state wasn't SINGLE, make it so.  Otherwise,
  1916.    a transition from SINGLE (to something else) switches the precision
  1917.    control after the last insn.  */
  1918. #define FPPC_SET_STATE(FROM_STATE, TO_STATE, INSN, INFO)            \
  1919.   {                                    \
  1920.     if (TO_STATE == SINGLE)                        \
  1921.       {                                    \
  1922.     (INFO).insn = INSN;                        \
  1923.     if (FROM_STATE != SINGLE)                    \
  1924.       emit_insn_before (gen_fppc_switch ((INFO).var), INSN);    \
  1925.       }                                    \
  1926.     else if (FROM_STATE == SINGLE)                    \
  1927.       {                                    \
  1928.     emit_insn_after (gen_fppc_switch ((INFO).var), (INFO).insn);    \
  1929.     (INFO).insn = 0;                        \
  1930.       }                                    \
  1931.   }
  1932. #endif
  1933.  
  1934. /* Functions in i386.c */
  1935. extern void override_options ();
  1936. extern void order_regs_for_local_alloc ();
  1937. extern int i386_valid_decl_attribute_p ();
  1938. extern int i386_valid_type_attribute_p ();
  1939. extern int i386_return_pops_args ();
  1940. extern int i386_comp_type_attributes ();
  1941. extern void init_cumulative_args ();
  1942. extern void function_arg_advance ();
  1943. extern struct rtx_def *function_arg ();
  1944. extern int function_arg_partial_nregs ();
  1945. extern void output_op_from_reg ();
  1946. extern void output_to_reg ();
  1947. extern char *singlemove_string ();
  1948. extern char *output_move_double ();
  1949. extern char *output_move_memory ();
  1950. extern char *output_move_pushmem ();
  1951. extern int standard_80387_constant_p ();
  1952. extern char *output_move_const_single ();
  1953. extern int symbolic_operand ();
  1954. extern int call_insn_operand ();
  1955. extern int expander_call_insn_operand ();
  1956. extern int symbolic_reference_mentioned_p ();
  1957. extern void emit_pic_move ();
  1958. extern void function_prologue ();
  1959. extern int simple_386_epilogue ();
  1960. extern void function_epilogue ();
  1961. extern int legitimate_address_p ();
  1962. extern struct rtx_def *legitimize_pic_address ();
  1963. extern struct rtx_def *legitimize_address ();
  1964. extern void print_operand ();
  1965. extern void print_operand_address ();
  1966. extern void notice_update_cc ();
  1967. extern void split_di ();
  1968. extern int binary_387_op ();
  1969. extern int shift_op ();
  1970. extern int VOIDmode_compare_op ();
  1971. extern char *output_387_binary_op ();
  1972. extern char *output_fix_trunc ();
  1973. extern char *output_float_compare ();
  1974. extern char *output_fp_cc0_set ();
  1975. extern void save_386_machine_status ();
  1976. extern void restore_386_machine_status ();
  1977. extern void clear_386_stack_locals ();
  1978. extern struct rtx_def *assign_386_stack_local ();
  1979.  
  1980. /* Variables in i386.c */
  1981. extern char *i386_reg_alloc_order;        /* register allocation order */
  1982. extern char *i386_regparm_string;        /* # registers to use to pass args */
  1983. extern char *i386_align_loops_string;        /* power of two alignment for loops */
  1984. extern char *i386_align_jumps_string;        /* power of two alignment for non-loop jumps */
  1985. extern char *i386_align_funcs_string;        /* power of two alignment for functions */
  1986. extern int i386_regparm;            /* i386_regparm_string as a number */
  1987. extern int i386_align_loops;            /* power of two alignment for loops */
  1988. extern int i386_align_jumps;            /* power of two alignment for non-loop jumps */
  1989. extern int i386_align_funcs;            /* power of two alignment for functions */
  1990. extern char *hi_reg_name[];            /* names for 16 bit regs */
  1991. extern char *qi_reg_name[];            /* names for 8 bit regs (low) */
  1992. extern char *qi_high_reg_name[];        /* names for 8 bit regs (high) */
  1993. extern enum reg_class regclass_map[];        /* smalled class containing REGNO */
  1994. extern struct rtx_def *i386_compare_op0;    /* operand 0 for comparisons */
  1995. extern struct rtx_def *i386_compare_op1;    /* operand 1 for comparisons */
  1996.  
  1997. /* External variables used */
  1998. extern int optimize;            /* optimization level */
  1999. extern int obey_regdecls;        /* TRUE if stupid register allocation */
  2000.  
  2001. /* External functions used */
  2002. extern struct rtx_def *force_operand ();
  2003.  
  2004. /*
  2005. Local variables:
  2006. version-control: t
  2007. End:
  2008. */
  2009.