aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelvin Nilsen <kelvin@gcc.gnu.org>2018-01-16 22:14:27 +0000
committerKelvin Nilsen <kelvin@gcc.gnu.org>2018-01-16 22:14:27 +0000
commit3dce35b32e8e516a3956137ff1229983845088af (patch)
tree6133725ae80c3223bd4ad968d3e6dd6d53554bd3
parent1dbc05f9baff63065124198a05157fe5233fbd7f (diff)
downloadgcc-3dce35b32e8e516a3956137ff1229983845088af.zip
gcc-3dce35b32e8e516a3956137ff1229983845088af.tar.gz
gcc-3dce35b32e8e516a3956137ff1229983845088af.tar.bz2
rs6000-p8swap.c (rs6000_gen_stvx): Generate different rtl trees depending on TARGET_64BIT.
gcc/ChangeLog: 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org> * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate different rtl trees depending on TARGET_64BIT. (rs6000_gen_lvx): Likewise. From-SVN: r256762
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000-p8swap.c128
2 files changed, 102 insertions, 32 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 194f975..a4fa75c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
+
+ * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
+ different rtl trees depending on TARGET_64BIT.
+ (rs6000_gen_lvx): Likewise.
+
2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
* config/visium/visium.md (nop): Tweak comment.
diff --git a/gcc/config/rs6000/rs6000-p8swap.c b/gcc/config/rs6000/rs6000-p8swap.c
index 876f339..a432296 100644
--- a/gcc/config/rs6000/rs6000-p8swap.c
+++ b/gcc/config/rs6000/rs6000-p8swap.c
@@ -1554,23 +1554,39 @@ rs6000_gen_stvx (enum machine_mode mode, rtx dest_exp, rtx src_exp)
op1 = XEXP (memory_address, 0);
op2 = XEXP (memory_address, 1);
if (mode == V16QImode)
- stvx = gen_altivec_stvx_v16qi_2op (src_exp, op1, op2);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v16qi_2op (src_exp, op1, op2)
+ : gen_altivec_stvx_v16qi_2op_si (src_exp, op1, op2);
else if (mode == V8HImode)
- stvx = gen_altivec_stvx_v8hi_2op (src_exp, op1, op2);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v8hi_2op (src_exp, op1, op2)
+ : gen_altivec_stvx_v8hi_2op_si (src_exp, op1, op2);
#ifdef HAVE_V8HFmode
else if (mode == V8HFmode)
- stvx = gen_altivec_stvx_v8hf_2op (src_exp, op1, op2);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v8hf_2op (src_exp, op1, op2)
+ : gen_altivec_stvx_v8hf_2op_si (src_exp, op1, op2);
#endif
else if (mode == V4SImode)
- stvx = gen_altivec_stvx_v4si_2op (src_exp, op1, op2);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v4si_2op (src_exp, op1, op2)
+ : gen_altivec_stvx_v4si_2op_si (src_exp, op1, op2);
else if (mode == V4SFmode)
- stvx = gen_altivec_stvx_v4sf_2op (src_exp, op1, op2);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v4sf_2op (src_exp, op1, op2)
+ : gen_altivec_stvx_v4sf_2op_si (src_exp, op1, op2);
else if (mode == V2DImode)
- stvx = gen_altivec_stvx_v2di_2op (src_exp, op1, op2);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v2di_2op (src_exp, op1, op2)
+ : gen_altivec_stvx_v2di_2op_si (src_exp, op1, op2);
else if (mode == V2DFmode)
- stvx = gen_altivec_stvx_v2df_2op (src_exp, op1, op2);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v2df_2op (src_exp, op1, op2)
+ : gen_altivec_stvx_v2df_2op_si (src_exp, op1, op2);
else if (mode == V1TImode)
- stvx = gen_altivec_stvx_v1ti_2op (src_exp, op1, op2);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v1ti_2op (src_exp, op1, op2)
+ : gen_altivec_stvx_v1ti_2op_si (src_exp, op1, op2);
else
/* KFmode, TFmode, other modes not expected in this context. */
gcc_unreachable ();
@@ -1578,23 +1594,39 @@ rs6000_gen_stvx (enum machine_mode mode, rtx dest_exp, rtx src_exp)
else /* REG_P (memory_address) */
{
if (mode == V16QImode)
- stvx = gen_altivec_stvx_v16qi_1op (src_exp, memory_address);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v16qi_1op (src_exp, memory_address)
+ : gen_altivec_stvx_v16qi_1op_si (src_exp, memory_address);
else if (mode == V8HImode)
- stvx = gen_altivec_stvx_v8hi_1op (src_exp, memory_address);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v8hi_1op (src_exp, memory_address)
+ : gen_altivec_stvx_v8hi_1op_si (src_exp, memory_address);
#ifdef HAVE_V8HFmode
else if (mode == V8HFmode)
- stvx = gen_altivec_stvx_v8hf_1op (src_exp, memory_address);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v8hf_1op (src_exp, memory_address)
+ : gen_altivec_stvx_v8hf_1op_si (src_exp, memory_address);
#endif
else if (mode == V4SImode)
- stvx = gen_altivec_stvx_v4si_1op (src_exp, memory_address);
+ stvx =TARGET_64BIT
+ ? gen_altivec_stvx_v4si_1op (src_exp, memory_address)
+ : gen_altivec_stvx_v4si_1op_si (src_exp, memory_address);
else if (mode == V4SFmode)
- stvx = gen_altivec_stvx_v4sf_1op (src_exp, memory_address);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v4sf_1op (src_exp, memory_address)
+ : gen_altivec_stvx_v4sf_1op_si (src_exp, memory_address);
else if (mode == V2DImode)
- stvx = gen_altivec_stvx_v2di_1op (src_exp, memory_address);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v2di_1op (src_exp, memory_address)
+ : gen_altivec_stvx_v2di_1op_si (src_exp, memory_address);
else if (mode == V2DFmode)
- stvx = gen_altivec_stvx_v2df_1op (src_exp, memory_address);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v2df_1op (src_exp, memory_address)
+ : gen_altivec_stvx_v2df_1op_si (src_exp, memory_address);
else if (mode == V1TImode)
- stvx = gen_altivec_stvx_v1ti_1op (src_exp, memory_address);
+ stvx = TARGET_64BIT
+ ? gen_altivec_stvx_v1ti_1op (src_exp, memory_address)
+ : gen_altivec_stvx_v1ti_1op_si (src_exp, memory_address);
else
/* KFmode, TFmode, other modes not expected in this context. */
gcc_unreachable ();
@@ -1702,23 +1734,39 @@ rs6000_gen_lvx (enum machine_mode mode, rtx dest_exp, rtx src_exp)
op2 = XEXP (memory_address, 1);
if (mode == V16QImode)
- lvx = gen_altivec_lvx_v16qi_2op (dest_exp, op1, op2);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v16qi_2op (dest_exp, op1, op2)
+ : gen_altivec_lvx_v16qi_2op_si (dest_exp, op1, op2);
else if (mode == V8HImode)
- lvx = gen_altivec_lvx_v8hi_2op (dest_exp, op1, op2);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v8hi_2op (dest_exp, op1, op2)
+ : gen_altivec_lvx_v8hi_2op_si (dest_exp, op1, op2);
#ifdef HAVE_V8HFmode
else if (mode == V8HFmode)
- lvx = gen_altivec_lvx_v8hf_2op (dest_exp, op1, op2);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v8hf_2op (dest_exp, op1, op2)
+ : gen_altivec_lvx_v8hf_2op_si (dest_exp, op1, op2);
#endif
else if (mode == V4SImode)
- lvx = gen_altivec_lvx_v4si_2op (dest_exp, op1, op2);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v4si_2op (dest_exp, op1, op2)
+ : gen_altivec_lvx_v4si_2op_si (dest_exp, op1, op2);
else if (mode == V4SFmode)
- lvx = gen_altivec_lvx_v4sf_2op (dest_exp, op1, op2);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v4sf_2op (dest_exp, op1, op2)
+ : gen_altivec_lvx_v4sf_2op_si (dest_exp, op1, op2);
else if (mode == V2DImode)
- lvx = gen_altivec_lvx_v2di_2op (dest_exp, op1, op2);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v2di_2op (dest_exp, op1, op2)
+ : gen_altivec_lvx_v2di_2op_si (dest_exp, op1, op2);
else if (mode == V2DFmode)
- lvx = gen_altivec_lvx_v2df_2op (dest_exp, op1, op2);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v2df_2op (dest_exp, op1, op2)
+ : gen_altivec_lvx_v2df_2op_si (dest_exp, op1, op2);
else if (mode == V1TImode)
- lvx = gen_altivec_lvx_v1ti_2op (dest_exp, op1, op2);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v1ti_2op (dest_exp, op1, op2)
+ : gen_altivec_lvx_v1ti_2op_si (dest_exp, op1, op2);
else
/* KFmode, TFmode, other modes not expected in this context. */
gcc_unreachable ();
@@ -1726,23 +1774,39 @@ rs6000_gen_lvx (enum machine_mode mode, rtx dest_exp, rtx src_exp)
else /* REG_P (memory_address) */
{
if (mode == V16QImode)
- lvx = gen_altivec_lvx_v16qi_1op (dest_exp, memory_address);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v16qi_1op (dest_exp, memory_address)
+ : gen_altivec_lvx_v16qi_1op_si (dest_exp, memory_address);
else if (mode == V8HImode)
- lvx = gen_altivec_lvx_v8hi_1op (dest_exp, memory_address);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v8hi_1op (dest_exp, memory_address)
+ : gen_altivec_lvx_v8hi_1op_si (dest_exp, memory_address);
#ifdef HAVE_V8HFmode
else if (mode == V8HFmode)
- lvx = gen_altivec_lvx_v8hf_1op (dest_exp, memory_address);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v8hf_1op (dest_exp, memory_address)
+ : gen_altivec_lvx_v8hf_1op_si (dest_exp, memory_address);
#endif
else if (mode == V4SImode)
- lvx = gen_altivec_lvx_v4si_1op (dest_exp, memory_address);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v4si_1op (dest_exp, memory_address)
+ : gen_altivec_lvx_v4si_1op_si (dest_exp, memory_address);
else if (mode == V4SFmode)
- lvx = gen_altivec_lvx_v4sf_1op (dest_exp, memory_address);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v4sf_1op (dest_exp, memory_address)
+ : gen_altivec_lvx_v4sf_1op_si (dest_exp, memory_address);
else if (mode == V2DImode)
- lvx = gen_altivec_lvx_v2di_1op (dest_exp, memory_address);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v2di_1op (dest_exp, memory_address)
+ : gen_altivec_lvx_v2di_1op_si (dest_exp, memory_address);
else if (mode == V2DFmode)
- lvx = gen_altivec_lvx_v2df_1op (dest_exp, memory_address);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v2df_1op (dest_exp, memory_address)
+ : gen_altivec_lvx_v2df_1op_si (dest_exp, memory_address);
else if (mode == V1TImode)
- lvx = gen_altivec_lvx_v1ti_1op (dest_exp, memory_address);
+ lvx = TARGET_64BIT
+ ? gen_altivec_lvx_v1ti_1op (dest_exp, memory_address)
+ : gen_altivec_lvx_v1ti_1op_si (dest_exp, memory_address);
else
/* KFmode, TFmode, other modes not expected in this context. */
gcc_unreachable ();