Commit 69b23ad6 by Christophe Lyon Committed by Christophe Lyon

neon.md (neon_vget_lanev2di): Handle big-endian targets.

2015-08-04  Christophe Lyon  <christophe.lyon@linaro.org>

	* config/arm/neon.md (neon_vget_lanev2di): Handle big-endian
	targets.

From-SVN: r226574
parent c56df3e9
2015-08-04 Christophe Lyon <christophe.lyon@linaro.org>
* config/arm/neon.md (neon_vget_lanev2di): Handle big-endian
targets.
2015-08-04 Nathan Sidwell <nathan@codesourcery.com> 2015-08-04 Nathan Sidwell <nathan@codesourcery.com>
* config/nvptx/nvptx.h (struct nvptx_pseudo_info): Delete. * config/nvptx/nvptx.h (struct nvptx_pseudo_info): Delete.
......
...@@ -2731,7 +2731,22 @@ ...@@ -2731,7 +2731,22 @@
(match_operand:SI 2 "immediate_operand" "")] (match_operand:SI 2 "immediate_operand" "")]
"TARGET_NEON" "TARGET_NEON"
{ {
int lane = INTVAL (operands[2]); int lane;
if (BYTES_BIG_ENDIAN)
{
/* The intrinsics are defined in terms of a model where the
element ordering in memory is vldm order, whereas the generic
RTL is defined in terms of a model where the element ordering
in memory is array order. Convert the lane number to conform
to this model. */
unsigned int elt = INTVAL (operands[2]);
unsigned int reg_nelts = 2;
elt ^= reg_nelts - 1;
operands[2] = GEN_INT (elt);
}
lane = INTVAL (operands[2]);
gcc_assert ((lane ==0) || (lane == 1)); gcc_assert ((lane ==0) || (lane == 1));
emit_move_insn (operands[0], lane == 0 emit_move_insn (operands[0], lane == 0
? gen_lowpart (DImode, operands[1]) ? gen_lowpart (DImode, operands[1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment