aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-03-30 11:47:08 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-03-30 06:47:08 -0500
commit19caa751a84a1ff3a90a5dc64e3f4c5cac6ce97f (patch)
tree329b51ffb0413c60bc6cbeaca6487042e3b6592d /gcc/calls.c
parent2dc4d9f050c5d46500c925725a5f18303dd882c1 (diff)
downloadgcc-19caa751a84a1ff3a90a5dc64e3f4c5cac6ce97f.zip
gcc-19caa751a84a1ff3a90a5dc64e3f4c5cac6ce97f.tar.gz
gcc-19caa751a84a1ff3a90a5dc64e3f4c5cac6ce97f.tar.bz2
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/calls.c')
-rw-r--r--gcc/calls.c45
1 files changed, 20 insertions, 25 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index 37fc928..646f4b9 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -856,11 +856,11 @@ save_fixed_argument_area (reg_parm_stack_space, argblock,
if (save_mode == BLKmode)
{
save_area = assign_stack_temp (BLKmode, num_to_save, 0);
- /* Cannot use emit_block_move here because it can be done by a library
- call which in turn gets into this place again and deadly infinite
- recursion happens. */
+ /* Cannot use emit_block_move here because it can be done by a
+ library call which in turn gets into this place again and deadly
+ infinite recursion happens. */
move_by_pieces (validize_mem (save_area), stack_area, num_to_save,
- PARM_BOUNDARY / BITS_PER_UNIT);
+ PARM_BOUNDARY);
}
else
{
@@ -900,8 +900,7 @@ restore_fixed_argument_area (save_area, argblock, high_to_save, low_to_save)
call which in turn gets into this place again and deadly infinite
recursion happens. */
move_by_pieces (stack_area, validize_mem (save_area),
- high_to_save - low_to_save + 1,
- PARM_BOUNDARY / BITS_PER_UNIT);
+ high_to_save - low_to_save + 1, PARM_BOUNDARY);
}
#endif
@@ -968,12 +967,10 @@ store_unaligned_arguments_into_pseudos (args, num_actuals)
bytes -= bitsize / BITS_PER_UNIT;
store_bit_field (reg, bitsize, big_endian_correction, word_mode,
- extract_bit_field (word, bitsize, 0, 1,
- NULL_RTX, word_mode,
- word_mode,
- bitalign / BITS_PER_UNIT,
+ extract_bit_field (word, bitsize, 0, 1, NULL_RTX,
+ word_mode, word_mode, bitalign,
BITS_PER_WORD),
- bitalign / BITS_PER_UNIT, BITS_PER_WORD);
+ bitalign, BITS_PER_WORD);
}
}
}
@@ -1656,12 +1653,9 @@ load_register_parameters (args, num_actuals, call_fusage)
locations. The Irix 6 ABI has examples of this. */
if (GET_CODE (reg) == PARALLEL)
- {
- emit_group_load (reg, args[i].value,
- int_size_in_bytes (TREE_TYPE (args[i].tree_value)),
- (TYPE_ALIGN (TREE_TYPE (args[i].tree_value))
- / BITS_PER_UNIT));
- }
+ emit_group_load (reg, args[i].value,
+ int_size_in_bytes (TREE_TYPE (args[i].tree_value)),
+ TYPE_ALIGN (TREE_TYPE (args[i].tree_value)));
/* If simple case, just do move. If normal partial, store_one_arg
has already loaded the register for us. In all other cases,
@@ -2911,7 +2905,8 @@ expand_call (exp, target, ignore)
if (! rtx_equal_p (target, valreg))
emit_group_store (target, valreg, bytes,
- TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT);
+ TYPE_ALIGN (TREE_TYPE (exp)));
+
/* We can not support sibling calls for this case. */
sibcall_failure = 1;
}
@@ -2992,7 +2987,7 @@ expand_call (exp, target, ignore)
emit_block_move (stack_area,
validize_mem (args[i].save_area),
GEN_INT (args[i].size.constant),
- PARM_BOUNDARY / BITS_PER_UNIT);
+ PARM_BOUNDARY);
sibcall_failure = 1;
}
@@ -3474,8 +3469,7 @@ emit_library_call_value_1 (retval, orgfun, value, no_queue, outmode, nargs, p)
{
save_area = assign_stack_temp (BLKmode, num_to_save, 0);
emit_block_move (validize_mem (save_area), stack_area,
- GEN_INT (num_to_save),
- PARM_BOUNDARY / BITS_PER_UNIT);
+ GEN_INT (num_to_save), PARM_BOUNDARY);
}
else
{
@@ -3540,6 +3534,7 @@ emit_library_call_value_1 (retval, orgfun, value, no_queue, outmode, nargs, p)
emit_move_insn (argvec[argnum].save_area, stack_area);
}
}
+
emit_push_insn (val, mode, NULL_TREE, NULL_RTX, 0, partial, reg, 0,
argblock, GEN_INT (argvec[argnum].offset.constant),
reg_parm_stack_space, ARGS_SIZE_RTX (alignment_pad));
@@ -3684,7 +3679,7 @@ emit_library_call_value_1 (retval, orgfun, value, no_queue, outmode, nargs, p)
else
emit_block_move (stack_area, validize_mem (save_area),
GEN_INT (high_to_save - low_to_save + 1),
- PARM_BOUNDARY / BITS_PER_UNIT);
+ PARM_BOUNDARY);
}
#endif
@@ -3922,7 +3917,7 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size,
preserve_temp_slots (arg->save_area);
emit_block_move (validize_mem (arg->save_area), stack_area,
GEN_INT (arg->size.constant),
- PARM_BOUNDARY / BITS_PER_UNIT);
+ PARM_BOUNDARY);
}
else
{
@@ -4084,8 +4079,8 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size,
}
emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
- TYPE_ALIGN (TREE_TYPE (pval)) / BITS_PER_UNIT, partial,
- reg, excess, argblock, ARGS_SIZE_RTX (arg->offset),
+ TYPE_ALIGN (TREE_TYPE (pval)), partial, reg, excess,
+ argblock, ARGS_SIZE_RTX (arg->offset),
reg_parm_stack_space,
ARGS_SIZE_RTX (arg->alignment_pad));
}