diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2011-12-15 15:52:08 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2011-12-15 15:52:08 +0000 |
commit | 6a2045bfd3938fe09a026f5d7ff041e28c94950e (patch) | |
tree | 5d0c04560395d48bd64dd64844e3dac52c6e0f33 /gcc | |
parent | f03e689a9db25772c9650630bff7333bbf01c43d (diff) | |
download | gcc-6a2045bfd3938fe09a026f5d7ff041e28c94950e.zip gcc-6a2045bfd3938fe09a026f5d7ff041e28c94950e.tar.gz gcc-6a2045bfd3938fe09a026f5d7ff041e28c94950e.tar.bz2 |
rs6000.c (rs6000_emit_prologue): Move update of VRSave mask to save_world() when that is in use.
gcc:
* config/rs6000/rs6000.c (rs6000_emit_prologue): Move update of
VRSave mask to save_world() when that is in use.
libgcc:
* config/rs6000/darwin-world.S (toplevel): Make it clear that this
function is not used for PPC64.
(save_world): Amend comments. Update the VRsave mask to reflect the
saved regs.
(rest_world): Update comments, do not clobber r10, do not use r8.
(eh_rest_world_r10): Amend comments, do not use r8.
(rest_world_eh_r7r8): Rename as local Lrest_world_eh_r7, since r8 is
no longer used, move restore of CR and target address to the end of
the routine.
From-SVN: r182376
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9ec882d..b6d8a02 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-12-15 Iain Sandoe <iains@gcc.gnu.org> + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Move update of + VRSave mask to save_world() when that is in use. + 2011-12-15 Richard Guenther <rguenther@suse.de> * lto-wrapper.c (run_gcc): In non-parallel mode remove diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index e8e9e8c..da35528 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -19909,7 +19909,9 @@ rs6000_emit_prologue (void) used in this function, and do the corresponding magic in the epilogue. */ - if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE + if (!WORLD_SAVE_P (info) + && TARGET_ALTIVEC + && TARGET_ALTIVEC_VRSAVE && info->vrsave_mask != 0) { rtx reg, mem, vrsave; @@ -19925,15 +19927,12 @@ rs6000_emit_prologue (void) else emit_insn (gen_rtx_SET (VOIDmode, reg, vrsave)); - if (!WORLD_SAVE_P (info)) - { - /* Save VRSAVE. */ - offset = info->vrsave_save_offset + sp_offset; - mem = gen_frame_mem (SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, - GEN_INT (offset))); - insn = emit_move_insn (mem, reg); - } + /* Save VRSAVE. */ + offset = info->vrsave_save_offset + sp_offset; + mem = gen_frame_mem (SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, + GEN_INT (offset))); + insn = emit_move_insn (mem, reg); /* Include the registers in the mask. */ emit_insn (gen_iorsi3 (reg, reg, GEN_INT ((int) info->vrsave_mask))); |