/* Definitions for computing resource usage of specific insns.
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GCC.
#include "rtl.h"
#include "tm_p.h"
#include "hard-reg-set.h"
-#include "basic-block.h"
#include "function.h"
#include "regs.h"
#include "flags.h"
unsigned int last_regno
= regno + hard_regno_nregs[regno][GET_MODE (x)];
- if (last_regno > FIRST_PSEUDO_REGISTER)
- abort ();
+ gcc_assert (last_regno <= FIRST_PSEUDO_REGISTER);
for (r = regno; r < last_regno; r++)
SET_HARD_REG_BIT (res->regs, r);
}
unsigned int last_regno
= regno + hard_regno_nregs[regno][GET_MODE (x)];
- if (last_regno > FIRST_PSEUDO_REGISTER)
- abort ();
+ gcc_assert (last_regno <= FIRST_PSEUDO_REGISTER);
for (r = regno; r < last_regno; r++)
SET_HARD_REG_BIT (res->regs, r);
}
case SET:
/* Usually, the first operand of SET is set, not referenced. But
registers used to access memory are referenced. SET_DEST is
- also referenced if it is a ZERO_EXTRACT or SIGN_EXTRACT. */
+ also referenced if it is a ZERO_EXTRACT. */
mark_referenced_resources (SET_SRC (x), res, 0);
x = SET_DEST (x);
- if (GET_CODE (x) == SIGN_EXTRACT
- || GET_CODE (x) == ZERO_EXTRACT
+ if (GET_CODE (x) == ZERO_EXTRACT
|| GET_CODE (x) == STRICT_LOW_PART)
mark_referenced_resources (x, res, 0);
else if (GET_CODE (x) == SUBREG)
{
sequence = PATTERN (NEXT_INSN (insn));
seq_size = XVECLEN (sequence, 0);
- if (GET_CODE (sequence) != SEQUENCE)
- abort ();
+ gcc_assert (GET_CODE (sequence) == SEQUENCE);
}
res->memory = 1;
unsigned int last_regno
= regno + hard_regno_nregs[regno][GET_MODE (x)];
- if (last_regno > FIRST_PSEUDO_REGISTER)
- abort ();
+ gcc_assert (last_regno <= FIRST_PSEUDO_REGISTER);
for (r = regno; r < last_regno; r++)
SET_HARD_REG_BIT (res->regs, r);
}
unsigned int last_regno
= regno + hard_regno_nregs[regno][GET_MODE (x)];
- if (last_regno > FIRST_PSEUDO_REGISTER)
- abort ();
+ gcc_assert (last_regno <= FIRST_PSEUDO_REGISTER);
for (r = regno; r < last_regno; r++)
SET_HARD_REG_BIT (res->regs, r);
}
unsigned int j;
unsigned int regno;
rtx start_insn, stop_insn;
+ reg_set_iterator rsi;
/* Compute hard regs live at start of block -- this is the real hard regs
marked live, plus live pseudo regs that have been renumbered to
REG_SET_TO_HARD_REG_SET (current_live_regs, regs_live);
- EXECUTE_IF_SET_IN_REG_SET
- (regs_live, FIRST_PSEUDO_REGISTER, i,
- {
- if (reg_renumber[i] >= 0)
- {
- regno = reg_renumber[i];
- for (j = regno;
- j < regno + hard_regno_nregs[regno]
- [PSEUDO_REGNO_MODE (i)];
- j++)
- SET_HARD_REG_BIT (current_live_regs, j);
- }
- });
+ EXECUTE_IF_SET_IN_REG_SET (regs_live, FIRST_PSEUDO_REGISTER, i, rsi)
+ {
+ if (reg_renumber[i] >= 0)
+ {
+ regno = reg_renumber[i];
+ for (j = regno;
+ j < regno + hard_regno_nregs[regno][PSEUDO_REGNO_MODE (i)];
+ j++)
+ SET_HARD_REG_BIT (current_live_regs, j);
+ }
+ }
/* Get starting and ending insn, handling the case where each might
be a SEQUENCE. */