summaryrefslogtreecommitdiff
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2017-09-12 13:28:08 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2017-09-12 13:28:08 +0000
commit10fa8f764e615fa0d230c13a41ad39b2ea6bdf95 (patch)
tree6a0d7b2184713f09474d42070b1f6e4fa7670a38 /gcc/config/s390
parentdfdced85e532272576bec46545de1ff3aaa3055a (diff)
downloadgcc-10fa8f764e615fa0d230c13a41ad39b2ea6bdf95.tar.gz
Make more use of REG_NREGS
An upcoming patch will convert hard_regno_nregs into an inline function, which in turn allows hard_regno_nregs to be used as the name of a targetm field. This patch rewrites uses that are more easily (and efficiently) written as REG_NREGS. 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * caller-save.c (add_used_regs): Use REG_NREGS instead of hard_regno_nregs. * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise. * config/arm/arm.c (output_move_neon): Likewise. (arm_attr_length_move_neon): Likewise. (neon_split_vcombine): Likewise. * config/c6x/c6x.c (c6x_mark_reg_read): Likewise. (c6x_mark_reg_written): Likewise. (c6x_dwarf_register_span): Likewise. * config/i386/i386.c (ix86_save_reg): Likewise. * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise. (rws_access_reg): Likewise. * config/s390/s390.c (s390_call_saved_register_used): Likewise. * mode-switching.c (create_pre_exit): Likewise. * ree.c (combine_reaching_defs): Likewise. (add_removable_extension): Likewise. * regcprop.c (find_oldest_value_reg): Likewise. (copyprop_hardreg_forward_1): Likewise. * reload.c (reload_inner_reg_of_subreg): Likewise. (push_reload): Likewise. (combine_reloads): Likewise. (find_dummy_reload): Likewise. (reload_adjust_reg_for_mode): Likewise. * reload1.c (find_reload_regs): Likewise. (forget_old_reloads_1): Likewise. (reload_reg_free_for_value_p): Likewise. (reload_adjust_reg_for_temp): Likewise. (emit_reload_insns): Likewise. (delete_output_reload): Likewise. * sel-sched.c (choose_best_reg_1): Likewise. (choose_best_pseudo_reg): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@252010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/s390.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 36bc67db1da..de7f3e577d0 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -13241,9 +13241,7 @@ s390_call_saved_register_used (tree call_expr)
if (REG_P (parm_rtx))
{
- for (reg = 0;
- reg < HARD_REGNO_NREGS (REGNO (parm_rtx), GET_MODE (parm_rtx));
- reg++)
+ for (reg = 0; reg < REG_NREGS (parm_rtx); reg++)
if (!call_used_regs[reg + REGNO (parm_rtx)])
return true;
}
@@ -13258,9 +13256,7 @@ s390_call_saved_register_used (tree call_expr)
gcc_assert (REG_P (r));
- for (reg = 0;
- reg < HARD_REGNO_NREGS (REGNO (r), GET_MODE (r));
- reg++)
+ for (reg = 0; reg < REG_NREGS (r); reg++)
if (!call_used_regs[reg + REGNO (r)])
return true;
}