+2004-02-14 Ben Elliston <bje@wasabisystems.com>
+
+ * config/arm/mmintrin.h (_mm_setwcx): Reverse arguments in call to
+ __builtin_arm_setwcx ().
+ * config/arm/arm.c (arm_expand_builtin): Generate operands
+ correctly and reverse their order in call to gen_iwmmxt_tmcr ().
+
+2004-02-14 Ben Elliston <bje@wasabisystems.com>
+
+ * config/arm/arm.c (bdesc_2arg): Correct builtin names "wmulsh"
+ and "wmuluh" to "wmulsm" and "wmulum", respectively.
+ * config/arm/arm.h (enum arm_builtins): Rename enumerators to
+ ARM_BUILTIN_WMULSM and ARM_BUILTIN_WMULUM.
+ * config/arm/mmintrin.h (_mm_mulhi_pi16): Update intrinsic call.
+ (_mm_mulhi_pu16): Likewise.
+
2004-02-13 Zack Weinberg <zack@codesourcery.com>
* xcoffout.c (xcoff_assign_fundamental_type_number): Check
IWMMXT_BUILTIN (ussubv4hi3, "wsubhus", WSUBUSH)
IWMMXT_BUILTIN (ussubv2si3, "wsubwus", WSUBUSW)
IWMMXT_BUILTIN (mulv4hi3, "wmulul", WMULUL)
- IWMMXT_BUILTIN (smulv4hi3_highpart, "wmulsh", WMULSH)
- IWMMXT_BUILTIN (umulv4hi3_highpart, "wmuluh", WMULUH)
+ IWMMXT_BUILTIN (smulv4hi3_highpart, "wmulsm", WMULSM)
+ IWMMXT_BUILTIN (umulv4hi3_highpart, "wmulum", WMULUM)
IWMMXT_BUILTIN (eqv8qi3, "wcmpeqb", WCMPEQB)
IWMMXT_BUILTIN (eqv4hi3, "wcmpeqh", WCMPEQH)
IWMMXT_BUILTIN (eqv2si3, "wcmpeqw", WCMPEQW)
case ARM_BUILTIN_SETWCX:
arg0 = TREE_VALUE (arglist);
arg1 = TREE_VALUE (TREE_CHAIN (arglist));
- op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0);
- op1 = force_reg (SImode, expand_expr (arg1, NULL_RTX, VOIDmode, 0));
- emit_insn (gen_iwmmxt_tmcr (op0, op1));
+ op0 = force_reg (SImode, expand_expr (arg0, NULL_RTX, VOIDmode, 0));
+ op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0);
+ emit_insn (gen_iwmmxt_tmcr (op1, op0));
return 0;
case ARM_BUILTIN_GETWCX:
ARM_BUILTIN_WMINUH,
ARM_BUILTIN_WMINUB,
- ARM_BUILTIN_WMULUH,
- ARM_BUILTIN_WMULSH,
+ ARM_BUILTIN_WMULUM,
+ ARM_BUILTIN_WMULSM,
ARM_BUILTIN_WMULUL,
ARM_BUILTIN_PSADBH,
static __inline __m64
_mm_mulhi_pi16 (__m64 __m1, __m64 __m2)
{
- return (__m64) __builtin_arm_wmulsh ((__v4hi)__m1, (__v4hi)__m2);
+ return (__m64) __builtin_arm_wmulsm ((__v4hi)__m1, (__v4hi)__m2);
}
/* Multiply four signed 16-bit values in M1 by four signed 16-bit values in
static __inline __m64
_mm_mulhi_pu16 (__m64 __m1, __m64 __m2)
{
- return (__m64) __builtin_arm_wmuluh ((__v4hi)__m1, (__v4hi)__m2);
+ return (__m64) __builtin_arm_wmulum ((__v4hi)__m1, (__v4hi)__m2);
}
/* Multiply four 16-bit values in M1 by four 16-bit values in M2 and produce
the rest are reserved. */
static __inline void
-_mm_setwcx (const int __regno, const int __value)
+_mm_setwcx (const int __value, const int __regno)
{
switch (__regno)
{
- case 0: __builtin_arm_setwcx (0, __value); break;
- case 1: __builtin_arm_setwcx (1, __value); break;
- case 2: __builtin_arm_setwcx (2, __value); break;
- case 3: __builtin_arm_setwcx (3, __value); break;
- case 8: __builtin_arm_setwcx (8, __value); break;
- case 9: __builtin_arm_setwcx (9, __value); break;
- case 10: __builtin_arm_setwcx (10, __value); break;
- case 11: __builtin_arm_setwcx (11, __value); break;
+ case 0: __builtin_arm_setwcx (__value, 0); break;
+ case 1: __builtin_arm_setwcx (__value, 1); break;
+ case 2: __builtin_arm_setwcx (__value, 2); break;
+ case 3: __builtin_arm_setwcx (__value, 3); break;
+ case 8: __builtin_arm_setwcx (__value, 8); break;
+ case 9: __builtin_arm_setwcx (__value, 9); break;
+ case 10: __builtin_arm_setwcx (__value, 10); break;
+ case 11: __builtin_arm_setwcx (__value, 11); break;
default: break;
}
}