diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2000-03-30 11:47:08 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2000-03-30 06:47:08 -0500 |
commit | 19caa751a84a1ff3a90a5dc64e3f4c5cac6ce97f (patch) | |
tree | 329b51ffb0413c60bc6cbeaca6487042e3b6592d /gcc/optabs.c | |
parent | 2dc4d9f050c5d46500c925725a5f18303dd882c1 (diff) | |
download | gcc-19caa751a84a1ff3a90a5dc64e3f4c5cac6ce97f.tar.gz |
builtins.c (get_pointer_alignment): Use host_integerp & tree_low_cst.
* builtins.c (get_pointer_alignment): Use host_integerp & tree_low_cst.
(expand_builtin_apply): Pass alignment to emit_block_move in bits.
(expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
(expand_builtin_memset): Likewise, but to clear_storage.
* calls.c (save_fixed_argument_area): Likewise, to move_by_pieces.
(restore_fixed_argument_area): Likewise.
(store_unaligned_arguments_into_pseudos): Likewise, to store_bit_field.
(load_register_parameters): Likewise, to emit_group_load.
(expand_call): Likewise, to emit_group_store and emit_block_move.
(emit_library_call_value_1): Likewise, to emit_block_move.
(store_one_arg): Likewise, and to emit_push_insn.
* expmed.c (extract_bit_field): Alignment is in bits, not bytes.
(extract_fixed_bit_field, extract_split_bit_field): Likewise.
* expr.c (move_by_pieces, move_by_pieces_ninsns): Likewise.
(emit_block_move, emit_group_load, emit_group_store): Likewise.
(clear_by_pieces, clear_storage, emit_push_insn): Likewise.
(expand_assigment, store_expr, store_constructor_field): Likewise.
(expand_expr_unaligned, do_jump, do_compare_and_jump): Likewise.
(store_constructor, store_field, get_inner_reference): Likewise.
Use host_integerp and tree_low_cst; sizes and positions HOST_WIDE_INT.
(expand_expr, case COMPONENT_REF): Likewise.
(copy_blkmode_from_regs): Use UNSIGNED_HOST_WIDE_INT for sizes
and positions; reindent code.
* expr.h (emit_cmp_insn, emit_cmp_and_jump_insns): Alignment unsigned.
* function.c (purge_addressof_1): Pass bit align to store_bit_field.
(assign_parms): Likewise to emit_group_store.
* optbas.c (prepare_cmp_insn): Alignment is in bits.
(emit_cmp_and_jump_insns, emit_cmp_insn): Likewise, and also unsigned.
* stmt.c (expand_value_return): Pass align in bits to emit_group_load.
(expand_return): Likewise to {extract,store}_bit_field.
* stor-layout.c (get_mode_alignment): Minor cleanup.
* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Align is in bits.
* config/sh/sh.h (MOVE_BY_PIECES_P): Likewise.
* ch/expr.c (chill_expand_expr): Pass bit alignment to emit_block_move.
From-SVN: r32827
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index b92f1e1858d..61b1547bb27 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2916,6 +2916,7 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align, 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); @@ -2932,10 +2933,12 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align, /* If we are inside an appropriately-short loop and one operand is an expensive constant, force it into a register. */ - if (CONSTANT_P (x) && preserve_subexpressions_p () && rtx_cost (x, COMPARE) > 2) + if (CONSTANT_P (x) && preserve_subexpressions_p () + && rtx_cost (x, COMPARE) > 2) x = force_reg (mode, x); - if (CONSTANT_P (y) && preserve_subexpressions_p () && rtx_cost (y, COMPARE) > 2) + if (CONSTANT_P (y) && preserve_subexpressions_p () + && rtx_cost (y, COMPARE) > 2) y = force_reg (mode, y); #ifdef HAVE_cc0 @@ -2970,7 +2973,7 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align, { result_mode = insn_data[(int) CODE_FOR_cmpstrqi].operand[0].mode; result = gen_reg_rtx (result_mode); - emit_insn (gen_cmpstrqi (result, x, y, size, GEN_INT (align))); + emit_insn (gen_cmpstrqi (result, x, y, size, opalign)); } else #endif @@ -2981,7 +2984,7 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align, { result_mode = insn_data[(int) CODE_FOR_cmpstrhi].operand[0].mode; result = gen_reg_rtx (result_mode); - emit_insn (gen_cmpstrhi (result, x, y, size, GEN_INT (align))); + emit_insn (gen_cmpstrhi (result, x, y, size, opalign)); } else #endif @@ -2993,7 +2996,7 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, align, size = protect_from_queue (size, 0); emit_insn (gen_cmpstrsi (result, x, y, convert_to_mode (SImode, size, 1), - GEN_INT (align))); + opalign)); } else #endif @@ -3190,7 +3193,7 @@ emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, label) rtx size; enum machine_mode mode; int unsignedp; - int align; + unsigned int align; rtx label; { rtx op0; @@ -3227,6 +3230,7 @@ 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) rtx x, y; @@ -3234,7 +3238,7 @@ emit_cmp_insn (x, y, comparison, size, mode, unsignedp, align) rtx size; enum machine_mode mode; int unsignedp; - int align; + unsigned int align; { emit_cmp_and_jump_insns (x, y, comparison, size, mode, unsignedp, align, 0); } |