/* Match any CONST_DOUBLE, but only if
we can examine the bits of it reliably. */
if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
- || HOST_BITS_PER_INT != BITS_PER_WORD)
+ || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
&& GET_CODE (op) != VOIDmode && ! flag_pretend_float)
break;
if (GET_CODE (op) == CONST_DOUBLE)
int n_inputs, n_outputs;
char **constraints = (char **) alloca (n_operands * sizeof (char *));
- decode_asm_operands (body, operands, 0, constraints, 0);
+ decode_asm_operands (body, operands, NULL_PTR, constraints, NULL_PTR);
get_asm_operand_lengths (body, n_operands, &n_inputs, &n_outputs);
record_asm_reg_life (insn, regstack, operands, constraints,
n_inputs, n_outputs);
char **constraints
= (char **) alloca (n_operands * sizeof (char *));
- decode_asm_operands (body, operands, operands_loc, constraints, 0);
+ decode_asm_operands (body, operands, operands_loc,
+ constraints, NULL_PTR);
get_asm_operand_lengths (body, n_operands, &n_inputs, &n_outputs);
subst_asm_stack_regs (insn, regstack, operands, operands_loc,
constraints, n_inputs, n_outputs);
}
if (GET_CODE (PATTERN (insn)) == PARALLEL)
- for (i = 0; i < XVECLEN (PATTERN (insn) , 0); i++)
+ for (i = 0; i < XVECLEN (PATTERN (insn), 0); i++)
{
if (stack_regs_mentioned_p (XVECEXP (PATTERN (insn), 0, i)))
subst_stack_regs_pat (insn, regstack,
extern struct obstack *rtl_obstack;
extern long ftell();
+
+#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
+extern long atol();
+#endif
\f
/* Indexed by rtx code, gives number of operands for an rtx with that code.
Does NOT include rtx header data (code and links).
"i" an integer
prints the integer
"n" like "i", but prints entries from `note_insn_name'
+ "w" an integer of width HOST_BITS_PER_WIDE_INT
+ prints the integer
"s" a pointer to a string
prints the string
"S" like "s", but optional:
XEXP (copy, i) = copy_rtx (XEXP (orig, i));
break;
+ case '0':
case 'u':
XEXP (copy, i) = XEXP (orig, i);
break;
}
break;
- default:
+ case 'w':
+ XWINT (copy, i) = XWINT (orig, i);
+ break;
+
+ case 'i':
XINT (copy, i) = XINT (orig, i);
break;
+
+ case 's':
+ case 'S':
+ XSTR (copy, i) = XSTR (orig, i);
+ break;
+
+ default:
+ abort ();
}
}
return copy;
XEXP (copy, i) = copy_most_rtx (XEXP (orig, i), may_share);
break;
+ case '0':
case 'u':
XEXP (copy, i) = XEXP (orig, i);
break;
}
break;
- default:
+ case 'w':
+ XWINT (copy, i) = XWINT (orig, i);
+ break;
+
+ case 'n':
+ case 'i':
XINT (copy, i) = XINT (orig, i);
break;
+
+ case 's':
+ case 'S':
+ XSTR (copy, i) = XSTR (orig, i);
+ break;
+
+ default:
+ abort ();
}
}
return copy;
rtx return_rtx;
register int c;
int tmp_int;
+ HOST_WIDE_INT tmp_wide;
/* Linked list structure for making RTXs: */
struct rtx_list
}
/* get vector length and allocate it */
XVEC (return_rtx, i) = (list_counter
- ? rtvec_alloc (list_counter)
- : (struct rtvec_def *) NULL);
+ ? rtvec_alloc (list_counter) : NULL_RTVEC);
if (list_counter > 0)
{
next_rtx = list_rtx;
}
break;
+ case 'w':
+ read_name (tmp_char, infile);
+#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
+ tmp_wide = atoi (tmp_char);
+#else
+ tmp_wide = atol (tmp_char);
+#endif
+ XWINT (return_rtx, i) = tmp_wide;
+ break;
+
case 'i':
case 'n':
read_name (tmp_char, infile);
/* Set the GET_RTX_FORMAT of CONST_DOUBLE to a string
of as many `i's as we now have elements. */
for (i = 0; i < rtx_length[(int) CONST_DOUBLE]; i++)
- *s++ = 'i';
+ *s++ = 'w';
*s++ = 0;
}
#endif
/* Analyze RTL for C-Compiler
- Copyright (C) 1987, 1988, 1991 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1991, 1992 Free Software Foundation, Inc.
This file is part of GNU CC.
Only obvious integer terms are detected.
This is used in cse.c with the `related_value' field.*/
-int
+HOST_WIDE_INT
get_integer_term (x)
rtx x;
{
if (GET_RTX_CLASS (GET_CODE (p)) == 'i')
{
rtx set = single_set (p);
- rtx note = find_reg_note (p, REG_EQUAL, 0);
+ rtx note = find_reg_note (p, REG_EQUAL, NULL_RTX);
if (set && rtx_equal_p (x, SET_DEST (set)))
{
endregno = regno + (regno < FIRST_PSEUDO_REGISTER
? HARD_REGNO_NREGS (regno, GET_MODE (x)) : 1);
- return refers_to_regno_p (regno, endregno, in, 0);
+ return refers_to_regno_p (regno, endregno, in, NULL_PTR);
}
\f
/* Used for communications between the next few functions. */
{
switch (fmt[i])
{
+ case 'w':
+ if (XWINT (x, i) != XWINT (y, i))
+ return 0;
+ break;
+
case 'n':
case 'i':
if (XINT (x, i) != XINT (y, i))
}
if (immediate_size_expand)
- expand_expr (size, 0, VOIDmode, 0);
+ expand_expr (size, NULL_PTR, VOIDmode, 0);
else
- pending_sizes = tree_cons (0, size, pending_sizes);
+ pending_sizes = tree_cons (NULL_TREE, size, pending_sizes);
return size;
}
if (TREE_STATIC (field))
{
- pending_statics = tree_cons (NULL, field, pending_statics);
+ pending_statics = tree_cons (NULL_TREE, field, pending_statics);
continue;
}
/* Enumerators and enum types which are local to this class need not
/* Create the extreme values based on the number of bits. */
TYPE_MIN_VALUE (type)
- = build_int_2 ((precision-HOST_BITS_PER_INT > 0 ? 0 : (-1)<<(precision-1)),
- (-1)<<(precision-HOST_BITS_PER_INT-1 > 0
- ? precision-HOST_BITS_PER_INT-1
- : 0));
+ = build_int_2 ((precision - HOST_BITS_PER_WIDE_INT > 0
+ ? 0 : (HOST_WIDE_INT) (-1) << (precision - 1)),
+ (((HOST_WIDE_INT) (-1)
+ << (precision - HOST_BITS_PER_WIDE_INT - 1 > 0
+ ? precision-HOST_BITS_PER_WIDE_INT - 1
+ : 0))));
TYPE_MAX_VALUE (type)
- = build_int_2 ((precision-HOST_BITS_PER_INT > 0 ? -1 : (1<<(precision-1))-1),
- (precision-HOST_BITS_PER_INT-1 > 0
- ? (1<<(precision-HOST_BITS_PER_INT-1))-1
+ = build_int_2 ((precision - HOST_BITS_PER_WIDE_INT > 0
+ ? -1 : ((HOST_WIDE_INT) 1 << (precision - 1)) - 1),
+ (precision - HOST_BITS_PER_WIDE_INT - 1 > 0
+ ? (((HOST_WIDE_INT) 1
+ << (precision - HOST_BITS_PER_INT - 1)))-1
: 0));
/* Give this type's extreme values this type as their type. */
TYPE_MIN_VALUE (type) = build_int_2 (0, 0);
TYPE_MAX_VALUE (type)
- = build_int_2 (precision-HOST_BITS_PER_INT >= 0 ? -1 : (1<<precision)-1,
- precision-HOST_BITS_PER_INT > 0
- ? ((unsigned) ~0
- >> (HOST_BITS_PER_INT - (precision - HOST_BITS_PER_INT)))
+ = build_int_2 (precision - HOST_BITS_PER_WIDE_INT >= 0
+ ? -1 : ((HOST_WIDE_INT) 1<< precision) - 1,
+ precision - HOST_BITS_PER_WIDE_INT > 0
+ ? ((unsigned HOST_WIDE_INT) ~0
+ >> (HOST_BITS_PER_WIDE_INT
+ - (precision - HOST_BITS_PER_WIDE_INT)))
: 0);
TREE_TYPE (TYPE_MIN_VALUE (type)) = type;
TREE_TYPE (TYPE_MAX_VALUE (type)) = type;
improperly shared rtl. */
diff = expand_binop (mode, sub_optab, copy_rtx (final_value),
- copy_rtx (initial_value), 0, 0,
+ copy_rtx (initial_value), NULL_RTX, 0,
OPTAB_LIB_WIDEN);
/* Now calculate (diff % (unroll * abs (increment))) by using an
and instruction. */
diff = expand_binop (GET_MODE (diff), and_optab, diff,
- gen_rtx (CONST_INT, VOIDmode,
- unroll_number * abs_inc - 1),
- 0, 0, OPTAB_LIB_WIDEN);
+ GEN_INT (unroll_number * abs_inc - 1),
+ NULL_RTX, 0, OPTAB_LIB_WIDEN);
/* Now emit a sequence of branches to jump to the proper precond
loop entry point. */
else
cmp_const = i;
- emit_cmp_insn (diff, gen_rtx (CONST_INT, VOIDmode,
- abs_inc * cmp_const),
- EQ, 0, mode, 0, 0);
+ emit_cmp_insn (diff, GEN_INT (abs_inc * cmp_const),
+ EQ, NULL_RTX, mode, 0, 0);
if (i == 0)
emit_jump_insn (gen_beq (labels[i]));
else
cmp_const = abs_inc * (unroll_number - 1) + 1;
- emit_cmp_insn (diff, gen_rtx (CONST_INT, VOIDmode, cmp_const),
- EQ, 0, mode, 0, 0);
+ emit_cmp_insn (diff, GEN_INT (cmp_const), EQ, NULL_RTX,
+ mode, 0, 0);
if (neg_inc)
emit_jump_insn (gen_ble (labels[0]));
{
*initial_value = const0_rtx;
*increment = const1_rtx;
- *final_value = gen_rtx (CONST_INT, VOIDmode, loop_n_iterations);
+ *final_value = GEN_INT (loop_n_iterations);
if (loop_dump_stream)
fprintf (loop_dump_stream,
#endif
splittable_regs[regno]
- = gen_rtx (CONST_INT, VOIDmode,
- INTVAL (giv_inc)
+ = GEN_INT (INTVAL (giv_inc)
+ INTVAL (splittable_regs[regno]));
giv_inc = splittable_regs[regno];
/* Check for the case where the pseudo is set by a shift/add
sequence, in which case the first insn setting the pseudo
is the first insn of the shift/add sequence. */
- && (! (tem = find_reg_note (v->insn, REG_RETVAL, 0))
+ && (! (tem = find_reg_note (v->insn, REG_RETVAL, NULL_RTX))
|| (regno_first_uid[REGNO (v->dest_reg)]
!= INSN_UID (XEXP (tem, 0)))))
/* Line above always fails if INSN was moved by loop opt. */
case it is needed later. */
tem = gen_reg_rtx (bl->biv->mode);
- emit_iv_add_mult (increment,
- gen_rtx (CONST_INT, VOIDmode, loop_n_iterations),
+ emit_iv_add_mult (increment, GEN_INT (loop_n_iterations),
bl->initial_value, tem, NEXT_INSN (loop_end));
if (loop_dump_stream)
/* Put the final biv value in tem. */
tem = gen_reg_rtx (bl->biv->mode);
- emit_iv_add_mult (increment,
- gen_rtx (CONST_INT, VOIDmode, loop_n_iterations),
+ emit_iv_add_mult (increment, GEN_INT (loop_n_iterations),
bl->initial_value, tem, insert_before);
/* Subtract off extra increments as we find them. */
start_sequence ();
tem = expand_binop (GET_MODE (tem), sub_optab, tem,
- XEXP (SET_SRC (pattern), 1), 0, 0,
+ XEXP (SET_SRC (pattern), 1), NULL_RTX, 0,
OPTAB_LIB_WIDEN);
seq = gen_sequence ();
end_sequence ();
/* Calculate the number of loop iterations. Returns the exact number of loop
iterations if it can be calculated, otherwise returns zero. */
-unsigned long
+unsigned HOST_WIDE_INT
loop_iterations (loop_start, loop_end)
rtx loop_start, loop_end;
{
rtx comparison, comparison_value;
rtx iteration_var, initial_value, increment, final_value;
enum rtx_code comparison_code;
- int i, increment_dir;
+ HOST_WIDE_INT i;
+ int increment_dir;
int unsigned_compare, compare_dir, final_larger;
unsigned long tempu;
rtx last_loop_insn;
&& (set = single_set (insn))
&& (SET_DEST (set) == comparison_value))
{
- rtx note = find_reg_note (insn, REG_EQUAL, 0);
+ rtx note = find_reg_note (insn, REG_EQUAL, NULL_RTX);
if (note && GET_CODE (XEXP (note, 0)) != EXPR_LIST)
comparison_value = XEXP (note, 0);
/* Final_larger is 1 if final larger, 0 if they are equal, otherwise -1. */
if (unsigned_compare)
final_larger
- = ((unsigned) INTVAL (final_value) > (unsigned) INTVAL (initial_value)) -
- ((unsigned) INTVAL (final_value) < (unsigned) INTVAL (initial_value));
+ = ((unsigned HOST_WIDE_INT) INTVAL (final_value)
+ > (unsigned HOST_WIDE_INT) INTVAL (initial_value))
+ - ((unsigned HOST_WIDE_INT) INTVAL (final_value)
+ < (unsigned HOST_WIDE_INT) INTVAL (initial_value));
else
- final_larger = (INTVAL (final_value) > INTVAL (initial_value)) -
- (INTVAL (final_value) < INTVAL (initial_value));
+ final_larger = (INTVAL (final_value) > INTVAL (initial_value))
+ - (INTVAL (final_value) < INTVAL (initial_value));
if (INTVAL (increment) > 0)
increment_dir = 1;
next_block_number++;
/* Output the subblocks. */
- xcoffout_block (BLOCK_SUBBLOCKS (block), depth + 1, 0);
+ xcoffout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
}
block = BLOCK_CHAIN (block);
}