[gcc(refs/users/wschmidt/heads/builtins4)] rs6000: Add available-everywhere and ancient builtins

William Schmidt wschmidt@gcc.gnu.org
Mon Nov 2 13:53:57 GMT 2020


https://gcc.gnu.org/g:9ff40124d076e758e64445e921df0edd95bda10b

commit 9ff40124d076e758e64445e921df0edd95bda10b
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date:   Mon Nov 2 08:53:36 2020 -0500

    rs6000: Add available-everywhere and ancient builtins
    
    2020-11-02  Bill Schmidt  <wschmidt@linux.ibm.com>
    
            * config/rs6000/rs6000-builtin-new.def: Add always, power5,
            and power6 builtins.

Diff:
---
 gcc/config/rs6000/rs6000-builtin-new.def | 75 ++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new.def
index f92dd258423..abaf97834c2 100644
--- a/gcc/config/rs6000/rs6000-builtin-new.def
+++ b/gcc/config/rs6000/rs6000-builtin-new.def
@@ -178,6 +178,81 @@
 
 
 
+; Builtins that have been around since time immemorial or are just
+; considered available everywhere.
+[always]
+  void __builtin_cpu_init ();
+    CPU_INIT nothing {cpu}
+
+  bool __builtin_cpu_is (const char *);
+    CPU_IS nothing {cpu}
+
+  bool __builtin_cpu_supports (const char *);
+    CPU_SUPPORTS nothing {cpu}
+
+  unsigned long long __builtin_ppc_get_timebase ();
+    GET_TB rs6000_get_timebase {}
+
+  double __builtin_mffs ();
+    MFFS rs6000_mffs {}
+
+; This one requires special handling at expand time; it should be
+; expanded to rs6000_mftb_di in 64-bit mode, and rs6000_mftb_si in
+; 32-bit mode.  Use of "long" for this builtin is sanctioned.
+  unsigned long __builtin_ppc_mftb ();
+    MFTB rs6000_mftb_di {}
+
+  void __builtin_mtfsb0 (const int<5>);
+    MTFSB0 rs6000_mtfsb0 {}
+
+  void __builtin_mtfsb1 (const int<5>);
+    MTFSB1 rs6000_mtfsb1 {}
+
+  void __builtin_mtfsf (const int<8>, double);
+    MTFSF rs6000_mtfsf {}
+
+  const __ibm128 __builtin_pack_ibm128 (double, double);
+    PACK_IF packif {}
+
+  void __builtin_set_fpscr_rn (signed long long);
+    SET_FPSCR_RN rs6000_set_fpscr_rn {}
+
+  const double __builtin_unpack_ibm128 (__ibm128, const int<1>);
+    UNPACK_IF unpackif {}
+
+
+; Builtins that have been around just about forever, but not quite.
+[power5]
+; This will break for long double == _Float128.  libgcc history.
+  const long double __builtin_pack_longdouble (double, double);
+    PACK_TF packtf {}
+
+  fpmath double __builtin_recipdiv (double, double);
+    RECIP recipdf3 {}
+
+  fpmath float __builtin_recipdivf (float, float);
+    RECIPF recipsf3 {}
+
+  fpmath double __builtin_rsqrt (double);
+    RSQRT rsqrtdf2 {}
+
+  fpmath float __builtin_rsqrtf (float);
+    RSQRTF rsqrtsf2 {}
+
+; This will break for long double == _Float128.  libgcc history.
+  const double __builtin_unpack_longdouble (long double, const int<1>);
+    UNPACK_TF unpacktf {}
+
+
+; Power6 builtins.
+[power6]
+  const unsigned long long __builtin_p6_cmpb (unsigned long long, unsigned long long);
+    CMPB cmpbdi3 {}
+
+  const unsigned int __builtin_p6_cmpb_32 (unsigned int, unsigned int);
+    CMPB_32 cmpbsi3 {}
+
+
 ; AltiVec builtins.
 [altivec]
   const vsc __builtin_altivec_abs_v16qi (vsc);


More information about the Gcc-cvs mailing list