diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-09 23:58:57 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-09 23:58:57 +0000 |
commit | be707eff2db0a9898ebd3452ec31b43ecd316fbc (patch) | |
tree | 68c6d2b63b5bca608049c29cc21f7a40607ee0b7 /gcc/caller-save.c | |
parent | 215ba52ac274419fcb903e922a6de9b851b03c3f (diff) | |
download | gcc-be707eff2db0a9898ebd3452ec31b43ecd316fbc.tar.gz |
gcc/
2008-09-09 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/37435
* caller-save.c (insert_restore, insert_save): Check the mode by
reg_save_code.
gcc/testsuite/
2008-09-09 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/37435
* gcc.dg/dfp/pr37435.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r-- | gcc/caller-save.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c index ee8a0dc6631..2d0925a4686 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -1067,7 +1067,10 @@ insert_restore (struct insn_chain *chain, int before_p, int regno, mem = regno_save_mem [regno][numregs]; if (save_mode [regno] != VOIDmode && save_mode [regno] != GET_MODE (mem) - && numregs == (unsigned int) hard_regno_nregs[regno][save_mode [regno]]) + && numregs == (unsigned int) hard_regno_nregs[regno][save_mode [regno]] + /* Check that insn to restore REGNO in save_mode[regno] is + correct. */ + && reg_save_code (regno, save_mode[regno]) >= 0) mem = adjust_address (mem, save_mode[regno], 0); else mem = copy_rtx (mem); @@ -1145,7 +1148,10 @@ insert_save (struct insn_chain *chain, int before_p, int regno, mem = regno_save_mem [regno][numregs]; if (save_mode [regno] != VOIDmode && save_mode [regno] != GET_MODE (mem) - && numregs == (unsigned int) hard_regno_nregs[regno][save_mode [regno]]) + && numregs == (unsigned int) hard_regno_nregs[regno][save_mode [regno]] + /* Check that insn to save REGNO in save_mode[regno] is + correct. */ + && reg_save_code (regno, save_mode[regno]) >= 0) mem = adjust_address (mem, save_mode[regno], 0); else mem = copy_rtx (mem); |