2013-07-24 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
Anton Blanchard <anton@au1.ibm.com>
* vector.md (vec_realign_load_<mode>): Reorder input operands to
vperm for little endian.
* rs6000.c (rs6000_expand_builtin): Use lvsr instead of lvsl to
create the control mask for a vperm for little endian.
Co-Authored-By: Anton Blanchard <anton@au1.ibm.com>
From-SVN: r201208
+2013-07-24 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
+ Anton Blanchard <anton@au1.ibm.com>
+
+ * vector.md (vec_realign_load_<mode>): Reorder input operands to
+ vperm for little endian.
+ * rs6000.c (rs6000_expand_builtin): Use lvsr instead of lvsl to
+ create the control mask for a vperm for little endian.
+
2013-07-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Anton Blanchard <anton@au1.ibm.com>
2013-07-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Anton Blanchard <anton@au1.ibm.com>
case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
case ALTIVEC_BUILTIN_MASK_FOR_STORE:
{
case ALTIVEC_BUILTIN_MASK_FOR_LOAD:
case ALTIVEC_BUILTIN_MASK_FOR_STORE:
{
- int icode = (int) CODE_FOR_altivec_lvsr;
+ int icode = (BYTES_BIG_ENDIAN ? (int) CODE_FOR_altivec_lvsr
+ : (int) CODE_FOR_altivec_lvsl);
enum machine_mode tmode = insn_data[icode].operand[0].mode;
enum machine_mode mode = insn_data[icode].operand[1].mode;
tree arg;
enum machine_mode tmode = insn_data[icode].operand[0].mode;
enum machine_mode mode = insn_data[icode].operand[1].mode;
tree arg;
(match_operand:V16QI 3 "vlogical_operand" "")]
"VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)"
{
(match_operand:V16QI 3 "vlogical_operand" "")]
"VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)"
{
- emit_insn (gen_altivec_vperm_<mode> (operands[0], operands[1], operands[2],
- operands[3]));
+ if (BYTES_BIG_ENDIAN)
+ emit_insn (gen_altivec_vperm_<mode> (operands[0], operands[1],
+ operands[2], operands[3]));
+ else
+ emit_insn (gen_altivec_vperm_<mode> (operands[0], operands[2],
+ operands[1], operands[3]));