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
This commit is contained in:
Kelvin Nilsen 2018-01-16 22:14:27 +00:00
parent 1dbc05f9ba
commit 3dce35b32e
2 changed files with 102 additions and 32 deletions

View File

@ -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> 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
* config/visium/visium.md (nop): Tweak comment. * config/visium/visium.md (nop): Tweak comment.

View File

@ -1554,23 +1554,39 @@ rs6000_gen_stvx (enum machine_mode mode, rtx dest_exp, rtx src_exp)
op1 = XEXP (memory_address, 0); op1 = XEXP (memory_address, 0);
op2 = XEXP (memory_address, 1); op2 = XEXP (memory_address, 1);
if (mode == V16QImode) 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) 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 #ifdef HAVE_V8HFmode
else if (mode == 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 #endif
else if (mode == V4SImode) 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) 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) 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) 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) 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 else
/* KFmode, TFmode, other modes not expected in this context. */ /* KFmode, TFmode, other modes not expected in this context. */
gcc_unreachable (); gcc_unreachable ();
@ -1578,23 +1594,39 @@ rs6000_gen_stvx (enum machine_mode mode, rtx dest_exp, rtx src_exp)
else /* REG_P (memory_address) */ else /* REG_P (memory_address) */
{ {
if (mode == V16QImode) 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) 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 #ifdef HAVE_V8HFmode
else if (mode == 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 #endif
else if (mode == V4SImode) 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) 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) 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) 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) 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 else
/* KFmode, TFmode, other modes not expected in this context. */ /* KFmode, TFmode, other modes not expected in this context. */
gcc_unreachable (); gcc_unreachable ();
@ -1702,23 +1734,39 @@ rs6000_gen_lvx (enum machine_mode mode, rtx dest_exp, rtx src_exp)
op2 = XEXP (memory_address, 1); op2 = XEXP (memory_address, 1);
if (mode == V16QImode) 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) 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 #ifdef HAVE_V8HFmode
else if (mode == 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 #endif
else if (mode == V4SImode) 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) 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) 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) 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) 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 else
/* KFmode, TFmode, other modes not expected in this context. */ /* KFmode, TFmode, other modes not expected in this context. */
gcc_unreachable (); gcc_unreachable ();
@ -1726,23 +1774,39 @@ rs6000_gen_lvx (enum machine_mode mode, rtx dest_exp, rtx src_exp)
else /* REG_P (memory_address) */ else /* REG_P (memory_address) */
{ {
if (mode == V16QImode) 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) 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 #ifdef HAVE_V8HFmode
else if (mode == 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 #endif
else if (mode == V4SImode) 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) 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) 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) 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) 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 else
/* KFmode, TFmode, other modes not expected in this context. */ /* KFmode, TFmode, other modes not expected in this context. */
gcc_unreachable (); gcc_unreachable ();