+2016-06-08 Jiong Wang <jiong.wang@arm.com>
+
+ * config/aarch64/aarch64-builtins.def (rsqrte): New builtins for modes
+ VALLF.
+ * config/aarch64/aarch64-simd.md (aarch64_rsqrte_<mode>2): Rename to
+ "aarch64_rsqrte<mode>".
+ * config/aarch64/aarch64.c (get_rsqrte_type): Update gen* name.
+ * config/aarch64/arm_neon.h (vrsqrts_f32): Remove inline assembly. Use
+ builtin.
+ (vrsqrted_f64): Likewise.
+ (vrsqrte_f32): Likewise.
+ (vrsqrte_f64): Likewise.
+ (vrsqrteq_f32): Likewise.
+ (vrsqrteq_f64): Likewise.
+
2016-06-08 Jiong Wang <jiong.wang@arm.com>
* config/aarch64/aarch64-builtins.def (scvtf): Register vector modes.
{
switch (mode)
{
- case DFmode: return gen_aarch64_rsqrte_df2;
- case SFmode: return gen_aarch64_rsqrte_sf2;
- case V2DFmode: return gen_aarch64_rsqrte_v2df2;
- case V2SFmode: return gen_aarch64_rsqrte_v2sf2;
- case V4SFmode: return gen_aarch64_rsqrte_v4sf2;
+ case DFmode: return gen_aarch64_rsqrtedf;
+ case SFmode: return gen_aarch64_rsqrtesf;
+ case V2DFmode: return gen_aarch64_rsqrtev2df;
+ case V2SFmode: return gen_aarch64_rsqrtev2sf;
+ case V4SFmode: return gen_aarch64_rsqrtev4sf;
default: gcc_unreachable ();
}
}
result; \
})
-__extension__ static __inline float32x2_t __attribute__ ((__always_inline__))
-vrsqrte_f32 (float32x2_t a)
-{
- float32x2_t result;
- __asm__ ("frsqrte %0.2s,%1.2s"
- : "=w"(result)
- : "w"(a)
- : /* No clobbers */);
- return result;
-}
-
-__extension__ static __inline float64x1_t __attribute__ ((__always_inline__))
-vrsqrte_f64 (float64x1_t a)
-{
- float64x1_t result;
- __asm__ ("frsqrte %d0,%d1"
- : "=w"(result)
- : "w"(a)
- : /* No clobbers */);
- return result;
-}
-
__extension__ static __inline uint32x2_t __attribute__ ((__always_inline__))
vrsqrte_u32 (uint32x2_t a)
{
return result;
}
-__extension__ static __inline float64_t __attribute__ ((__always_inline__))
-vrsqrted_f64 (float64_t a)
-{
- float64_t result;
- __asm__ ("frsqrte %d0,%d1"
- : "=w"(result)
- : "w"(a)
- : /* No clobbers */);
- return result;
-}
-
-__extension__ static __inline float32x4_t __attribute__ ((__always_inline__))
-vrsqrteq_f32 (float32x4_t a)
-{
- float32x4_t result;
- __asm__ ("frsqrte %0.4s,%1.4s"
- : "=w"(result)
- : "w"(a)
- : /* No clobbers */);
- return result;
-}
-
-__extension__ static __inline float64x2_t __attribute__ ((__always_inline__))
-vrsqrteq_f64 (float64x2_t a)
-{
- float64x2_t result;
- __asm__ ("frsqrte %0.2d,%1.2d"
- : "=w"(result)
- : "w"(a)
- : /* No clobbers */);
- return result;
-}
-
__extension__ static __inline uint32x4_t __attribute__ ((__always_inline__))
vrsqrteq_u32 (uint32x4_t a)
{
return result;
}
-__extension__ static __inline float32_t __attribute__ ((__always_inline__))
-vrsqrtes_f32 (float32_t a)
-{
- float32_t result;
- __asm__ ("frsqrte %s0,%s1"
- : "=w"(result)
- : "w"(a)
- : /* No clobbers */);
- return result;
-}
-
__extension__ static __inline float32x2_t __attribute__ ((__always_inline__))
vrsqrts_f32 (float32x2_t a, float32x2_t b)
{
return __builtin_aarch64_urshr_ndi_uus (__a, __b);
}
+/* vrsqrte. */
+
+__extension__ static __inline float32_t __attribute__ ((__always_inline__))
+vrsqrtes_f32 (float32_t __a)
+{
+ return __builtin_aarch64_rsqrtesf (__a);
+}
+
+__extension__ static __inline float64_t __attribute__ ((__always_inline__))
+vrsqrted_f64 (float64_t __a)
+{
+ return __builtin_aarch64_rsqrtedf (__a);
+}
+
+__extension__ static __inline float32x2_t __attribute__ ((__always_inline__))
+vrsqrte_f32 (float32x2_t __a)
+{
+ return __builtin_aarch64_rsqrtev2sf (__a);
+}
+
+__extension__ static __inline float64x1_t __attribute__ ((__always_inline__))
+vrsqrte_f64 (float64x1_t __a)
+{
+ return (float64x1_t) {vrsqrted_f64 (vget_lane_f64 (__a, 0))};
+}
+
+__extension__ static __inline float32x4_t __attribute__ ((__always_inline__))
+vrsqrteq_f32 (float32x4_t __a)
+{
+ return __builtin_aarch64_rsqrtev4sf (__a);
+}
+
+__extension__ static __inline float64x2_t __attribute__ ((__always_inline__))
+vrsqrteq_f64 (float64x2_t __a)
+{
+ return __builtin_aarch64_rsqrtev2df (__a);
+}
+
/* vrsra */
__extension__ static __inline int8x8_t __attribute__ ((__always_inline__))