aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-08-16 01:15:37 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-08-15 21:15:37 -0400
commit7393c6422b26ff6275354b69b74cb06c280caa16 (patch)
treefae62ef4946025fccda89bb881cd3b03f4785068 /gcc/fold-const.c
parent81baa09a56392e03742b4b253b9fd82b3ecbd783 (diff)
downloadgcc-7393c6422b26ff6275354b69b74cb06c280caa16.zip
gcc-7393c6422b26ff6275354b69b74cb06c280caa16.tar.gz
gcc-7393c6422b26ff6275354b69b74cb06c280caa16.tar.bz2
calls.c (ECF_SP_DEPRESSED): New macro.
* calls.c (ECF_SP_DEPRESSED): New macro. (calls_function_1): Treat calling sp-depressed function as alloca. (emit_call_1): Don't adjust SP if calling sp-depressed function. (expand_call): Set ECF_SP_DEPRESSED if TYPE_RETURNS_STACK_DEPRESSED. If sp-depressed, ensure block saves and restores SP. * fold-const.c (extract_muldiv): Only check TYPE_IS_SIZETYPE for INTEGER_TYPE. * function.c (keep_stack_depressed): New function. (thread_prologue_and_epilogue_insns): Call it. * print-tree.c (print_node): Use HOST_WIDE_INT_PRINT_UNSIGNED to print DECL_OFFSET_ALIGN. Print no-force-blk and transparent-union flags properly. * stmt.c (expand_goto_internal): Don't restore stack if last block and function returns with sp depressed. (fixup_gotos): Likewise. (save_stack_pointer): New function, from code in expand_decl. (expand_decl): Call new function. * tree.h (TYPE_IS_SIZETYPE): Call INTEGER_TYPE_CHECK. (TYPE_RETURNS_STACK_DEPRESSED): New macro. (save_stack_pointer): New declaration. From-SVN: r35734
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 09bc75f..88ee674 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -4402,7 +4402,8 @@ extract_muldiv (t, c, code, wide_type)
|| TREE_CODE_CLASS (TREE_CODE (op0)) == '2'
|| TREE_CODE_CLASS (TREE_CODE (op0)) == 'e')
&& TREE_UNSIGNED (TREE_TYPE (op0))
- && ! TYPE_IS_SIZETYPE (TREE_TYPE (op0))
+ && ! (TREE_CODE (TREE_TYPE (op0)) == INTEGER_TYPE
+ && TYPE_IS_SIZETYPE (TREE_TYPE (op0)))
&& (GET_MODE_SIZE (TYPE_MODE (ctype))
> GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (op0)))))
break;
@@ -4527,7 +4528,7 @@ extract_muldiv (t, c, code, wide_type)
the operation since it will change the result if the original
computation overflowed. */
if (TREE_UNSIGNED (ctype)
- && ! TYPE_IS_SIZETYPE (ctype)
+ && ! (TREE_CODE (ctype) == INTEGER_TYPE && TYPE_IS_SIZETYPE (ctype))
&& ctype != type)
break;
@@ -4591,7 +4592,7 @@ extract_muldiv (t, c, code, wide_type)
this since it will change the result if the original computation
overflowed. */
if ((! TREE_UNSIGNED (ctype)
- || TYPE_IS_SIZETYPE (ctype))
+ || (TREE_CODE (ctype) == INTEGER_TYPE && TYPE_IS_SIZETYPE (ctype)))
&& ((code == MULT_EXPR && tcode == EXACT_DIV_EXPR)
|| (tcode == MULT_EXPR
&& code != TRUNC_MOD_EXPR && code != CEIL_MOD_EXPR