diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-01 14:26:55 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-02-01 14:26:55 +0000 |
commit | 4705bce74d161d13bd138f9da65faf1d2fb68114 (patch) | |
tree | 69c7ab67c6527d585904538106ededde7482383a /gcc/config/sparc | |
parent | e2f53049d9424e70ca71aeb9548b657649c6059f (diff) | |
download | gcc-4705bce74d161d13bd138f9da65faf1d2fb68114.tar.gz |
2012-02-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 183800 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@183801 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/sparc.c | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 1b3b4c8764c..40db03f1750 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -11485,49 +11485,47 @@ vector_init_bshuffle (rtx target, rtx elt, enum machine_mode mode, emit_insn (final_insn); } +/* Subroutine of sparc_expand_vector_init. Emit code to initialize + all fields of TARGET to ELT in V8QI by means of VIS FPMERGE insn. */ + static void -vector_init_fpmerge (rtx target, rtx elt, enum machine_mode inner_mode) +vector_init_fpmerge (rtx target, rtx elt) { - rtx t1, t2, t3, t3_low; + rtx t1, t2, t2_low, t3, t3_low; t1 = gen_reg_rtx (V4QImode); - elt = convert_modes (SImode, inner_mode, elt, true); + elt = convert_modes (SImode, QImode, elt, true); emit_move_insn (gen_lowpart (SImode, t1), elt); - t2 = gen_reg_rtx (V4QImode); - emit_move_insn (t2, t1); + t2 = gen_reg_rtx (V8QImode); + t2_low = gen_lowpart (V4QImode, t2); + emit_insn (gen_fpmerge_vis (t2, t1, t1)); t3 = gen_reg_rtx (V8QImode); t3_low = gen_lowpart (V4QImode, t3); + emit_insn (gen_fpmerge_vis (t3, t2_low, t2_low)); - emit_insn (gen_fpmerge_vis (t3, t1, t2)); - emit_move_insn (t1, t3_low); - emit_move_insn (t2, t3_low); - - emit_insn (gen_fpmerge_vis (t3, t1, t2)); - emit_move_insn (t1, t3_low); - emit_move_insn (t2, t3_low); - - emit_insn (gen_fpmerge_vis (gen_lowpart (V8QImode, target), t1, t2)); + emit_insn (gen_fpmerge_vis (target, t3_low, t3_low)); } +/* Subroutine of sparc_expand_vector_init. Emit code to initialize + all fields of TARGET to ELT in V4HI by means of VIS FALIGNDATA insn. */ + static void -vector_init_faligndata (rtx target, rtx elt, enum machine_mode inner_mode) +vector_init_faligndata (rtx target, rtx elt) { rtx t1 = gen_reg_rtx (V4HImode); + int i; - elt = convert_modes (SImode, inner_mode, elt, true); - + elt = convert_modes (SImode, HImode, elt, true); emit_move_insn (gen_lowpart (SImode, t1), elt); emit_insn (gen_alignaddrsi_vis (gen_reg_rtx (SImode), force_reg (SImode, GEN_INT (6)), - CONST0_RTX (SImode))); + const0_rtx)); - emit_insn (gen_faligndatav4hi_vis (target, t1, target)); - emit_insn (gen_faligndatav4hi_vis (target, t1, target)); - emit_insn (gen_faligndatav4hi_vis (target, t1, target)); - emit_insn (gen_faligndatav4hi_vis (target, t1, target)); + for (i = 0; i < 4; i++) + emit_insn (gen_faligndatav4hi_vis (target, t1, target)); } /* Emit code to initialize TARGET to values for individual fields VALS. */ @@ -11535,9 +11533,9 @@ vector_init_faligndata (rtx target, rtx elt, enum machine_mode inner_mode) void sparc_expand_vector_init (rtx target, rtx vals) { - enum machine_mode mode = GET_MODE (target); - enum machine_mode inner_mode = GET_MODE_INNER (mode); - int n_elts = GET_MODE_NUNITS (mode); + const enum machine_mode mode = GET_MODE (target); + const enum machine_mode inner_mode = GET_MODE_INNER (mode); + const int n_elts = GET_MODE_NUNITS (mode); int i, n_var = 0; bool all_same; rtx mem; @@ -11593,12 +11591,12 @@ sparc_expand_vector_init (rtx target, rtx vals) } if (mode == V8QImode) { - vector_init_fpmerge (target, XVECEXP (vals, 0, 0), inner_mode); + vector_init_fpmerge (target, XVECEXP (vals, 0, 0)); return; } if (mode == V4HImode) { - vector_init_faligndata (target, XVECEXP (vals, 0, 0), inner_mode); + vector_init_faligndata (target, XVECEXP (vals, 0, 0)); return; } } |