Commit 830a47ec by Zack Weinberg

caller-save.c: Don't include insn-codes.h.

	* caller-save.c: Don't include insn-codes.h.
	(reg_save_code, reg_restore_code): Make arrays of int.
	All uses updated to match.
	(insert_save, insert_restore): No need to initialize "code"
	variable upon declaration.
	* Makefile.in: update dependencies; fix typo in clean rule.

From-SVN: r45087
parent da920570
......@@ -1515,7 +1515,7 @@ reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) real.h flags.h \
except.h
caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \
$(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) function.h \
$(RECOG_H) reload.h $(EXPR_H) insn-codes.h toplev.h $(TM_P_H)
$(RECOG_H) reload.h $(EXPR_H) toplev.h $(TM_P_H)
reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) conditions.h hard-reg-set.h \
$(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(INSN_ATTR_H) \
$(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h $(PARAMS_H) $(TM_P_H)
......@@ -2377,7 +2377,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
# that don't exist in the distribution.
INTL_CLEAN = intl.clean
clean: mostlyclean $(INTL_CLEAN) lang.clean
-rm -f libgcc.a libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).0
-rm -f libgcc.a libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).1
-rm -f config.h tconfig.h hconfig.h tm_p.h
-rm -f cs-*
-rm -rf libgcc
......
......@@ -31,7 +31,6 @@ Boston, MA 02111-1307, USA. */
#include "reload.h"
#include "function.h"
#include "expr.h"
#include "insn-codes.h"
#include "toplev.h"
#include "tm_p.h"
......@@ -65,9 +64,9 @@ static rtx
when we emit them, the addresses might not be valid, so they might not
be recognized. */
static enum insn_code
static int
reg_save_code[FIRST_PSEUDO_REGISTER][MAX_MACHINE_MODE];
static enum insn_code
static int
reg_restore_code[FIRST_PSEUDO_REGISTER][MAX_MACHINE_MODE];
/* Set of hard regs currently residing in save area (during insn scan). */
......@@ -95,7 +94,7 @@ static int insert_save PARAMS ((struct insn_chain *, int, int,
static int insert_restore PARAMS ((struct insn_chain *, int, int,
int, enum machine_mode *));
static struct insn_chain *insert_one_insn PARAMS ((struct insn_chain *, int,
enum insn_code, rtx));
int, rtx));
static void add_stored_regs PARAMS ((rtx, rtx, void *));
/* Initialize for caller-save.
......@@ -199,8 +198,8 @@ init_caller_save ()
/* Now extract both insns and see if we can meet their
constraints. */
ok = (reg_save_code[i][mode] != (enum insn_code)-1
&& reg_restore_code[i][mode] != (enum insn_code)-1);
ok = (reg_save_code[i][mode] != -1
&& reg_restore_code[i][mode] != -1);
if (ok)
{
extract_insn (saveinsn);
......@@ -211,18 +210,18 @@ init_caller_save ()
if (! ok)
{
reg_save_code[i][mode] = (enum insn_code) -1;
reg_restore_code[i][mode] = (enum insn_code) -1;
reg_save_code[i][mode] = -1;
reg_restore_code[i][mode] = -1;
}
}
else
{
reg_save_code[i][mode] = (enum insn_code) -1;
reg_restore_code[i][mode] = (enum insn_code) -1;
reg_save_code[i][mode] = -1;
reg_restore_code[i][mode] = -1;
}
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
for (j = 1; j <= MOVE_MAX_WORDS; j++)
if (reg_save_code [i][regno_save_mode[i][j]] == (enum insn_code) -1)
if (reg_save_code [i][regno_save_mode[i][j]] == -1)
{
regno_save_mode[i][j] = VOIDmode;
if (j == 1)
......@@ -630,7 +629,7 @@ insert_restore (chain, before_p, regno, maxrestore, save_mode)
{
int i, k;
rtx pat = NULL_RTX;
enum insn_code code = CODE_FOR_nothing;
int code;
unsigned int numregs = 0;
struct insn_chain *new;
rtx mem;
......@@ -708,7 +707,7 @@ insert_save (chain, before_p, regno, to_save, save_mode)
int i;
unsigned int k;
rtx pat = NULL_RTX;
enum insn_code code = CODE_FOR_nothing;
int code;
unsigned int numregs = 0;
struct insn_chain *new;
rtx mem;
......@@ -776,7 +775,7 @@ static struct insn_chain *
insert_one_insn (chain, before_p, code, pat)
struct insn_chain *chain;
int before_p;
enum insn_code code;
int code;
rtx pat;
{
rtx insn = chain->insn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment