summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-18 20:43:13 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-18 20:43:13 +0000
commit85d654ddd4b94ecbd2d2f291a6b6404fcde249ec (patch)
treedc06eda173c4ba3b692dac9d2c7c0e70f0eeba75 /gcc/expr.c
parent282368caa60b41902b386d6890cc601ee18a9e29 (diff)
downloadgcc-85d654ddd4b94ecbd2d2f291a6b6404fcde249ec.tar.gz
PR target/11184
* builtins.c (expand_builtin_apply): Use convert_memory_address before returning the value. * alias.c (find_base_value): Simplify use of convert_memory_address. (find_base_term): Likewise. * builtins.c (expand_builtin_stejmp_setup): Likewise. (expand_builtin_longjmp): Likewise. (expand_builtin_prefetch): Likewise. (get_memory_rtx): Likewise. (expand_builtin_return): Likewise. (expand_builtin_memcpy): Likewise. (expand_builtin_strncpy): Likewise. (expand_builtin_memset): Likewise. (expand_builtin_va_arg): Likewise. (expand_builtin_va_copy): Likewise. (expand_builtin_alloca): Likewise. * calls.c (expand_call): Likewise. * except.c (expand_builtin_extract_return_addr): Likewise. (expand_builtin_eh_return): Likewise. * explow.c (convert_memory_address): Define even when POINTER_EXTEND_UNSIGNED is not defined. Do nothing if the address is already in the right mode. * explow.c (memory_address): Simplify use of convert_memory_address. (probe_stack_range): Likewise. * expmed.c (make_tree): Likewise. * expr.c (emit_block_move_in_libcall): Likewise. (expand_assignment): Likewise. (expand_expr): Likewise. * function.c (assign_parms): Likewise. (expand_function_end): Likewise. * integrate.c (copy_rtx_and_substitute): Likewise. * stmt.c (expand_computed_goto): Likewise. PR target/11184 * gcc.dg/builtin-apply1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71539 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 0b6a93b3a16..5c055462a90 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1957,10 +1957,8 @@ emit_block_move_via_libcall (rtx dst, rtx src, rtx size)
dst_addr = copy_to_mode_reg (Pmode, XEXP (dst, 0));
src_addr = copy_to_mode_reg (Pmode, XEXP (src, 0));
-#ifdef POINTERS_EXTEND_UNSIGNED
dst_addr = convert_memory_address (ptr_mode, dst_addr);
src_addr = convert_memory_address (ptr_mode, src_addr);
-#endif
dst_tree = make_tree (ptr_type_node, dst_addr);
src_tree = make_tree (ptr_type_node, src_addr);
@@ -4299,11 +4297,8 @@ expand_assignment (tree to, tree from, int want_value)
emit_block_move (to_rtx, value, expr_size (from), BLOCK_OP_NORMAL);
else
{
-#ifdef POINTERS_EXTEND_UNSIGNED
- if (POINTER_TYPE_P (TREE_TYPE (to))
- && GET_MODE (to_rtx) != GET_MODE (value))
+ if (POINTER_TYPE_P (TREE_TYPE (to)))
value = convert_memory_address (GET_MODE (to_rtx), value);
-#endif
emit_move_insn (to_rtx, value);
}
preserve_temp_slots (to_rtx);
@@ -9228,11 +9223,8 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode,
if (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER)
{
op0 = XEXP (op0, 0);
-#ifdef POINTERS_EXTEND_UNSIGNED
- if (GET_MODE (op0) == Pmode && GET_MODE (op0) != mode
- && mode == ptr_mode)
+ if (GET_MODE (op0) == Pmode && mode == ptr_mode)
op0 = convert_memory_address (ptr_mode, op0);
-#endif
return op0;
}
@@ -9293,11 +9285,8 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode,
&& ! REG_USERVAR_P (op0))
mark_reg_pointer (op0, TYPE_ALIGN (TREE_TYPE (type)));
-#ifdef POINTERS_EXTEND_UNSIGNED
- if (GET_MODE (op0) == Pmode && GET_MODE (op0) != mode
- && mode == ptr_mode)
+ if (GET_MODE (op0) == Pmode && mode == ptr_mode)
op0 = convert_memory_address (ptr_mode, op0);
-#endif
return op0;