diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2015-07-09 15:39:53 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2015-07-09 15:39:53 +0000 |
commit | 9d86e84ec0b576bd3586cf05f6605fee316c9cd4 (patch) | |
tree | 29d233e4e61f3cd1493734ba7208f952708bef72 /gcc/lra.c | |
parent | c551c21da8eca5bbc4798b7db33c8f3c9f39ec06 (diff) | |
download | gcc-9d86e84ec0b576bd3586cf05f6605fee316c9cd4.zip gcc-9d86e84ec0b576bd3586cf05f6605fee316c9cd4.tar.gz gcc-9d86e84ec0b576bd3586cf05f6605fee316c9cd4.tar.bz2 |
re PR rtl-optimization/66782 (Unable to run 64-bit wine after MS->SYSV register changes)
2015-07-09 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/66782
* lra-int.h (struct lra_insn_recog_data): Add comment about
clobbered hard regs for arg_hard_regs.
* lra.c (lra_set_insn_recog_data): Add clobbered hard regs.
* lra-lives.c (process_bb_lives): Process clobbered hard regs.
Add condition for processing used hard regs.
* lra-constraints.c (update_ebb_live_info, inherit_in_ebb):
Process clobbered hard regs.
From-SVN: r225618
Diffstat (limited to 'gcc/lra.c')
-rw-r--r-- | gcc/lra.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1055,6 +1055,7 @@ lra_set_insn_recog_data (rtx_insn *insn) data->arg_hard_regs = NULL; if (CALL_P (insn)) { + bool use_p; rtx link; int n_hard_regs, regno, arg_hard_regs[FIRST_PSEUDO_REGISTER]; @@ -1065,14 +1066,16 @@ lra_set_insn_recog_data (rtx_insn *insn) for (link = CALL_INSN_FUNCTION_USAGE (insn); link != NULL_RTX; link = XEXP (link, 1)) - if (GET_CODE (XEXP (link, 0)) == USE + if (((use_p = GET_CODE (XEXP (link, 0)) == USE) + || GET_CODE (XEXP (link, 0)) == CLOBBER) && REG_P (XEXP (XEXP (link, 0), 0))) { regno = REGNO (XEXP (XEXP (link, 0), 0)); lra_assert (regno < FIRST_PSEUDO_REGISTER); /* It is an argument register. */ for (i = REG_NREGS (XEXP (XEXP (link, 0), 0)) - 1; i >= 0; i--) - arg_hard_regs[n_hard_regs++] = regno + i; + arg_hard_regs[n_hard_regs++] + = regno + i + (use_p ? 0 : FIRST_PSEUDO_REGISTER); } if (n_hard_regs != 0) { |