mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-26 16:51:01 +08:00
alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
* alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P. * emit-rtl.c (change_address): Fix typo in default alignment. (adjust_address_1): Use mode of NEW, not MODE, when setting size. * expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case. * rtl.h (REGNO_PTR_FRAME_P): New macro. * expr.c (store_field): Pass tree instead of max size; callers changed. Change handling of alignment. Only copy to_rtx if is TARGET. (expand_expr_unaligned): Delete; callers now use expand_expr. (emit_cmp_insn): No longer take ALIGN parm; all callers changed. (expand_assignment): Change handling of alignment. Only copy to_rtx if was original. (get_inner_reference): No longer return alginment; callers changed. (expand_expr, case COMPONENT_REF): Change handling of alignment. (expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned. (compare_from_rtx): Delete ALIGN parm; all callers changed. (do_compare_rtx_and_jump): Likewise. * expr.h: Reflect above changes. * tree.h: Likewise. * dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter to get_inner_reference. * except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns. * explow.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. (prepare_cmp_insn): Now static; remove ALIGN parm. Callers changed. (emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed. * fold-const.c: Remove PALIGN in calls to get_inner_reference. * function.c (assign_stack_temp_for_type): No longer static. * optabs.h (emit_cmp_insn): Remove ALIGN parm. (prepare_cmp_insn): Delete declaration. * rtl.h (assign_stack_temp_for_type): Add declaration. * config/d30v/d30v.c: Reflect above changes. * config/i860/i860.c, config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c, config/sh/sh.c: Likewise. * ada/trans.c, ada/utils2.c: Remove PALIGN parameter to get_inner_reference. From-SVN: r47075
This commit is contained in:
parent
d215024f7f
commit
a06ef755a3
@ -1,3 +1,42 @@
|
||||
Thu Nov 15 17:57:48 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
|
||||
* emit-rtl.c (change_address): Fix typo in default alignment.
|
||||
(adjust_address_1): Use mode of NEW, not MODE, when setting size.
|
||||
* expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case.
|
||||
* rtl.h (REGNO_PTR_FRAME_P): New macro.
|
||||
|
||||
* expr.c (store_field): Pass tree instead of max size; callers changed.
|
||||
Change handling of alignment.
|
||||
Only copy to_rtx if is TARGET.
|
||||
(expand_expr_unaligned): Delete; callers now use expand_expr.
|
||||
(emit_cmp_insn): No longer take ALIGN parm; all callers changed.
|
||||
(expand_assignment): Change handling of alignment.
|
||||
Only copy to_rtx if was original.
|
||||
(get_inner_reference): No longer return alginment; callers changed.
|
||||
(expand_expr, case COMPONENT_REF): Change handling of alignment.
|
||||
(expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned.
|
||||
(compare_from_rtx): Delete ALIGN parm; all callers changed.
|
||||
(do_compare_rtx_and_jump): Likewise.
|
||||
* expr.h: Reflect above changes.
|
||||
* tree.h: Likewise.
|
||||
* dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter
|
||||
to get_inner_reference.
|
||||
* except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns.
|
||||
* explow.c: Likewise.
|
||||
* loop.c: Likewise.
|
||||
* optabs.c: Likewise.
|
||||
(prepare_cmp_insn): Now static; remove ALIGN parm. Callers changed.
|
||||
(emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed.
|
||||
* fold-const.c: Remove PALIGN in calls to get_inner_reference.
|
||||
* function.c (assign_stack_temp_for_type): No longer static.
|
||||
* optabs.h (emit_cmp_insn): Remove ALIGN parm.
|
||||
(prepare_cmp_insn): Delete declaration.
|
||||
* rtl.h (assign_stack_temp_for_type): Add declaration.
|
||||
* config/d30v/d30v.c: Reflect above changes.
|
||||
* config/i860/i860.c, config/ia64/ia64.c: Likewise.
|
||||
* config/rs6000/rs6000.c, config/sh/sh.c: Likewise.
|
||||
|
||||
2001-11-15 Stan Shebs <shebs@apple.com>
|
||||
|
||||
* config/rs6000/rs6000.h: Fix a comment typo.
|
||||
|
@ -1806,9 +1806,9 @@ nonoverlapping_memrefs_p (x, y)
|
||||
if (! rtx_equal_p (basex, basey))
|
||||
return ((CONSTANT_P (basex) && CONSTANT_P (basey))
|
||||
|| (CONSTANT_P (basex) && REG_P (basey)
|
||||
&& REGNO (basey) <= LAST_VIRTUAL_REGISTER)
|
||||
&& REGNO_PTR_FRAME_P (REGNO (basey)))
|
||||
|| (CONSTANT_P (basey) && REG_P (basex)
|
||||
&& REGNO (basex) <= LAST_VIRTUAL_REGISTER));
|
||||
&& REGNO_PTR_FRAME_P (REGNO (basex))));
|
||||
|
||||
sizex = (GET_CODE (rtlx) != MEM ? GET_MODE_SIZE (GET_MODE (rtlx))
|
||||
: MEM_SIZE (rtlx) ? INTVAL (MEM_SIZE (rtlx))
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Definitions of target machine for Mitsubishi D30V.
|
||||
Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Solutions.
|
||||
|
||||
This file is part of GNU CC.
|
||||
@ -2290,7 +2290,7 @@ d30v_expand_builtin_va_arg(valist, type)
|
||||
build_int_2 (1, 0));
|
||||
|
||||
emit_cmp_and_jump_insns (expand_expr (t, NULL_RTX, QImode, EXPAND_NORMAL),
|
||||
GEN_INT (0), EQ, const1_rtx, QImode, 1, 1,
|
||||
GEN_INT (0), EQ, const1_rtx, QImode, 1,
|
||||
lab_false);
|
||||
|
||||
t = build (POSTINCREMENT_EXPR, TREE_TYPE (arg_num), arg_num,
|
||||
|
@ -2312,7 +2312,7 @@ i860_va_arg (valist, type)
|
||||
emit_cmp_and_jump_insns (expand_expr (field, NULL_RTX, 0, 0),
|
||||
GEN_INT (nparm - incr), GT, const0_rtx,
|
||||
TYPE_MODE (TREE_TYPE (field)),
|
||||
TREE_UNSIGNED (field), 0, lab_false);
|
||||
TREE_UNSIGNED (field), lab_false);
|
||||
|
||||
t = fold (build (POSTINCREMENT_EXPR, TREE_TYPE (field), field,
|
||||
build_int_2 (incr, 0)));
|
||||
|
@ -7398,7 +7398,7 @@ ia64_expand_fetch_and_op (binoptab, mode, arglist, target)
|
||||
insn = gen_cmpxchg_acq_di (tmp, mem, tmp, ccv);
|
||||
emit_insn (insn);
|
||||
|
||||
emit_cmp_and_jump_insns (tmp, ret, NE, 0, mode, 1, 0, label);
|
||||
emit_cmp_and_jump_insns (tmp, ret, NE, 0, mode, 1, label);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -7463,7 +7463,7 @@ ia64_expand_op_and_fetch (binoptab, mode, arglist, target)
|
||||
insn = gen_cmpxchg_acq_di (tmp, mem, ret, ccv);
|
||||
emit_insn (insn);
|
||||
|
||||
emit_cmp_and_jump_insns (tmp, old, NE, 0, mode, 1, 0, label);
|
||||
emit_cmp_and_jump_insns (tmp, old, NE, 0, mode, 1, label);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -2866,8 +2866,8 @@ rs6000_va_arg (valist, type)
|
||||
addr_rtx = gen_reg_rtx (Pmode);
|
||||
|
||||
emit_cmp_and_jump_insns (expand_expr (reg, NULL_RTX, QImode, EXPAND_NORMAL),
|
||||
GEN_INT (8 - n_reg + 1),
|
||||
GE, const1_rtx, QImode, 1, 1, lab_false);
|
||||
GEN_INT (8 - n_reg + 1), GE, const1_rtx, QImode, 1,
|
||||
lab_false);
|
||||
|
||||
/* Long long is aligned in the registers. */
|
||||
if (n_reg > 1)
|
||||
|
@ -4507,7 +4507,7 @@ sh_va_arg (valist, type)
|
||||
EXPAND_NORMAL),
|
||||
expand_expr (next_fp_limit, NULL_RTX,
|
||||
Pmode, EXPAND_NORMAL),
|
||||
GE, const1_rtx, Pmode, 1, 1, lab_false);
|
||||
GE, const1_rtx, Pmode, 1, lab_false);
|
||||
|
||||
if (TYPE_ALIGN (type) > BITS_PER_WORD)
|
||||
{
|
||||
@ -4542,7 +4542,7 @@ sh_va_arg (valist, type)
|
||||
EXPAND_NORMAL),
|
||||
expand_expr (next_o_limit, NULL_RTX,
|
||||
Pmode, EXPAND_NORMAL),
|
||||
GT, const1_rtx, Pmode, 1, 1, lab_false);
|
||||
GT, const1_rtx, Pmode, 1, lab_false);
|
||||
|
||||
tmp = build1 (ADDR_EXPR, pptr_type_node, next_o);
|
||||
r = expand_expr (tmp, addr_rtx, Pmode, EXPAND_NORMAL);
|
||||
|
@ -7941,10 +7941,9 @@ loc_descriptor_from_tree (loc, addressp)
|
||||
HOST_WIDE_INT bitsize, bitpos, bytepos;
|
||||
enum machine_mode mode;
|
||||
int volatilep;
|
||||
unsigned int alignment;
|
||||
|
||||
obj = get_inner_reference (loc, &bitsize, &bitpos, &offset, &mode,
|
||||
&unsignedp, &volatilep, &alignment);
|
||||
&unsignedp, &volatilep);
|
||||
|
||||
if (obj == loc)
|
||||
return 0;
|
||||
|
@ -1862,7 +1862,8 @@ change_address (memref, mode, addr)
|
||||
MEM_ATTRS (new)
|
||||
= get_mem_attrs (MEM_ALIAS_SET (memref), 0, 0,
|
||||
mmode == BLKmode ? 0 : GEN_INT (GET_MODE_SIZE (mmode)),
|
||||
mmode == BLKmode ? 1 : GET_MODE_ALIGNMENT (mmode),
|
||||
(mmode == BLKmode ? BITS_PER_UNIT
|
||||
: GET_MODE_ALIGNMENT (mmode)),
|
||||
mmode);
|
||||
|
||||
return new;
|
||||
@ -1915,8 +1916,8 @@ adjust_address_1 (memref, mode, offset, validate, adjust)
|
||||
memalign = MIN (memalign, (offset & -offset) * BITS_PER_UNIT);
|
||||
|
||||
/* We can compute the size in a number of ways. */
|
||||
if (mode != BLKmode)
|
||||
size = GEN_INT (GET_MODE_SIZE (mode));
|
||||
if (GET_MODE (new) != BLKmode)
|
||||
size = GEN_INT (GET_MODE_SIZE (GET_MODE (new)));
|
||||
else if (MEM_SIZE (memref))
|
||||
size = plus_constant (MEM_SIZE (memref), -offset);
|
||||
|
||||
|
15
gcc/except.c
15
gcc/except.c
@ -1752,8 +1752,8 @@ build_post_landing_pads ()
|
||||
else
|
||||
emit_cmp_and_jump_insns (cfun->eh->filter,
|
||||
GEN_INT (c->u.catch.filter),
|
||||
EQ, NULL_RTX, word_mode,
|
||||
0, 0, c->label);
|
||||
EQ, NULL_RTX, word_mode, 0,
|
||||
c->label);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1779,8 +1779,7 @@ build_post_landing_pads ()
|
||||
|
||||
emit_cmp_and_jump_insns (cfun->eh->filter,
|
||||
GEN_INT (region->u.allowed.filter),
|
||||
EQ, NULL_RTX, word_mode, 0, 0,
|
||||
region->label);
|
||||
EQ, NULL_RTX, word_mode, 0, region->label);
|
||||
|
||||
/* We delay the generation of the _Unwind_Resume until we generate
|
||||
landing pads. We emit a marker here so as to get good control
|
||||
@ -2152,8 +2151,7 @@ sjlj_emit_function_enter (dispatch_label)
|
||||
NOTE_EXPECTED_VALUE (note) = gen_rtx_EQ (VOIDmode, x, const0_rtx);
|
||||
|
||||
emit_cmp_and_jump_insns (x, const0_rtx, NE, 0,
|
||||
TYPE_MODE (integer_type_node), 0, 0,
|
||||
dispatch_label);
|
||||
TYPE_MODE (integer_type_node), 0, dispatch_label);
|
||||
}
|
||||
#else
|
||||
expand_builtin_setjmp_setup (plus_constant (XEXP (fc, 0), sjlj_fc_jbuf_ofs),
|
||||
@ -2261,9 +2259,8 @@ sjlj_emit_dispatch_table (dispatch_label, lp_info)
|
||||
continue;
|
||||
}
|
||||
|
||||
emit_cmp_and_jump_insns (dispatch,
|
||||
GEN_INT (lp_info[i].dispatch_index), EQ,
|
||||
NULL_RTX, TYPE_MODE (integer_type_node), 0, 0,
|
||||
emit_cmp_and_jump_insns (dispatch, GEN_INT (lp_info[i].dispatch_index),
|
||||
EQ, NULL_RTX, TYPE_MODE (integer_type_node), 0,
|
||||
cfun->eh->region_array[i]->post_landing_pad);
|
||||
}
|
||||
|
||||
|
@ -1348,7 +1348,7 @@ allocate_dynamic_stack_space (size, target, known_align)
|
||||
NULL_RTX, 1, OPTAB_WIDEN);
|
||||
#endif
|
||||
emit_cmp_and_jump_insns (available, size, GEU, NULL_RTX, Pmode, 1,
|
||||
0, space_available);
|
||||
space_available);
|
||||
#ifdef HAVE_trap
|
||||
if (HAVE_trap)
|
||||
emit_insn (gen_trap ());
|
||||
@ -1564,7 +1564,7 @@ probe_stack_range (first, size)
|
||||
|
||||
emit_label (test_lab);
|
||||
emit_cmp_and_jump_insns (test_addr, last_addr, CMP_OPCODE,
|
||||
NULL_RTX, Pmode, 1, 0, loop_lab);
|
||||
NULL_RTX, Pmode, 1, loop_lab);
|
||||
emit_jump (end_lab);
|
||||
emit_note (NULL, NOTE_INSN_LOOP_END);
|
||||
emit_label (end_lab);
|
||||
|
610
gcc/expr.c
610
gcc/expr.c
File diff suppressed because it is too large
Load Diff
@ -302,8 +302,7 @@ extern int have_sub2_insn PARAMS ((rtx, rtx));
|
||||
/* Emit a pair of rtl insns to compare two rtx's and to jump
|
||||
to a label if the comparison is true. */
|
||||
extern void emit_cmp_and_jump_insns PARAMS ((rtx, rtx, enum rtx_code, rtx,
|
||||
enum machine_mode, int,
|
||||
unsigned int, rtx));
|
||||
enum machine_mode, int, rtx));
|
||||
|
||||
/* Generate code to indirectly jump to a location given in the rtx LOC. */
|
||||
extern void emit_indirect_jump PARAMS ((rtx));
|
||||
@ -542,10 +541,10 @@ extern void do_jump PARAMS ((tree, rtx, rtx));
|
||||
|
||||
/* Generate rtl to compare two rtx's, will call emit_cmp_insn. */
|
||||
extern rtx compare_from_rtx PARAMS ((rtx, rtx, enum rtx_code, int,
|
||||
enum machine_mode, rtx, unsigned int));
|
||||
enum machine_mode, rtx));
|
||||
extern void do_compare_rtx_and_jump PARAMS ((rtx, rtx, enum rtx_code, int,
|
||||
enum machine_mode, rtx,
|
||||
unsigned int, rtx, rtx));
|
||||
rtx, rtx));
|
||||
|
||||
/* Two different ways of generating switch statements. */
|
||||
extern int try_casesi PARAMS ((tree, tree, tree, tree, rtx, rtx));
|
||||
|
@ -3025,7 +3025,6 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
|
||||
enum machine_mode lmode, rmode, nmode;
|
||||
int lunsignedp, runsignedp;
|
||||
int lvolatilep = 0, rvolatilep = 0;
|
||||
unsigned int alignment;
|
||||
tree linner, rinner = NULL_TREE;
|
||||
tree mask;
|
||||
tree offset;
|
||||
@ -3036,7 +3035,7 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
|
||||
do anything if the inner expression is a PLACEHOLDER_EXPR since we
|
||||
then will no longer be able to replace it. */
|
||||
linner = get_inner_reference (lhs, &lbitsize, &lbitpos, &offset, &lmode,
|
||||
&lunsignedp, &lvolatilep, &alignment);
|
||||
&lunsignedp, &lvolatilep);
|
||||
if (linner == lhs || lbitsize == GET_MODE_BITSIZE (lmode) || lbitsize < 0
|
||||
|| offset != 0 || TREE_CODE (linner) == PLACEHOLDER_EXPR)
|
||||
return 0;
|
||||
@ -3046,7 +3045,7 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
|
||||
/* If this is not a constant, we can only do something if bit positions,
|
||||
sizes, and signedness are the same. */
|
||||
rinner = get_inner_reference (rhs, &rbitsize, &rbitpos, &offset, &rmode,
|
||||
&runsignedp, &rvolatilep, &alignment);
|
||||
&runsignedp, &rvolatilep);
|
||||
|
||||
if (rinner == rhs || lbitpos != rbitpos || lbitsize != rbitsize
|
||||
|| lunsignedp != runsignedp || offset != 0
|
||||
@ -3204,7 +3203,6 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
|
||||
tree mask, inner, offset;
|
||||
tree unsigned_type;
|
||||
unsigned int precision;
|
||||
unsigned int alignment;
|
||||
|
||||
/* All the optimizations using this function assume integer fields.
|
||||
There are problems with FP fields since the type_for_size call
|
||||
@ -3224,7 +3222,7 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
|
||||
}
|
||||
|
||||
inner = get_inner_reference (exp, pbitsize, pbitpos, &offset, pmode,
|
||||
punsignedp, pvolatilep, &alignment);
|
||||
punsignedp, pvolatilep);
|
||||
if ((inner == exp && and_mask == 0)
|
||||
|| *pbitsize < 0 || offset != 0
|
||||
|| TREE_CODE (inner) == PLACEHOLDER_EXPR)
|
||||
|
@ -231,8 +231,6 @@ struct insns_for_mem_entry
|
||||
|
||||
static rtx assign_stack_local_1 PARAMS ((enum machine_mode, HOST_WIDE_INT,
|
||||
int, struct function *));
|
||||
static rtx assign_stack_temp_for_type PARAMS ((enum machine_mode,
|
||||
HOST_WIDE_INT, int, tree));
|
||||
static struct temp_slot *find_temp_slot_from_address PARAMS ((rtx));
|
||||
static void put_reg_into_stack PARAMS ((struct function *, rtx, tree,
|
||||
enum machine_mode, enum machine_mode,
|
||||
@ -629,7 +627,7 @@ assign_stack_local (mode, size, align)
|
||||
|
||||
TYPE is the type that will be used for the stack slot. */
|
||||
|
||||
static rtx
|
||||
rtx
|
||||
assign_stack_temp_for_type (mode, size, keep, type)
|
||||
enum machine_mode mode;
|
||||
HOST_WIDE_INT size;
|
||||
|
@ -7663,7 +7663,7 @@ check_dbra_loop (loop, insn_count)
|
||||
/* Add new compare/branch insn at end of loop. */
|
||||
start_sequence ();
|
||||
emit_cmp_and_jump_insns (reg, const0_rtx, cmp_code, NULL_RTX,
|
||||
GET_MODE (reg), 0, 0,
|
||||
GET_MODE (reg), 0,
|
||||
XEXP (jump_label, 0));
|
||||
tem = gen_sequence ();
|
||||
end_sequence ();
|
||||
|
51
gcc/optabs.c
51
gcc/optabs.c
@ -96,10 +96,14 @@ static int expand_cmplxdiv_wide PARAMS ((rtx, rtx, rtx, rtx,
|
||||
rtx, rtx, enum machine_mode,
|
||||
int, enum optab_methods,
|
||||
enum mode_class, optab));
|
||||
static void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
|
||||
enum machine_mode *, int *,
|
||||
enum can_compare_purpose));
|
||||
static enum insn_code can_fix_p PARAMS ((enum machine_mode, enum machine_mode,
|
||||
int, int *));
|
||||
static enum insn_code can_float_p PARAMS ((enum machine_mode, enum machine_mode,
|
||||
int));
|
||||
static enum insn_code can_float_p PARAMS ((enum machine_mode,
|
||||
enum machine_mode,
|
||||
int));
|
||||
static rtx ftruncify PARAMS ((rtx));
|
||||
static optab new_optab PARAMS ((void));
|
||||
static inline optab init_optab PARAMS ((enum rtx_code));
|
||||
@ -352,7 +356,6 @@ expand_cmplxdiv_wide (real0, real1, imag0, imag1, realr, imagr, submode,
|
||||
rtx real_t, imag_t;
|
||||
rtx temp1, temp2, lab1, lab2;
|
||||
enum machine_mode mode;
|
||||
int align;
|
||||
rtx res;
|
||||
optab this_add_optab = add_optab;
|
||||
optab this_sub_optab = sub_optab;
|
||||
@ -392,10 +395,9 @@ expand_cmplxdiv_wide (real0, real1, imag0, imag1, realr, imagr, submode,
|
||||
return 0;
|
||||
|
||||
mode = GET_MODE (temp1);
|
||||
align = GET_MODE_ALIGNMENT (mode);
|
||||
lab1 = gen_label_rtx ();
|
||||
emit_cmp_and_jump_insns (temp1, temp2, LT, NULL_RTX,
|
||||
mode, unsignedp, align, lab1);
|
||||
mode, unsignedp, lab1);
|
||||
|
||||
/* |c| >= |d|; use ratio d/c to scale dividend and divisor. */
|
||||
|
||||
@ -2419,7 +2421,7 @@ expand_abs (mode, op0, target, result_unsignedp, safe)
|
||||
NULL_RTX, op1);
|
||||
else
|
||||
do_compare_rtx_and_jump (target, CONST0_RTX (mode), GE, 0, mode,
|
||||
NULL_RTX, 0, NULL_RTX, op1);
|
||||
NULL_RTX, NULL_RTX, op1);
|
||||
|
||||
op0 = expand_unop (mode, result_unsignedp ? neg_optab : negv_optab,
|
||||
target, target, 0);
|
||||
@ -3035,8 +3037,7 @@ can_compare_p (code, mode, purpose)
|
||||
*PUNSIGNEDP nonzero says that the operands are unsigned;
|
||||
this matters if they need to be widened.
|
||||
|
||||
If they have mode BLKmode, then SIZE specifies the size of both operands,
|
||||
and ALIGN specifies the known shared alignment of the operands.
|
||||
If they have mode BLKmode, then SIZE specifies the size of both operands.
|
||||
|
||||
This function performs all the setup necessary so that the caller only has
|
||||
to emit a single comparison insn. This setup can involve doing a BLKmode
|
||||
@ -3045,22 +3046,19 @@ can_compare_p (code, mode, purpose)
|
||||
The values which are passed in through pointers can be modified; the caller
|
||||
should perform the comparison on the modified values. */
|
||||
|
||||
void
|
||||
prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align,
|
||||
purpose)
|
||||
static void
|
||||
prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, purpose)
|
||||
rtx *px, *py;
|
||||
enum rtx_code *pcomparison;
|
||||
rtx size;
|
||||
enum machine_mode *pmode;
|
||||
int *punsignedp;
|
||||
int align ATTRIBUTE_UNUSED;
|
||||
enum can_compare_purpose purpose;
|
||||
{
|
||||
enum machine_mode mode = *pmode;
|
||||
rtx x = *px, y = *py;
|
||||
int unsignedp = *punsignedp;
|
||||
enum mode_class class;
|
||||
rtx opalign ATTRIBUTE_UNUSED = GEN_INT (align / BITS_PER_UNIT);;
|
||||
|
||||
class = GET_MODE_CLASS (mode);
|
||||
|
||||
@ -3103,6 +3101,8 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align,
|
||||
{
|
||||
rtx result;
|
||||
enum machine_mode result_mode;
|
||||
unsigned int opalign ATTRIBUTE_UNUSED
|
||||
= (MIN (MEM_ALIGN (x), MEM_ALIGN (y)) / BITS_PER_UNIT);
|
||||
|
||||
emit_queue ();
|
||||
x = protect_from_queue (x, 0);
|
||||
@ -3193,8 +3193,7 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align,
|
||||
if (unsignedp && ucmp_optab->handlers[(int) mode].libfunc)
|
||||
libfunc = ucmp_optab->handlers[(int) mode].libfunc;
|
||||
|
||||
emit_library_call (libfunc, 1,
|
||||
word_mode, 2, x, mode, y, mode);
|
||||
emit_library_call (libfunc, 1, word_mode, 2, x, mode, y, mode);
|
||||
|
||||
/* Immediately move the result of the libcall into a pseudo
|
||||
register so reload doesn't clobber the value if it needs
|
||||
@ -3322,8 +3321,7 @@ emit_cmp_and_jump_insn_1 (x, y, mode, comparison, unsignedp, label)
|
||||
need to be widened by emit_cmp_insn. UNSIGNEDP is also used to select
|
||||
the proper branch condition code.
|
||||
|
||||
If X and Y have mode BLKmode, then SIZE specifies the size of both X and Y,
|
||||
and ALIGN specifies the known shared alignment of X and Y.
|
||||
If X and Y have mode BLKmode, then SIZE specifies the size of both X and Y.
|
||||
|
||||
MODE is the mode of the inputs (in case they are const_int).
|
||||
|
||||
@ -3332,13 +3330,12 @@ emit_cmp_and_jump_insn_1 (x, y, mode, comparison, unsignedp, label)
|
||||
unsigned variant based on UNSIGNEDP to select a proper jump instruction. */
|
||||
|
||||
void
|
||||
emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
|
||||
emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, label)
|
||||
rtx x, y;
|
||||
enum rtx_code comparison;
|
||||
rtx size;
|
||||
enum machine_mode mode;
|
||||
int unsignedp;
|
||||
unsigned int align;
|
||||
rtx label;
|
||||
{
|
||||
rtx op0 = x, op1 = y;
|
||||
@ -3366,7 +3363,8 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
|
||||
emit_queue ();
|
||||
if (unsignedp)
|
||||
comparison = unsigned_condition (comparison);
|
||||
prepare_cmp_insn (&op0, &op1, &comparison, size, &mode, &unsignedp, align,
|
||||
|
||||
prepare_cmp_insn (&op0, &op1, &comparison, size, &mode, &unsignedp,
|
||||
ccp_jump);
|
||||
emit_cmp_and_jump_insn_1 (op0, op1, mode, comparison, unsignedp, label);
|
||||
}
|
||||
@ -3374,15 +3372,14 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label)
|
||||
/* Like emit_cmp_and_jump_insns, but generate only the comparison. */
|
||||
|
||||
void
|
||||
emit_cmp_insn (x, y, comparison, size, mode, unsignedp, align)
|
||||
emit_cmp_insn (x, y, comparison, size, mode, unsignedp)
|
||||
rtx x, y;
|
||||
enum rtx_code comparison;
|
||||
rtx size;
|
||||
enum machine_mode mode;
|
||||
int unsignedp;
|
||||
unsigned int align;
|
||||
{
|
||||
emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, 0);
|
||||
emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, 0);
|
||||
}
|
||||
|
||||
/* Emit a library call comparison between floating point X and Y.
|
||||
@ -3738,7 +3735,7 @@ emit_conditional_move (target, code, op0, op1, cmode, op2, op3, mode,
|
||||
and then the conditional move. */
|
||||
|
||||
comparison
|
||||
= compare_from_rtx (op0, op1, code, unsignedp, cmode, NULL_RTX, 0);
|
||||
= compare_from_rtx (op0, op1, code, unsignedp, cmode, NULL_RTX);
|
||||
|
||||
/* ??? Watch for const0_rtx (nop) and const_true_rtx (unconditional)? */
|
||||
/* We can get const0_rtx or const_true_rtx in some circumstances. Just
|
||||
@ -4169,7 +4166,7 @@ expand_float (to, from, unsignedp)
|
||||
|
||||
/* Test whether the sign bit is set. */
|
||||
emit_cmp_and_jump_insns (from, const0_rtx, LT, NULL_RTX, imode,
|
||||
0, 0, neglabel);
|
||||
0, neglabel);
|
||||
|
||||
/* The sign bit is not set. Convert as signed. */
|
||||
expand_float (target, from, 0);
|
||||
@ -4217,7 +4214,7 @@ expand_float (to, from, unsignedp)
|
||||
|
||||
do_pending_stack_adjust ();
|
||||
emit_cmp_and_jump_insns (from, const0_rtx, GE, NULL_RTX, GET_MODE (from),
|
||||
0, 0, label);
|
||||
0, label);
|
||||
|
||||
/* On SCO 3.2.1, ldexp rejects values outside [0.5, 1).
|
||||
Rather than setting up a dconst_dot_5, let's hope SCO
|
||||
@ -4425,7 +4422,7 @@ expand_fix (to, from, unsignedp)
|
||||
/* See if we need to do the subtraction. */
|
||||
do_pending_stack_adjust ();
|
||||
emit_cmp_and_jump_insns (from, limit, GE, NULL_RTX, GET_MODE (from),
|
||||
0, 0, lab1);
|
||||
0, lab1);
|
||||
|
||||
/* If not, do the signed "fix" and branch around fixup code. */
|
||||
expand_fix (to, from, 0);
|
||||
|
@ -291,7 +291,7 @@ extern void emit_0_to_1_insn PARAMS ((rtx));
|
||||
|
||||
/* Emit one rtl insn to compare two rtx's. */
|
||||
extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
|
||||
enum machine_mode, int, unsigned int));
|
||||
enum machine_mode, int));
|
||||
|
||||
/* The various uses that a comparison can have; used by can_compare_p:
|
||||
jumps, conditional moves, store flag operations. */
|
||||
@ -307,10 +307,6 @@ enum can_compare_purpose
|
||||
extern int can_compare_p PARAMS ((enum rtx_code, enum machine_mode,
|
||||
enum can_compare_purpose));
|
||||
|
||||
extern void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
|
||||
enum machine_mode *, int *, int,
|
||||
enum can_compare_purpose));
|
||||
|
||||
extern rtx prepare_operand PARAMS ((int, rtx, int, enum machine_mode,
|
||||
enum machine_mode, int));
|
||||
|
||||
|
11
gcc/rtl.h
11
gcc/rtl.h
@ -1289,6 +1289,8 @@ extern rtx assign_stack_local PARAMS ((enum machine_mode,
|
||||
HOST_WIDE_INT, int));
|
||||
extern rtx assign_stack_temp PARAMS ((enum machine_mode,
|
||||
HOST_WIDE_INT, int));
|
||||
extern rtx assign_stack_temp_for_type PARAMS ((enum machine_mode,
|
||||
HOST_WIDE_INT, int, tree));
|
||||
extern rtx assign_temp PARAMS ((tree, int, int, int));
|
||||
/* In emit-rtl.c */
|
||||
extern rtx emit_insn_before PARAMS ((rtx, rtx));
|
||||
@ -1682,6 +1684,15 @@ extern rtx gen_lowpart_SUBREG PARAMS ((enum machine_mode, rtx));
|
||||
|
||||
#define LAST_VIRTUAL_REGISTER ((FIRST_VIRTUAL_REGISTER) + 4)
|
||||
|
||||
/* Nonzero if REGNUM is a pointer into the stack frame. */
|
||||
#define REGNO_PTR_FRAME_P(REGNUM) \
|
||||
((REGNUM) == STACK_POINTER_REGNUM \
|
||||
|| (REGNUM) == FRAME_POINTER_REGNUM \
|
||||
|| (REGNUM) == HARD_FRAME_POINTER_REGNUM \
|
||||
|| (REGNUM) == ARG_POINTER_REGNUM \
|
||||
|| ((REGNUM) >= FIRST_VIRTUAL_REGISTER \
|
||||
&& (REGNUM) <= LAST_VIRTUAL_REGISTER))
|
||||
|
||||
/* REGNUM never really appearing in the INSN stream. */
|
||||
#define INVALID_REGNUM (~(unsigned int)0)
|
||||
|
||||
|
@ -2577,7 +2577,7 @@ extern tree maybe_build_cleanup PARAMS ((tree));
|
||||
extern tree get_inner_reference PARAMS ((tree, HOST_WIDE_INT *,
|
||||
HOST_WIDE_INT *, tree *,
|
||||
enum machine_mode *, int *,
|
||||
int *, unsigned int *));
|
||||
int *));
|
||||
|
||||
/* Given a DECL or TYPE, return the scope in which it was declared, or
|
||||
NUL_TREE if there is no containing scope. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user