diff options
author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-07 12:23:46 +0000 |
---|---|---|
committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-07 12:23:46 +0000 |
commit | ce1273ae8831bc22b83d3dcdbb98cfb12bcbcb22 (patch) | |
tree | e2353cab060f79ce84740bf6daa400bdd5d0b2ba /gcc/config/rs6000/rs6000.c | |
parent | 0eb8eaa78e79abc16a7969d23db85f682f9fc6d8 (diff) | |
download | gcc-ce1273ae8831bc22b83d3dcdbb98cfb12bcbcb22.tar.gz |
* config/rs6000/rs6000.c (setup_incoming_varargs): Round up
va_list_gpr_size.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199808 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index cc16e3fb819..3e019bb0697 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -9370,20 +9370,17 @@ setup_incoming_varargs (cumulative_args_t cum, enum machine_mode mode, if (! no_rtl && first_reg_offset < GP_ARG_NUM_REG && cfun->va_list_gpr_size) { - int nregs = GP_ARG_NUM_REG - first_reg_offset; + int n_gpr, nregs = GP_ARG_NUM_REG - first_reg_offset; if (va_list_gpr_counter_field) - { - /* V4 va_list_gpr_size counts number of registers needed. */ - if (nregs > cfun->va_list_gpr_size) - nregs = cfun->va_list_gpr_size; - } + /* V4 va_list_gpr_size counts number of registers needed. */ + n_gpr = cfun->va_list_gpr_size; else - { - /* char * va_list instead counts number of bytes needed. */ - if (nregs > cfun->va_list_gpr_size / reg_size) - nregs = cfun->va_list_gpr_size / reg_size; - } + /* char * va_list instead counts number of bytes needed. */ + n_gpr = (cfun->va_list_gpr_size + reg_size - 1) / reg_size; + + if (nregs > n_gpr) + nregs = n_gpr; mem = gen_rtx_MEM (BLKmode, plus_constant (Pmode, save_area, |