diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-02-01 12:29:18 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-02-01 07:29:18 -0500 |
commit | d54571406e15250c1f73fac6b0ce85438f84b4fb (patch) | |
tree | e5b324c5c826bd74ab4f7fe2ac03b199ea6b5f34 /gcc/builtins.c | |
parent | fcbfaa65a5e27ee6f772056bf52cf27202518def (diff) | |
download | gcc-d54571406e15250c1f73fac6b0ce85438f84b4fb.zip gcc-d54571406e15250c1f73fac6b0ce85438f84b4fb.tar.gz gcc-d54571406e15250c1f73fac6b0ce85438f84b4fb.tar.bz2 |
builtins.c (expand_builtin_alloca): allocate_dynamic_stack_space returns Pmode pseudo, but we need ptr_mode.
* builtins.c (expand_builtin_alloca): allocate_dynamic_stack_space
returns Pmode pseudo, but we need ptr_mode.
* explow.c (allocate_dynamic_stack_space): Use plus_constant.
Remove bogus conversions; use HOST_WIDE_INT for size.
Don't use TARGET if wrong mode.
From-SVN: r39390
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index a49fc17..1a6d87f 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -3095,12 +3095,14 @@ expand_builtin_frame_address (exp) /* Expand a call to the alloca builtin, with arguments ARGLIST. Return 0 if we failed and the caller should emit a normal call, otherwise try to get the result in TARGET, if convenient. */ + static rtx expand_builtin_alloca (arglist, target) tree arglist; rtx target; { rtx op0; + rtx result; if (!validate_arglist (arglist, INTEGER_TYPE, VOID_TYPE)) return 0; @@ -3109,13 +3111,20 @@ expand_builtin_alloca (arglist, target) op0 = expand_expr (TREE_VALUE (arglist), NULL_RTX, VOIDmode, 0); /* Allocate the desired space. */ - return allocate_dynamic_stack_space (op0, target, BITS_PER_UNIT); + result = allocate_dynamic_stack_space (op0, target, BITS_PER_UNIT); + +#ifdef POINTERS_EXTEND_UNSIGNED + result = convert_memory_address (ptr_mode, result); +#endif + + return result; } /* Expand a call to the ffs builtin. The arguments are in ARGLIST. Return 0 if a normal call should be emitted rather than expanding the function in-line. If convenient, the result should be placed in TARGET. SUBTARGET may be used as the target for computing one of EXP's operands. */ + static rtx expand_builtin_ffs (arglist, target, subtarget) tree arglist; @@ -3138,6 +3147,7 @@ expand_builtin_ffs (arglist, target, subtarget) /* If the string passed to fputs is a constant and is one character long, we attempt to transform this call into __builtin_fputc(). */ + static rtx expand_builtin_fputs (arglist, ignore) tree arglist; |