diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-03-29 21:46:27 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-03-29 21:46:27 +0000 |
commit | b0c48229854447bec65f7f5a6ef1dbbe451cc3fb (patch) | |
tree | e8a67fcfa0ef3614bf38b6f84422372f82aa6004 /gcc/expr.c | |
parent | d52e4867caba3a5833cc2c90ac8df8fe7ccd7b76 (diff) | |
download | gcc-b0c48229854447bec65f7f5a6ef1dbbe451cc3fb.zip gcc-b0c48229854447bec65f7f5a6ef1dbbe451cc3fb.tar.gz gcc-b0c48229854447bec65f7f5a6ef1dbbe451cc3fb.tar.bz2 |
Makefile.in (convert.o, [...]): Update.
* Makefile.in (convert.o, calls.o, expmed.o): Update.
* attribs.c (handle_mode_attribute, handle_vector_size_attribute):
Use new hooks.
* builtin-types.def (BT_PTRMODE): Update.
* c-common.c (type_for_size): Rename c_common_type_for_size.
(type_for_mode): Similarly.
(shorten_compare, pointer_int_sum, c_common_nodes_and_builtins):
Use new hook.
* c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New.
* c-decl.c (finish_enum, build_enumerator): Use new hooks.
* c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
Redefine.
* c-typeck.c (common_type, comptypes, default_conversion):
Use new hooks.
* calls.c: Include langhooks.h.
(emit_library_call_value_1): Use new hooks. Avoid redundant
calls.
* convert.c: Include langhooks.h
(convert_to_pointer, convert_to_integer): Use new hooks.
* except.c (init_eh): Similarly.
* expmed.c: Include langhooks.h.
(expand_mult_add): Use new hooks.
* expr.c (store_expr, store_constructor, expand_expr, do_jump,
try_casesi): Similarly.
* fold-const.c (optimize_bit_field_compare, make_range,
decode_field_reference, fold_truthop, fold): Similarly.
* function.c (assign_stack_local_1, assign_stack_temp_for_type,
put_var_into_stack): Similarly.
* langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE,
LANG_HOOKS_TYPE_FOR_SIZE): New.
(LANG_HOOKS_TYPES_INITIALIZER): Update.
* langhooks.h (lang_hooks_for_types): New hooks.
* stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks.
* tree.c (get_unwidened, get_narrower): Similarly.
* tree.h (type_for_mode, type_for_size): Remove.
* varasm.c (force_const_mem): Use new hooks.
ada:
* gigi.h (type_for_size, type_for_mode): Rename.
* misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
Redefine.
* trans.c (tree_transform): Update.
* utils.c (gnat_init_decl_processing, init_gigi_decls,
builtin_function, float_type_for_size, signed_or_unsigned_type,
build_vms_descriptor, unchecked_convert): Update.
(type_for_mode, type_for_size): Rename.
* utils2.c (nonbinary_modular_operation): Update.
cp:
* cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
Redefine.
* cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
* decl.c (finish_enum): Similarly.
* error.c (dump_type): Similarly.
* lex.c (cxx_init): Similarly.
* mangle.c (write_builtin_type): Similarly.
* typeck.c (comptypes): Similarly.
f:
* com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
Redefine.
(type_for_mode, type_for_size): Rename.
(signed_or_unsigned_type, signed_type, truthvalue_conversion,
unsigned_type): Use new hooks.
java:
* Make-lang.in (builtins.o): Update.
* boehm.c (get_boehm_type_descriptor): Update.
* builtins.c: Include langhooks.h.
* decl.c (java_init_decl_processing): Update.
* java-tree.h (java_type_for_mode, java_type_for_size): New.
* lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
Redefine.
* typeck.c (type_for_mode, type_for_size): Update.
objc:
* objc-act.c (handle_impent): Update.
* objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
Redefine.
From-SVN: r51571
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -4027,8 +4027,9 @@ store_expr (exp, target, want_value) TREE_TYPE (exp)), exp); - exp = convert (type_for_mode (GET_MODE (SUBREG_REG (target)), - SUBREG_PROMOTED_UNSIGNED_P (target)), + exp = convert ((*lang_hooks.types.type_for_mode) + (GET_MODE (SUBREG_REG (target)), + SUBREG_PROMOTED_UNSIGNED_P (target)), exp); inner_target = SUBREG_REG (target); @@ -4526,7 +4527,8 @@ store_constructor (exp, target, cleared, size) if (TYPE_PRECISION (type) < BITS_PER_WORD) { - type = type_for_size (BITS_PER_WORD, TREE_UNSIGNED (type)); + type = (*lang_hooks.types.type_for_size) + (BITS_PER_WORD, TREE_UNSIGNED (type)); value = convert (type, value); } @@ -4955,7 +4957,8 @@ store_constructor (exp, target, cleared, size) { targetx = assign_temp - ((build_qualified_type (type_for_mode (GET_MODE (target), 0), + ((build_qualified_type ((*lang_hooks.types.type_for_mode) + (GET_MODE (target), 0), TYPE_QUAL_CONST)), 0, 1, 1); emit_move_insn (targetx, target); @@ -7015,7 +7018,8 @@ expand_expr (exp, target, tmode, modifier) if (mode == BLKmode) { rtx new = assign_temp (build_qualified_type - (type_for_mode (ext_mode, 0), + ((*lang_hooks.types.type_for_mode) + (ext_mode, 0), TYPE_QUAL_CONST), 0, 1, 1); emit_move_insn (new, op0); @@ -9252,7 +9256,7 @@ do_jump (exp, if_false_label, if_true_label) && TYPE_PRECISION (TREE_TYPE (exp)) <= HOST_BITS_PER_WIDE_INT && (i = tree_floor_log2 (TREE_OPERAND (exp, 1))) >= 0 && (mode = mode_for_size (i + 1, MODE_INT, 0)) != BLKmode - && (type = type_for_mode (mode, 1)) != 0 + && (type = (*lang_hooks.types.type_for_mode) (mode, 1)) != 0 && TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (exp)) && (cmp_optab->handlers[(int) TYPE_MODE (type)].insn_code != CODE_FOR_nothing)) @@ -9312,7 +9316,7 @@ do_jump (exp, if_false_label, if_true_label) get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode, &unsignedp, &volatilep); - type = type_for_size (bitsize, unsignedp); + type = (*lang_hooks.types.type_for_size) (bitsize, unsignedp); if (! SLOW_BYTE_ACCESS && type != 0 && bitsize >= 0 && TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (exp)) @@ -10393,8 +10397,8 @@ try_casesi (index_type, index_expr, minval, range, { if (TYPE_MODE (index_type) != index_mode) { - index_expr = convert (type_for_size (index_bits, 0), - index_expr); + index_expr = convert ((*lang_hooks.types.type_for_size) + (index_bits, 0), index_expr); index_type = TREE_TYPE (index_expr); } |