1*c87b03e5Sespie /* Communication between reload.c and reload1.c. 2*c87b03e5Sespie Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 3*c87b03e5Sespie 1999, 2000, 2001 Free Software Foundation, Inc. 4*c87b03e5Sespie 5*c87b03e5Sespie This file is part of GCC. 6*c87b03e5Sespie 7*c87b03e5Sespie GCC is free software; you can redistribute it and/or modify it under 8*c87b03e5Sespie the terms of the GNU General Public License as published by the Free 9*c87b03e5Sespie Software Foundation; either version 2, or (at your option) any later 10*c87b03e5Sespie version. 11*c87b03e5Sespie 12*c87b03e5Sespie GCC is distributed in the hope that it will be useful, but WITHOUT ANY 13*c87b03e5Sespie WARRANTY; without even the implied warranty of MERCHANTABILITY or 14*c87b03e5Sespie FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15*c87b03e5Sespie for more details. 16*c87b03e5Sespie 17*c87b03e5Sespie You should have received a copy of the GNU General Public License 18*c87b03e5Sespie along with GCC; see the file COPYING. If not, write to the Free 19*c87b03e5Sespie Software Foundation, 59 Temple Place - Suite 330, Boston, MA 20*c87b03e5Sespie 02111-1307, USA. */ 21*c87b03e5Sespie 22*c87b03e5Sespie 23*c87b03e5Sespie /* If secondary reloads are the same for inputs and outputs, define those 24*c87b03e5Sespie macros here. */ 25*c87b03e5Sespie 26*c87b03e5Sespie #ifdef SECONDARY_RELOAD_CLASS 27*c87b03e5Sespie #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ 28*c87b03e5Sespie SECONDARY_RELOAD_CLASS (CLASS, MODE, X) 29*c87b03e5Sespie #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ 30*c87b03e5Sespie SECONDARY_RELOAD_CLASS (CLASS, MODE, X) 31*c87b03e5Sespie #endif 32*c87b03e5Sespie 33*c87b03e5Sespie /* If either macro is defined, show that we need secondary reloads. */ 34*c87b03e5Sespie #if defined(SECONDARY_INPUT_RELOAD_CLASS) || defined(SECONDARY_OUTPUT_RELOAD_CLASS) 35*c87b03e5Sespie #define HAVE_SECONDARY_RELOADS 36*c87b03e5Sespie #endif 37*c87b03e5Sespie 38*c87b03e5Sespie /* If MEMORY_MOVE_COST isn't defined, give it a default here. */ 39*c87b03e5Sespie #ifndef MEMORY_MOVE_COST 40*c87b03e5Sespie #ifdef HAVE_SECONDARY_RELOADS 41*c87b03e5Sespie #define MEMORY_MOVE_COST(MODE,CLASS,IN) \ 42*c87b03e5Sespie (4 + memory_move_secondary_cost ((MODE), (CLASS), (IN))) 43*c87b03e5Sespie #else 44*c87b03e5Sespie #define MEMORY_MOVE_COST(MODE,CLASS,IN) 4 45*c87b03e5Sespie #endif 46*c87b03e5Sespie #endif 47*c87b03e5Sespie extern int memory_move_secondary_cost PARAMS ((enum machine_mode, enum reg_class, int)); 48*c87b03e5Sespie 49*c87b03e5Sespie /* Maximum number of reloads we can need. */ 50*c87b03e5Sespie #define MAX_RELOADS (2 * MAX_RECOG_OPERANDS * (MAX_REGS_PER_ADDRESS + 1)) 51*c87b03e5Sespie 52*c87b03e5Sespie /* Encode the usage of a reload. The following codes are supported: 53*c87b03e5Sespie 54*c87b03e5Sespie RELOAD_FOR_INPUT reload of an input operand 55*c87b03e5Sespie RELOAD_FOR_OUTPUT likewise, for output 56*c87b03e5Sespie RELOAD_FOR_INSN a reload that must not conflict with anything 57*c87b03e5Sespie used in the insn, but may conflict with 58*c87b03e5Sespie something used before or after the insn 59*c87b03e5Sespie RELOAD_FOR_INPUT_ADDRESS reload for parts of the address of an object 60*c87b03e5Sespie that is an input reload 61*c87b03e5Sespie RELOAD_FOR_INPADDR_ADDRESS reload needed for RELOAD_FOR_INPUT_ADDRESS 62*c87b03e5Sespie RELOAD_FOR_OUTPUT_ADDRESS like RELOAD_FOR INPUT_ADDRESS, for output 63*c87b03e5Sespie RELOAD_FOR_OUTADDR_ADDRESS reload needed for RELOAD_FOR_OUTPUT_ADDRESS 64*c87b03e5Sespie RELOAD_FOR_OPERAND_ADDRESS reload for the address of a non-reloaded 65*c87b03e5Sespie operand; these don't conflict with 66*c87b03e5Sespie any other addresses. 67*c87b03e5Sespie RELOAD_FOR_OPADDR_ADDR reload needed for RELOAD_FOR_OPERAND_ADDRESS 68*c87b03e5Sespie reloads; usually secondary reloads 69*c87b03e5Sespie RELOAD_OTHER none of the above, usually multiple uses 70*c87b03e5Sespie RELOAD_FOR_OTHER_ADDRESS reload for part of the address of an input 71*c87b03e5Sespie that is marked RELOAD_OTHER. 72*c87b03e5Sespie 73*c87b03e5Sespie This used to be "enum reload_when_needed" but some debuggers have trouble 74*c87b03e5Sespie with an enum tag and variable of the same name. */ 75*c87b03e5Sespie 76*c87b03e5Sespie enum reload_type 77*c87b03e5Sespie { 78*c87b03e5Sespie RELOAD_FOR_INPUT, RELOAD_FOR_OUTPUT, RELOAD_FOR_INSN, 79*c87b03e5Sespie RELOAD_FOR_INPUT_ADDRESS, RELOAD_FOR_INPADDR_ADDRESS, 80*c87b03e5Sespie RELOAD_FOR_OUTPUT_ADDRESS, RELOAD_FOR_OUTADDR_ADDRESS, 81*c87b03e5Sespie RELOAD_FOR_OPERAND_ADDRESS, RELOAD_FOR_OPADDR_ADDR, 82*c87b03e5Sespie RELOAD_OTHER, RELOAD_FOR_OTHER_ADDRESS 83*c87b03e5Sespie }; 84*c87b03e5Sespie 85*c87b03e5Sespie #ifdef GCC_INSN_CODES_H 86*c87b03e5Sespie /* Each reload is recorded with a structure like this. */ 87*c87b03e5Sespie struct reload 88*c87b03e5Sespie { 89*c87b03e5Sespie /* The value to reload from */ 90*c87b03e5Sespie rtx in; 91*c87b03e5Sespie /* Where to store reload-reg afterward if nec (often the same as 92*c87b03e5Sespie reload_in) */ 93*c87b03e5Sespie rtx out; 94*c87b03e5Sespie 95*c87b03e5Sespie /* The class of registers to reload into. */ 96*c87b03e5Sespie enum reg_class class; 97*c87b03e5Sespie 98*c87b03e5Sespie /* The mode this operand should have when reloaded, on input. */ 99*c87b03e5Sespie enum machine_mode inmode; 100*c87b03e5Sespie /* The mode this operand should have when reloaded, on output. */ 101*c87b03e5Sespie enum machine_mode outmode; 102*c87b03e5Sespie 103*c87b03e5Sespie /* The mode of the reload register. */ 104*c87b03e5Sespie enum machine_mode mode; 105*c87b03e5Sespie 106*c87b03e5Sespie /* the largest number of registers this reload will require. */ 107*c87b03e5Sespie unsigned int nregs; 108*c87b03e5Sespie 109*c87b03e5Sespie /* Positive amount to increment or decrement by if 110*c87b03e5Sespie reload_in is a PRE_DEC, PRE_INC, POST_DEC, POST_INC. 111*c87b03e5Sespie Ignored otherwise (don't assume it is zero). */ 112*c87b03e5Sespie int inc; 113*c87b03e5Sespie /* A reg for which reload_in is the equivalent. 114*c87b03e5Sespie If reload_in is a symbol_ref which came from 115*c87b03e5Sespie reg_equiv_constant, then this is the pseudo 116*c87b03e5Sespie which has that symbol_ref as equivalent. */ 117*c87b03e5Sespie rtx in_reg; 118*c87b03e5Sespie rtx out_reg; 119*c87b03e5Sespie 120*c87b03e5Sespie /* Used in find_reload_regs to record the allocated register. */ 121*c87b03e5Sespie int regno; 122*c87b03e5Sespie /* This is the register to reload into. If it is zero when `find_reloads' 123*c87b03e5Sespie returns, you must find a suitable register in the class specified by 124*c87b03e5Sespie reload_reg_class, and store here an rtx for that register with mode from 125*c87b03e5Sespie reload_inmode or reload_outmode. */ 126*c87b03e5Sespie rtx reg_rtx; 127*c87b03e5Sespie /* The operand number being reloaded. This is used to group related reloads 128*c87b03e5Sespie and need not always be equal to the actual operand number in the insn, 129*c87b03e5Sespie though it current will be; for in-out operands, it is one of the two 130*c87b03e5Sespie operand numbers. */ 131*c87b03e5Sespie int opnum; 132*c87b03e5Sespie 133*c87b03e5Sespie /* Gives the reload number of a secondary input reload, when needed; 134*c87b03e5Sespie otherwise -1. */ 135*c87b03e5Sespie int secondary_in_reload; 136*c87b03e5Sespie /* Gives the reload number of a secondary output reload, when needed; 137*c87b03e5Sespie otherwise -1. */ 138*c87b03e5Sespie int secondary_out_reload; 139*c87b03e5Sespie /* If a secondary input reload is required, gives the INSN_CODE that uses the 140*c87b03e5Sespie secondary reload as a scratch register, or CODE_FOR_nothing if the 141*c87b03e5Sespie secondary reload register is to be an intermediate register. */ 142*c87b03e5Sespie enum insn_code secondary_in_icode; 143*c87b03e5Sespie /* Likewise, for a secondary output reload. */ 144*c87b03e5Sespie enum insn_code secondary_out_icode; 145*c87b03e5Sespie 146*c87b03e5Sespie /* Classifies reload as needed either for addressing an input reload, 147*c87b03e5Sespie addressing an output, for addressing a non-reloaded mem ref, or for 148*c87b03e5Sespie unspecified purposes (i.e., more than one of the above). */ 149*c87b03e5Sespie enum reload_type when_needed; 150*c87b03e5Sespie 151*c87b03e5Sespie /* Nonzero for an optional reload. Optional reloads are ignored unless the 152*c87b03e5Sespie value is already sitting in a register. */ 153*c87b03e5Sespie unsigned int optional:1; 154*c87b03e5Sespie /* nonzero if this reload shouldn't be combined with another reload. */ 155*c87b03e5Sespie unsigned int nocombine:1; 156*c87b03e5Sespie /* Nonzero if this is a secondary register for one or more reloads. */ 157*c87b03e5Sespie unsigned int secondary_p:1; 158*c87b03e5Sespie /* Nonzero if this reload must use a register not already allocated to a 159*c87b03e5Sespie group. */ 160*c87b03e5Sespie unsigned int nongroup:1; 161*c87b03e5Sespie }; 162*c87b03e5Sespie 163*c87b03e5Sespie extern struct reload rld[MAX_RELOADS]; 164*c87b03e5Sespie extern int n_reloads; 165*c87b03e5Sespie #endif 166*c87b03e5Sespie 167*c87b03e5Sespie extern rtx *reg_equiv_constant; 168*c87b03e5Sespie extern rtx *reg_equiv_memory_loc; 169*c87b03e5Sespie extern rtx *reg_equiv_address; 170*c87b03e5Sespie extern rtx *reg_equiv_mem; 171*c87b03e5Sespie 172*c87b03e5Sespie /* All the "earlyclobber" operands of the current insn 173*c87b03e5Sespie are recorded here. */ 174*c87b03e5Sespie extern int n_earlyclobbers; 175*c87b03e5Sespie extern rtx reload_earlyclobbers[MAX_RECOG_OPERANDS]; 176*c87b03e5Sespie 177*c87b03e5Sespie /* Save the number of operands. */ 178*c87b03e5Sespie extern int reload_n_operands; 179*c87b03e5Sespie 180*c87b03e5Sespie /* First uid used by insns created by reload in this function. 181*c87b03e5Sespie Used in find_equiv_reg. */ 182*c87b03e5Sespie extern int reload_first_uid; 183*c87b03e5Sespie 184*c87b03e5Sespie /* Nonzero if indirect addressing is supported when the innermost MEM is 185*c87b03e5Sespie of the form (MEM (SYMBOL_REF sym)). It is assumed that the level to 186*c87b03e5Sespie which these are valid is the same as spill_indirect_levels, above. */ 187*c87b03e5Sespie 188*c87b03e5Sespie extern char indirect_symref_ok; 189*c87b03e5Sespie 190*c87b03e5Sespie /* Nonzero if an address (plus (reg frame_pointer) (reg ...)) is valid. */ 191*c87b03e5Sespie extern char double_reg_address_ok; 192*c87b03e5Sespie 193*c87b03e5Sespie extern int num_not_at_initial_offset; 194*c87b03e5Sespie 195*c87b03e5Sespie struct needs 196*c87b03e5Sespie { 197*c87b03e5Sespie /* [0] is normal, [1] is nongroup. */ 198*c87b03e5Sespie short regs[2][N_REG_CLASSES]; 199*c87b03e5Sespie short groups[N_REG_CLASSES]; 200*c87b03e5Sespie }; 201*c87b03e5Sespie 202*c87b03e5Sespie #if defined SET_HARD_REG_BIT && defined CLEAR_REG_SET 203*c87b03e5Sespie /* This structure describes instructions which are relevant for reload. 204*c87b03e5Sespie Apart from all regular insns, this also includes CODE_LABELs, since they 205*c87b03e5Sespie must be examined for register elimination. */ 206*c87b03e5Sespie struct insn_chain 207*c87b03e5Sespie { 208*c87b03e5Sespie /* Links to the neighbor instructions. */ 209*c87b03e5Sespie struct insn_chain *next, *prev; 210*c87b03e5Sespie 211*c87b03e5Sespie /* Link through a chains set up by calculate_needs_all_insns, containing 212*c87b03e5Sespie all insns that need reloading. */ 213*c87b03e5Sespie struct insn_chain *next_need_reload; 214*c87b03e5Sespie 215*c87b03e5Sespie /* The basic block this insn is in. */ 216*c87b03e5Sespie int block; 217*c87b03e5Sespie /* The rtx of the insn. */ 218*c87b03e5Sespie rtx insn; 219*c87b03e5Sespie /* Register life information: record all live hard registers, and all 220*c87b03e5Sespie live pseudos that have a hard register. */ 221*c87b03e5Sespie regset_head live_throughout; 222*c87b03e5Sespie regset_head dead_or_set; 223*c87b03e5Sespie 224*c87b03e5Sespie /* Copies of the global variables computed by find_reloads. */ 225*c87b03e5Sespie struct reload *rld; 226*c87b03e5Sespie int n_reloads; 227*c87b03e5Sespie 228*c87b03e5Sespie /* Indicates which registers have already been used for spills. */ 229*c87b03e5Sespie HARD_REG_SET used_spill_regs; 230*c87b03e5Sespie 231*c87b03e5Sespie /* Describe the needs for reload registers of this insn. */ 232*c87b03e5Sespie struct needs need; 233*c87b03e5Sespie 234*c87b03e5Sespie /* Nonzero if find_reloads said the insn requires reloading. */ 235*c87b03e5Sespie unsigned int need_reload:1; 236*c87b03e5Sespie /* Nonzero if find_reloads needs to be run during reload_as_needed to 237*c87b03e5Sespie perform modifications on any operands. */ 238*c87b03e5Sespie unsigned int need_operand_change:1; 239*c87b03e5Sespie /* Nonzero if eliminate_regs_in_insn said it requires eliminations. */ 240*c87b03e5Sespie unsigned int need_elim:1; 241*c87b03e5Sespie /* Nonzero if this insn was inserted by perform_caller_saves. */ 242*c87b03e5Sespie unsigned int is_caller_save_insn:1; 243*c87b03e5Sespie }; 244*c87b03e5Sespie 245*c87b03e5Sespie /* A chain of insn_chain structures to describe all non-note insns in 246*c87b03e5Sespie a function. */ 247*c87b03e5Sespie extern struct insn_chain *reload_insn_chain; 248*c87b03e5Sespie 249*c87b03e5Sespie /* Allocate a new insn_chain structure. */ 250*c87b03e5Sespie extern struct insn_chain *new_insn_chain PARAMS ((void)); 251*c87b03e5Sespie 252*c87b03e5Sespie extern void compute_use_by_pseudos PARAMS ((HARD_REG_SET *, regset)); 253*c87b03e5Sespie #endif 254*c87b03e5Sespie 255*c87b03e5Sespie /* Functions from reload.c: */ 256*c87b03e5Sespie 257*c87b03e5Sespie /* Return a memory location that will be used to copy X in mode MODE. 258*c87b03e5Sespie If we haven't already made a location for this mode in this insn, 259*c87b03e5Sespie call find_reloads_address on the location being returned. */ 260*c87b03e5Sespie extern rtx get_secondary_mem PARAMS ((rtx, enum machine_mode, 261*c87b03e5Sespie int, enum reload_type)); 262*c87b03e5Sespie 263*c87b03e5Sespie /* Clear any secondary memory locations we've made. */ 264*c87b03e5Sespie extern void clear_secondary_mem PARAMS ((void)); 265*c87b03e5Sespie 266*c87b03e5Sespie /* Transfer all replacements that used to be in reload FROM to be in 267*c87b03e5Sespie reload TO. */ 268*c87b03e5Sespie extern void transfer_replacements PARAMS ((int, int)); 269*c87b03e5Sespie 270*c87b03e5Sespie /* IN_RTX is the value loaded by a reload that we now decided to inherit, 271*c87b03e5Sespie or a subpart of it. If we have any replacements registered for IN_RTX, 272*c87b03e5Sespie chancel the reloads that were supposed to load them. 273*c87b03e5Sespie Return nonzero if we chanceled any reloads. */ 274*c87b03e5Sespie extern int remove_address_replacements PARAMS ((rtx in_rtx)); 275*c87b03e5Sespie 276*c87b03e5Sespie /* Like rtx_equal_p except that it allows a REG and a SUBREG to match 277*c87b03e5Sespie if they are the same hard reg, and has special hacks for 278*c87b03e5Sespie autoincrement and autodecrement. */ 279*c87b03e5Sespie extern int operands_match_p PARAMS ((rtx, rtx)); 280*c87b03e5Sespie 281*c87b03e5Sespie /* Return 1 if altering OP will not modify the value of CLOBBER. */ 282*c87b03e5Sespie extern int safe_from_earlyclobber PARAMS ((rtx, rtx)); 283*c87b03e5Sespie 284*c87b03e5Sespie /* Search the body of INSN for values that need reloading and record them 285*c87b03e5Sespie with push_reload. REPLACE nonzero means record also where the values occur 286*c87b03e5Sespie so that subst_reloads can be used. */ 287*c87b03e5Sespie extern int find_reloads PARAMS ((rtx, int, int, int, short *)); 288*c87b03e5Sespie 289*c87b03e5Sespie /* Compute the sum of X and Y, making canonicalizations assumed in an 290*c87b03e5Sespie address, namely: sum constant integers, surround the sum of two 291*c87b03e5Sespie constants with a CONST, put the constant as the second operand, and 292*c87b03e5Sespie group the constant on the outermost sum. */ 293*c87b03e5Sespie extern rtx form_sum PARAMS ((rtx, rtx)); 294*c87b03e5Sespie 295*c87b03e5Sespie /* Substitute into the current INSN the registers into which we have reloaded 296*c87b03e5Sespie the things that need reloading. */ 297*c87b03e5Sespie extern void subst_reloads PARAMS ((rtx)); 298*c87b03e5Sespie 299*c87b03e5Sespie /* Make a copy of any replacements being done into X and move those copies 300*c87b03e5Sespie to locations in Y, a copy of X. We only look at the highest level of 301*c87b03e5Sespie the RTL. */ 302*c87b03e5Sespie extern void copy_replacements PARAMS ((rtx, rtx)); 303*c87b03e5Sespie 304*c87b03e5Sespie /* Change any replacements being done to *X to be done to *Y */ 305*c87b03e5Sespie extern void move_replacements PARAMS ((rtx *x, rtx *y)); 306*c87b03e5Sespie 307*c87b03e5Sespie /* If LOC was scheduled to be replaced by something, return the replacement. 308*c87b03e5Sespie Otherwise, return *LOC. */ 309*c87b03e5Sespie extern rtx find_replacement PARAMS ((rtx *)); 310*c87b03e5Sespie 311*c87b03e5Sespie /* Return nonzero if register in range [REGNO, ENDREGNO) 312*c87b03e5Sespie appears either explicitly or implicitly in X 313*c87b03e5Sespie other than being stored into. */ 314*c87b03e5Sespie extern int refers_to_regno_for_reload_p PARAMS ((unsigned int, unsigned int, 315*c87b03e5Sespie rtx, rtx *)); 316*c87b03e5Sespie 317*c87b03e5Sespie /* Nonzero if modifying X will affect IN. */ 318*c87b03e5Sespie extern int reg_overlap_mentioned_for_reload_p PARAMS ((rtx, rtx)); 319*c87b03e5Sespie 320*c87b03e5Sespie /* Return nonzero if anything in X contains a MEM. Look also for pseudo 321*c87b03e5Sespie registers. */ 322*c87b03e5Sespie extern int refers_to_mem_for_reload_p PARAMS ((rtx)); 323*c87b03e5Sespie 324*c87b03e5Sespie /* Check the insns before INSN to see if there is a suitable register 325*c87b03e5Sespie containing the same value as GOAL. */ 326*c87b03e5Sespie extern rtx find_equiv_reg PARAMS ((rtx, rtx, enum reg_class, int, short *, 327*c87b03e5Sespie int, enum machine_mode)); 328*c87b03e5Sespie 329*c87b03e5Sespie /* Return 1 if register REGNO is the subject of a clobber in insn INSN. */ 330*c87b03e5Sespie extern int regno_clobbered_p PARAMS ((unsigned int, rtx, enum machine_mode, 331*c87b03e5Sespie int)); 332*c87b03e5Sespie 333*c87b03e5Sespie /* Return 1 if X is an operand of an insn that is being earlyclobbered. */ 334*c87b03e5Sespie extern int earlyclobber_operand_p PARAMS ((rtx)); 335*c87b03e5Sespie 336*c87b03e5Sespie /* Record one reload that needs to be performed. */ 337*c87b03e5Sespie extern int push_reload PARAMS ((rtx, rtx, rtx *, rtx *, enum reg_class, 338*c87b03e5Sespie enum machine_mode, enum machine_mode, 339*c87b03e5Sespie int, int, int, enum reload_type)); 340*c87b03e5Sespie 341*c87b03e5Sespie /* Functions in reload1.c: */ 342*c87b03e5Sespie 343*c87b03e5Sespie extern void reload_cse_regs PARAMS ((rtx)); 344*c87b03e5Sespie extern int reloads_conflict PARAMS ((int, int)); 345*c87b03e5Sespie 346*c87b03e5Sespie /* Initialize the reload pass once per compilation. */ 347*c87b03e5Sespie extern void init_reload PARAMS ((void)); 348*c87b03e5Sespie 349*c87b03e5Sespie /* The reload pass itself. */ 350*c87b03e5Sespie extern int reload PARAMS ((rtx, int)); 351*c87b03e5Sespie 352*c87b03e5Sespie /* Mark the slots in regs_ever_live for the hard regs 353*c87b03e5Sespie used by pseudo-reg number REGNO. */ 354*c87b03e5Sespie extern void mark_home_live PARAMS ((int)); 355*c87b03e5Sespie 356*c87b03e5Sespie /* Scan X and replace any eliminable registers (such as fp) with a 357*c87b03e5Sespie replacement (such as sp), plus an offset. */ 358*c87b03e5Sespie extern rtx eliminate_regs PARAMS ((rtx, enum machine_mode, rtx)); 359*c87b03e5Sespie 360*c87b03e5Sespie /* Emit code to perform a reload from IN (which may be a reload register) to 361*c87b03e5Sespie OUT (which may also be a reload register). IN or OUT is from operand 362*c87b03e5Sespie OPNUM with reload type TYPE. */ 363*c87b03e5Sespie extern rtx gen_reload PARAMS ((rtx, rtx, int, enum reload_type)); 364*c87b03e5Sespie 365*c87b03e5Sespie /* Deallocate the reload register used by reload number R. */ 366*c87b03e5Sespie extern void deallocate_reload_reg PARAMS ((int r)); 367*c87b03e5Sespie 368*c87b03e5Sespie /* Functions in caller-save.c: */ 369*c87b03e5Sespie 370*c87b03e5Sespie /* Initialize for caller-save. */ 371*c87b03e5Sespie extern void init_caller_save PARAMS ((void)); 372*c87b03e5Sespie 373*c87b03e5Sespie /* Initialize save areas by showing that we haven't allocated any yet. */ 374*c87b03e5Sespie extern void init_save_areas PARAMS ((void)); 375*c87b03e5Sespie 376*c87b03e5Sespie /* Allocate save areas for any hard registers that might need saving. */ 377*c87b03e5Sespie extern void setup_save_areas PARAMS ((void)); 378*c87b03e5Sespie 379*c87b03e5Sespie /* Find the places where hard regs are live across calls and save them. */ 380*c87b03e5Sespie extern void save_call_clobbered_regs PARAMS ((void)); 381*c87b03e5Sespie 382*c87b03e5Sespie /* Replace (subreg (reg)) with the appropriate (reg) for any operands. */ 383*c87b03e5Sespie extern void cleanup_subreg_operands PARAMS ((rtx)); 384*c87b03e5Sespie 385*c87b03e5Sespie /* Debugging support. */ 386*c87b03e5Sespie extern void debug_reload_to_stream PARAMS ((FILE *)); 387*c87b03e5Sespie extern void debug_reload PARAMS ((void)); 388