builtins.c (get_memory_rtx): Handle POINTERS_EXTEND_UNSIGNED case.
* builtins.c (get_memory_rtx): Handle POINTERS_EXTEND_UNSIGNED case. (expand_builtin_apply, expand_builtin_return): Likewise. (expand_builtin_va_arg, expand_builtin_va_copy): Likewise. From-SVN: r46598
This commit is contained in:
parent
ff7cc30768
commit
ce2d32cd37
2 changed files with 38 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
Sun Oct 28 15:45:16 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* builtins.c (get_memory_rtx): Handle POINTERS_EXTEND_UNSIGNED case.
|
||||
(expand_builtin_apply, expand_builtin_return): Likewise.
|
||||
(expand_builtin_va_arg, expand_builtin_va_copy): Likewise.
|
||||
|
||||
2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||
|
||||
* ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4,
|
||||
|
|
|
@ -722,11 +722,15 @@ static rtx
|
|||
get_memory_rtx (exp)
|
||||
tree exp;
|
||||
{
|
||||
rtx mem = gen_rtx_MEM (BLKmode,
|
||||
memory_address (BLKmode,
|
||||
expand_expr (exp, NULL_RTX,
|
||||
ptr_mode, EXPAND_SUM)));
|
||||
rtx addr = expand_expr (exp, NULL_RTX, ptr_mode, EXPAND_SUM);
|
||||
rtx mem;
|
||||
|
||||
#ifdef POINTERS_EXTEND_UNSIGNED
|
||||
if (GET_MODE (addr) != Pmode)
|
||||
addr = convert_memory_address (Pmode, addr);
|
||||
#endif
|
||||
|
||||
mem = gen_rtx_MEM (BLKmode, memory_address (BLKmode, addr));
|
||||
set_mem_attributes (mem, exp, 0);
|
||||
|
||||
/* Get an expression we can use to find the attributes to assign to MEM.
|
||||
|
@ -1048,13 +1052,17 @@ expand_builtin_apply (function, arguments, argsize)
|
|||
rtx old_stack_level = 0;
|
||||
rtx call_fusage = 0;
|
||||
|
||||
#ifdef POINTERS_EXTEND_UNSIGNED
|
||||
if (GET_MODE (arguments) != Pmode)
|
||||
arguments = convert_memory_address (Pmode, arguments);
|
||||
#endif
|
||||
|
||||
/* Create a block where the return registers can be saved. */
|
||||
result = assign_stack_local (BLKmode, apply_result_size (), -1);
|
||||
|
||||
/* Fetch the arg pointer from the ARGUMENTS block. */
|
||||
incoming_args = gen_reg_rtx (Pmode);
|
||||
emit_move_insn (incoming_args,
|
||||
gen_rtx_MEM (Pmode, arguments));
|
||||
emit_move_insn (incoming_args, gen_rtx_MEM (Pmode, arguments));
|
||||
#ifndef STACK_GROWS_DOWNWARD
|
||||
incoming_args = expand_simple_binop (Pmode, MINUS, incoming_args, argsize,
|
||||
incoming_args, 0, OPTAB_LIB_WIDEN);
|
||||
|
@ -1218,6 +1226,11 @@ expand_builtin_return (result)
|
|||
rtx reg;
|
||||
rtx call_fusage = 0;
|
||||
|
||||
#ifdef POINTERS_EXTEND_UNSIGNED
|
||||
if (GET_MODE (result) != Pmode)
|
||||
result = convert_memory_address (Pmode, result);
|
||||
#endif
|
||||
|
||||
apply_result_size ();
|
||||
result = gen_rtx_MEM (BLKmode, result);
|
||||
|
||||
|
@ -2959,6 +2972,11 @@ expand_builtin_va_arg (valist, type)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef POINTERS_EXTEND_UNSIGNED
|
||||
if (GET_MODE (addr) != Pmode)
|
||||
addr = convert_memory_address (Pmode, addr);
|
||||
#endif
|
||||
|
||||
result = gen_rtx_MEM (TYPE_MODE (type), addr);
|
||||
set_mem_alias_set (result, get_varargs_alias_set ());
|
||||
|
||||
|
@ -3018,6 +3036,14 @@ expand_builtin_va_copy (arglist)
|
|||
size = expand_expr (TYPE_SIZE_UNIT (va_list_type_node), NULL_RTX,
|
||||
VOIDmode, EXPAND_NORMAL);
|
||||
|
||||
#ifdef POINTERS_EXTEND_UNSIGNED
|
||||
if (GET_MODE (dstb) != Pmode)
|
||||
dstb = convert_memory_address (Pmode, dstb);
|
||||
|
||||
if (GET_MODE (srcb) != Pmode)
|
||||
srcb = convert_memory_address (Pmode, srcb);
|
||||
#endif
|
||||
|
||||
/* "Dereference" to BLKmode memories. */
|
||||
dstb = gen_rtx_MEM (BLKmode, dstb);
|
||||
set_mem_alias_set (dstb, get_alias_set (TREE_TYPE (TREE_TYPE (dst))));
|
||||
|
|
Loading…
Add table
Reference in a new issue