return NULL;
if (dwarf_strict
- && (GET_MODE_CLASS (op_mode) != MODE_INT
+ && (!SCALAR_INT_MODE_P (op_mode)
|| GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE))
return NULL;
if (op0 == NULL || op1 == NULL)
return NULL;
- if (GET_MODE_CLASS (op_mode) != MODE_INT
+ if (!SCALAR_INT_MODE_P (op_mode)
|| GET_MODE_SIZE (op_mode) == DWARF2_ADDR_SIZE)
return compare_loc_descriptor (op, op0, op1);
op_mode = GET_MODE (XEXP (rtl, 1));
if (op_mode == VOIDmode)
return NULL;
- if (GET_MODE_CLASS (op_mode) != MODE_INT)
+ if (!SCALAR_INT_MODE_P (op_mode))
return NULL;
if (dwarf_strict && GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE)
dw_loc_descr_ref bra_node, drop_node;
if (dwarf_strict
- && (GET_MODE_CLASS (mode) != MODE_INT
+ && (!SCALAR_INT_MODE_P (mode)
|| GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE))
return NULL;
add_loc_descr (&op1, new_loc_descr (DW_OP_plus_uconst, bias, 0));
}
}
- else if (GET_MODE_CLASS (mode) == MODE_INT
+ else if (!SCALAR_INT_MODE_P (mode)
&& GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE)
{
int shift = (DWARF2_ADDR_SIZE - GET_MODE_SIZE (mode)) * BITS_PER_UNIT;
add_loc_descr (&op1, int_loc_descriptor (shift));
add_loc_descr (&op1, new_loc_descr (DW_OP_shl, 0, 0));
}
- else if (GET_MODE_CLASS (mode) == MODE_INT
+ else if (SCALAR_INT_MODE_P (mode)
&& GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE)
{
dw_die_ref type_die = base_type_for_mode (mode, 0);
bra_node->dw_loc_oprnd1.val_class = dw_val_class_loc;
bra_node->dw_loc_oprnd1.v.val_loc = drop_node;
if ((GET_CODE (rtl) == SMIN || GET_CODE (rtl) == SMAX)
- && GET_MODE_CLASS (mode) == MODE_INT
+ && SCALAR_INT_MODE_P (mode)
&& GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE)
ret = convert_descriptor_to_mode (mode, ret);
return ret;
dw_loc_descr_ref l4jump, l4label;
rtx msb;
- if (GET_MODE_CLASS (mode) != MODE_INT
+ if (!SCALAR_INT_MODE_P (mode)
|| GET_MODE (XEXP (rtl, 0)) != mode)
return NULL;
dw_loc_descr_ref l1jump, l1label;
dw_loc_descr_ref l2jump, l2label;
- if (GET_MODE_CLASS (mode) != MODE_INT
+ if (!SCALAR_INT_MODE_P (mode)
|| GET_MODE (XEXP (rtl, 0)) != mode)
return NULL;
dw_loc_descr_ref l1jump, l1label;
dw_loc_descr_ref l2jump, l2label;
- if (GET_MODE_CLASS (mode) != MODE_INT
+ if (!SCALAR_INT_MODE_P (mode)
|| BITS_PER_UNIT != 8
|| (GET_MODE_BITSIZE (mode) != 32
&& GET_MODE_BITSIZE (mode) != 64))
dw_loc_descr_ref op0, op1, ret, mask[2] = { NULL, NULL };
int i;
- if (GET_MODE_CLASS (mode) != MODE_INT)
+ if (!SCALAR_INT_MODE_P (mode))
return NULL;
if (GET_MODE (rtlop1) != VOIDmode
case TRUNCATE:
if (inner == NULL_RTX)
inner = XEXP (rtl, 0);
- if (GET_MODE_CLASS (mode) == MODE_INT
- && GET_MODE_CLASS (GET_MODE (inner)) == MODE_INT
+ if (SCALAR_INT_MODE_P (mode)
+ && SCALAR_INT_MODE_P (GET_MODE (inner))
&& (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
#ifdef POINTERS_EXTEND_UNSIGNED
|| (mode == Pmode && mem_mode != VOIDmode)
if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (inner)))
break;
if (GET_MODE_SIZE (mode) != GET_MODE_SIZE (GET_MODE (inner))
- && (GET_MODE_CLASS (mode) != MODE_INT
- || GET_MODE_CLASS (GET_MODE (inner)) != MODE_INT))
+ && (!SCALAR_INT_MODE_P (mode)
+ || !SCALAR_INT_MODE_P (GET_MODE (inner))))
break;
else
{
mem_mode, initialized);
if (mem_loc_result == NULL)
break;
- type_die = base_type_for_mode (mode,
- GET_MODE_CLASS (mode) == MODE_INT);
+ type_die = base_type_for_mode (mode, SCALAR_INT_MODE_P (mode));
if (type_die == NULL)
{
mem_loc_result = NULL;
cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die;
cvt->dw_loc_oprnd1.v.val_die_ref.external = 0;
add_loc_descr (&mem_loc_result, cvt);
- if (GET_MODE_CLASS (mode) == MODE_INT
+ if (SCALAR_INT_MODE_P (mode)
&& GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE)
{
/* Convert it to untyped afterwards. */
break;
case REG:
- if (GET_MODE_CLASS (mode) != MODE_INT
+ if (! SCALAR_INT_MODE_P (mode)
|| (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE
&& rtl != arg_pointer_rtx
&& rtl != frame_pointer_rtx
break;
if (REGNO (rtl) > FIRST_PSEUDO_REGISTER)
break;
- type_die = base_type_for_mode (mode,
- GET_MODE_CLASS (mode) == MODE_INT);
+ type_die = base_type_for_mode (mode, SCALAR_INT_MODE_P (mode));
if (type_die == NULL)
break;
dbx_regnum = dbx_reg_number (rtl);
if (dbx_regnum == IGNORED_DWARF_REGNUM)
break;
- mem_loc_result = new_loc_descr (DW_OP_GNU_regval_type,
+ mem_loc_result = new_loc_descr (DW_OP_GNU_regval_type,
dbx_regnum, 0);
mem_loc_result->dw_loc_oprnd2.val_class = dw_val_class_die_ref;
mem_loc_result->dw_loc_oprnd2.v.val_die_ref.die = type_die;
case SIGN_EXTEND:
case ZERO_EXTEND:
- if (GET_MODE_CLASS (mode) != MODE_INT)
+ if (!SCALAR_INT_MODE_P (mode))
break;
op0 = mem_loc_descriptor (XEXP (rtl, 0), GET_MODE (XEXP (rtl, 0)),
mem_mode, VAR_INIT_STATUS_INITIALIZED);
if (mem_loc_result != NULL)
{
if (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE
- || GET_MODE_CLASS (mode) != MODE_INT)
+ || !SCALAR_INT_MODE_P(mode))
{
dw_die_ref type_die;
dw_loc_descr_ref deref;
if (dwarf_strict)
return NULL;
type_die
- = base_type_for_mode (mode, GET_MODE_CLASS (mode) == MODE_INT);
+ = base_type_for_mode (mode, SCALAR_INT_MODE_P (mode));
if (type_die == NULL)
return NULL;
deref = new_loc_descr (DW_OP_GNU_deref_type,
pool. */
case CONST:
case SYMBOL_REF:
- if ((GET_MODE_CLASS (mode) != MODE_INT
- && GET_MODE_CLASS (mode) != MODE_PARTIAL_INT)
+ if (!SCALAR_INT_MODE_P (mode)
|| (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE
#ifdef POINTERS_EXTEND_UNSIGNED
&& (mode != Pmode || mem_mode == VOIDmode)
return NULL;
if (REG_P (ENTRY_VALUE_EXP (rtl)))
{
- if (GET_MODE_CLASS (mode) != MODE_INT
+ if (!SCALAR_INT_MODE_P (mode)
|| GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE)
op0 = mem_loc_descriptor (ENTRY_VALUE_EXP (rtl), mode,
VOIDmode, VAR_INIT_STATUS_INITIALIZED);
&& (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
|| XEXP (rtl, 0) == arg_pointer_rtx
|| XEXP (rtl, 0) == frame_pointer_rtx)
- && GET_MODE_CLASS (mode) == MODE_INT)
+ && SCALAR_INT_MODE_P (mode))
mem_loc_result = based_loc_descr (XEXP (rtl, 0),
INTVAL (XEXP (rtl, 1)),
VAR_INIT_STATUS_INITIALIZED);
case DIV:
if (!dwarf_strict
- && GET_MODE_CLASS (mode) == MODE_INT
+ && SCALAR_INT_MODE_P (mode)
&& GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE)
{
mem_loc_result = typed_binop (DW_OP_div, rtl,
goto do_shift;
do_shift:
- if (GET_MODE_CLASS (mode) != MODE_INT)
+ if (!SCALAR_INT_MODE_P (mode))
break;
op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode,
VAR_INIT_STATUS_INITIALIZED);
break;
case UDIV:
- if (!dwarf_strict && GET_MODE_CLASS (mode) == MODE_INT)
+ if (!dwarf_strict && SCALAR_INT_MODE_P (mode))
{
if (GET_MODE_CLASS (mode) > DWARF2_ADDR_SIZE)
{
|| (GET_MODE (rtl) == VOIDmode
&& GET_MODE_BITSIZE (mode) != HOST_BITS_PER_DOUBLE_INT))
break;
- type_die = base_type_for_mode (mode,
- GET_MODE_CLASS (mode) == MODE_INT);
+ type_die = base_type_for_mode (mode, SCALAR_INT_MODE_P (mode));
if (type_die == NULL)
return NULL;
mem_loc_result = new_loc_descr (DW_OP_GNU_const_type, 0, 0);
{
dw_die_ref type_die;
- type_die = base_type_for_mode (mode,
- GET_MODE_CLASS (mode) == MODE_INT);
+ type_die = base_type_for_mode (mode, SCALAR_INT_MODE_P (mode));
if (type_die == NULL)
return NULL;
mem_loc_result = new_loc_descr (DW_OP_GNU_const_type, 0, 0);
case UMIN:
case UMAX:
- if (GET_MODE_CLASS (mode) != MODE_INT)
+ if (!SCALAR_INT_MODE_P (mode))
break;
/* FALLTHRU */
case SMIN:
&& ((unsigned) INTVAL (XEXP (rtl, 1))
+ (unsigned) INTVAL (XEXP (rtl, 2))
<= GET_MODE_BITSIZE (mode))
- && GET_MODE_CLASS (mode) == MODE_INT
+ && SCALAR_INT_MODE_P (mode)
&& GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
&& GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0))) <= DWARF2_ADDR_SIZE)
{
mem_mode, VAR_INIT_STATUS_INITIALIZED);
if (op0 == NULL)
break;
- if (GET_MODE_CLASS (GET_MODE (XEXP (rtl, 0))) == MODE_INT
+ if (SCALAR_INT_MODE_P (GET_MODE (XEXP (rtl, 0)))
&& (GET_CODE (rtl) == FLOAT
|| GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0)))
<= DWARF2_ADDR_SIZE))
cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die;
cvt->dw_loc_oprnd1.v.val_die_ref.external = 0;
add_loc_descr (&op0, cvt);
- if (GET_MODE_CLASS (mode) == MODE_INT
+ if (SCALAR_INT_MODE_P (mode)
&& (GET_CODE (rtl) == FIX
|| GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE))
{
/* FALLTHRU */
do_default:
default:
- if ((GET_MODE_CLASS (mode) == MODE_INT && GET_MODE (rtl) == mode
+ if ((SCALAR_INT_MODE_P (mode)
+ && GET_MODE (rtl) == mode
&& GET_MODE_SIZE (GET_MODE (rtl)) <= DWARF2_ADDR_SIZE
&& dwarf_version >= 4)
|| (!dwarf_strict && mode != VOIDmode && mode != BLKmode))