aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-10-20 18:49:24 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-10-20 14:49:24 -0400
commit1468899dc245d342fe730ebf13ba57fb9cfb64a5 (patch)
tree3a24a81738c6c3d1b23cca8d1ee0caa1019323d3
parent391db8c9531d20140ccd67e94f1cc38b6197f704 (diff)
downloadgcc-1468899dc245d342fe730ebf13ba57fb9cfb64a5.zip
gcc-1468899dc245d342fe730ebf13ba57fb9cfb64a5.tar.gz
gcc-1468899dc245d342fe730ebf13ba57fb9cfb64a5.tar.bz2
* function.c (locate_and_pad_parm): Use host_integerp and tree_low_cst.
From-SVN: r36973
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/function.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f30b24f..eb029e3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,7 @@
Fri Oct 20 13:33:16 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+ * function.c (locate_and_pad_parm): Use host_integerp and tree_low_cst.
+
* fold-const.c (force_fit_type): Unsigned values can overflow
if they are sizetype.
(int_const_binop): Don't use cache if overflows.
diff --git a/gcc/function.c b/gcc/function.c
index 40c5f57..c7ff587 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5133,8 +5133,8 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl,
offset_ptr->var = 0;
}
if (where_pad != none
- && (TREE_CODE (sizetree) != INTEGER_CST
- || ((TREE_INT_CST_LOW (sizetree) * BITS_PER_UNIT) % PARM_BOUNDARY)))
+ && (!host_integerp (sizetree, 1)
+ || (tree_low_cst (sizetree, 1) * BITS_PER_UNIT) % PARM_BOUNDARY))
sizetree = round_up (sizetree, PARM_BOUNDARY / BITS_PER_UNIT);
SUB_PARM_SIZE (*offset_ptr, sizetree);
if (where_pad != downward)
@@ -5173,8 +5173,8 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl,
pad_below (offset_ptr, passed_mode, sizetree);
if (where_pad != none
- && (TREE_CODE (sizetree) != INTEGER_CST
- || ((TREE_INT_CST_LOW (sizetree) * BITS_PER_UNIT) % PARM_BOUNDARY)))
+ && (!host_integerp (sizetree, 1)
+ || (tree_low_cst (sizetree, 1) * BITS_PER_UNIT) % PARM_BOUNDARY))
sizetree = round_up (sizetree, PARM_BOUNDARY / BITS_PER_UNIT);
ADD_PARM_SIZE (*arg_size_ptr, sizetree);