rtx x = *px;
unsigned int regno = *(int *) pregno;
- if (GET_CODE (x) == REG && REGNO (x) == regno)
+ if (REG_P (x) && REGNO (x) == regno)
{
if (GET_MODE_BITSIZE (GET_MODE (x)) <= BITS_PER_WORD)
return 2;
case ZERO_EXTRACT:
case SIGN_EXTRACT:
case STRICT_LOW_PART:
- if (GET_CODE (XEXP (*ptr, 0)) == REG && REGNO (XEXP (*ptr, 0)) == reg)
+ if (REG_P (XEXP (*ptr, 0)) && REGNO (XEXP (*ptr, 0)) == reg)
{
param->retval = XEXP (*ptr, 0);
return 1;
break;
case SUBREG:
- if (GET_CODE (SUBREG_REG (*ptr)) == REG
+ if (REG_P (SUBREG_REG (*ptr))
&& REGNO (SUBREG_REG (*ptr)) == reg)
{
param->retval = SUBREG_REG (*ptr);
/* Does this instruction increment or decrement a register? */
if ((flags & PROP_AUTOINC)
&& x != 0
- && GET_CODE (SET_DEST (x)) == REG
+ && REG_P (SET_DEST (x))
&& (GET_CODE (SET_SRC (x)) == PLUS
|| GET_CODE (SET_SRC (x)) == MINUS)
&& XEXP (SET_SRC (x), 0) == SET_DEST (x)
in the form of a comparison of a register against zero.
If the condition is more complex than that, then it is safe
not to record any information. */
- if (GET_CODE (reg) == REG
+ if (REG_P (reg)
&& XEXP (cond_true, 1) == const0_rtx)
{
rtx cond_false
|| GET_CODE (r) == ZERO_EXTRACT)
r = XEXP (r, 0);
- if (GET_CODE (r) == REG)
+ if (REG_P (r))
{
int regno = REGNO (r);
is not necessarily true for hard registers until after reload. */
else if (code == CLOBBER)
{
- if (GET_CODE (XEXP (x, 0)) == REG
+ if (REG_P (XEXP (x, 0))
&& (REGNO (XEXP (x, 0)) >= FIRST_PSEUDO_REGISTER
|| reload_completed)
&& ! REGNO_REG_SET_P (pbi->reg_live, REGNO (XEXP (x, 0))))
{
rtx r = SET_SRC (x);
- if (GET_CODE (r) == REG)
+ if (REG_P (r))
{
rtx call = XEXP (note, 0);
rtx call_pat;
break;
case SUBREG:
- if (GET_CODE (SUBREG_REG (reg)) == REG)
+ if (REG_P (SUBREG_REG (reg)))
{
enum machine_mode outer_mode = GET_MODE (reg);
enum machine_mode inner_mode = GET_MODE (SUBREG_REG (reg));
If this set is a REG, then it kills any MEMs which use the reg. */
if (optimize && (flags & PROP_SCAN_DEAD_STORES))
{
- if (GET_CODE (reg) == REG)
+ if (REG_P (reg))
invalidate_mems_from_set (pbi, reg);
/* If the memory reference had embedded side effects (autoincrement
add_to_mem_set_list (pbi, canon_rtx (reg));
}
- if (GET_CODE (reg) == REG
+ if (REG_P (reg)
&& ! (regno_first == FRAME_POINTER_REGNUM
&& (! reload_completed || frame_pointer_needed))
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
}
}
}
- else if (GET_CODE (reg) == REG)
+ else if (REG_P (reg))
{
if (flags & (PROP_LOG_LINKS | PROP_AUTOINC))
pbi->reg_next_use[regno_first] = 0;
if (x_code == NOT)
return XEXP (x, 0);
if (COMPARISON_P (x)
- && GET_CODE (XEXP (x, 0)) == REG)
+ && REG_P (XEXP (x, 0)))
{
if (XEXP (x, 1) != const0_rtx)
abort ();
if (! validate_change (insn, &XEXP (mem, 0), inc, 0))
return;
}
- else if (GET_CODE (q) == REG
+ else if (REG_P (q)
/* PREV_INSN used here to check the semi-open interval
[insn,incr). */
&& ! reg_used_between_p (q, PREV_INSN (insn), incr)
if (GET_CODE (addr) == PLUS && GET_CODE (XEXP (addr, 1)) == CONST_INT)
offset = INTVAL (XEXP (addr, 1)), addr = XEXP (addr, 0);
- if (GET_CODE (addr) != REG)
+ if (!REG_P (addr))
return;
regno = REGNO (addr);
inc_val)),
insn, x, incr, addr);
}
- else if (GET_CODE (inc_val) == REG
+ else if (REG_P (inc_val)
&& ! reg_set_between_p (inc_val, PREV_INSN (insn),
NEXT_INSN (incr)))
case SUBREG:
#ifdef CANNOT_CHANGE_MODE_CLASS
if ((flags & PROP_REG_INFO)
- && GET_CODE (SUBREG_REG (x)) == REG
+ && REG_P (SUBREG_REG (x))
&& REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER)
bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (x))
* MAX_MACHINE_MODE
/* While we're here, optimize this case. */
x = SUBREG_REG (x);
- if (GET_CODE (x) != REG)
+ if (!REG_P (x))
goto retry;
/* Fall through. */
#ifdef CANNOT_CHANGE_MODE_CLASS
if ((flags & PROP_REG_INFO)
&& GET_CODE (testreg) == SUBREG
- && GET_CODE (SUBREG_REG (testreg)) == REG
+ && REG_P (SUBREG_REG (testreg))
&& REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER)
bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (testreg))
* MAX_MACHINE_MODE
if ((GET_CODE (testreg) == PARALLEL
&& GET_MODE (testreg) == BLKmode)
- || (GET_CODE (testreg) == REG
+ || (REG_P (testreg)
&& (regno = REGNO (testreg),
! (regno == FRAME_POINTER_REGNUM
&& (! reload_completed || frame_pointer_needed)))
switch (REG_NOTE_KIND (link))
{
case REG_DEAD:
- if (GET_CODE (XEXP (link, 0)) == REG)
+ if (REG_P (XEXP (link, 0)))
{
rtx reg = XEXP (link, 0);
int n;