diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2002-04-03 23:55:22 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2002-04-03 23:55:22 +0000 |
commit | 053d3344d411a28cb7d59ea924e7e81caa0255e8 (patch) | |
tree | 931bc4ff09b1b36075cdcb723633e0f1da2bcd32 /gcc | |
parent | 61ab52602318de76659b6916ae3d937d57a32adb (diff) | |
download | gcc-053d3344d411a28cb7d59ea924e7e81caa0255e8.zip gcc-053d3344d411a28cb7d59ea924e7e81caa0255e8.tar.gz gcc-053d3344d411a28cb7d59ea924e7e81caa0255e8.tar.bz2 |
cris.c (cris_target_asm_function_prologue): Cast uses of PIC_OFFSET_TABLE_REGNUM to int to silence warnings.
* config/cris/cris.c (cris_target_asm_function_prologue): Cast
uses of PIC_OFFSET_TABLE_REGNUM to int to silence warnings.
(cris_target_asm_function_epilogue): Ditto.
(cris_initial_frame_pointer_offset): Ditto.
(cris_simple_epilogue): Ditto.
(cris_expand_builtin_va_arg): Variable-size types come in
by-reference.
From-SVN: r51825
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/cris/cris.c | 52 |
2 files changed, 37 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f44264b..ce125ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2002-04-04 Hans-Peter Nilsson <hp@axis.com> + + * config/cris/cris.c (cris_target_asm_function_prologue): Cast + uses of PIC_OFFSET_TABLE_REGNUM to int to silence warnings. + (cris_target_asm_function_epilogue): Ditto. + (cris_initial_frame_pointer_offset): Ditto. + (cris_simple_epilogue): Ditto. + (cris_expand_builtin_va_arg): Variable-size types come in + by-reference. + 2002-04-03 David S. Miller <davem@redhat.com> * config/sparc/crtfastmath.c (FPRS_NS): Get it right for diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 2fe9ea4..ff0c52a 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -711,7 +711,7 @@ cris_target_asm_function_prologue (file, size) { if ((((regs_ever_live[regno] && !call_used_regs[regno]) - || (regno == PIC_OFFSET_TABLE_REGNUM + || (regno == (int) PIC_OFFSET_TABLE_REGNUM && (current_function_uses_pic_offset_table /* It is saved anyway, if there would be a gap. */ || (flag_pic @@ -1043,7 +1043,7 @@ cris_target_asm_function_epilogue (file, size) regno++) if ((((regs_ever_live[regno] && !call_used_regs[regno]) - || (regno == PIC_OFFSET_TABLE_REGNUM + || (regno == (int) PIC_OFFSET_TABLE_REGNUM && (current_function_uses_pic_offset_table /* It is saved anyway, if there would be a gap. */ || (flag_pic @@ -1069,7 +1069,7 @@ cris_target_asm_function_epilogue (file, size) regno--) if ((((regs_ever_live[regno] && !call_used_regs[regno]) - || (regno == PIC_OFFSET_TABLE_REGNUM + || (regno == (int) PIC_OFFSET_TABLE_REGNUM && (current_function_uses_pic_offset_table /* It is saved anyway, if there would be a gap. */ || (flag_pic @@ -1659,7 +1659,7 @@ cris_initial_frame_pointer_offset () for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) if ((((regs_ever_live[regno] && !call_used_regs[regno]) - || (regno == PIC_OFFSET_TABLE_REGNUM + || (regno == (int) PIC_OFFSET_TABLE_REGNUM && (current_function_uses_pic_offset_table /* It is saved anyway, if there would be a gap. */ || (flag_pic @@ -2051,7 +2051,7 @@ cris_simple_epilogue () in the delay-slot of the "ret". */ for (regno = 0; regno < reglimit; regno++) if ((regs_ever_live[regno] && ! call_used_regs[regno]) - || (regno == PIC_OFFSET_TABLE_REGNUM + || (regno == (int) PIC_OFFSET_TABLE_REGNUM && (current_function_uses_pic_offset_table /* It is saved anyway, if there would be a gap. */ || (flag_pic @@ -2626,7 +2626,7 @@ cris_expand_builtin_va_arg (valist, type) if (type == error_mark_node || (type_size = TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type))) == NULL || TREE_OVERFLOW (type_size)) - /* Presumable an error; the size isn't computable. A message has + /* Presumably an error; the size isn't computable. A message has supposedly been emitted elsewhere. */ rounded_size = size_zero_node; else @@ -2640,28 +2640,30 @@ cris_expand_builtin_va_arg (valist, type) if (!integer_zerop (rounded_size)) { - /* Check if the type is passed by value or by reference. This test must - be different than the call-site test and be done at run-time: - gcc.c-torture/execute/20020307-2.c. Hence the tree stuff. - - Values up to 8 bytes are passed by-value, padded to register-size - (4 bytes). Larger values are passed by-reference. */ + /* Check if the type is passed by value or by reference. Values up + to 8 bytes are passed by-value, padded to register-size (4 + bytes). Larger values and varying-size types are passed + by reference. */ passed_size - = fold (build (COND_EXPR, sizetype, - fold (build (GT_EXPR, sizetype, - rounded_size, - size8)), - size4, - rounded_size)); + = (!really_constant_p (type_size) + ? size4 + : fold (build (COND_EXPR, sizetype, + fold (build (GT_EXPR, sizetype, + rounded_size, + size8)), + size4, + rounded_size))); addr_tree - = fold (build (COND_EXPR, TREE_TYPE (addr_tree), - fold (build (GT_EXPR, sizetype, - rounded_size, - size8)), - build1 (INDIRECT_REF, build_pointer_type (type), - addr_tree), - addr_tree)); + = (!really_constant_p (type_size) + ? build1 (INDIRECT_REF, build_pointer_type (type), addr_tree) + : fold (build (COND_EXPR, TREE_TYPE (addr_tree), + fold (build (GT_EXPR, sizetype, + rounded_size, + size8)), + build1 (INDIRECT_REF, build_pointer_type (type), + addr_tree), + addr_tree))); } addr = expand_expr (addr_tree, NULL_RTX, Pmode, EXPAND_NORMAL); |