aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.ibm.com>2021-08-11 14:59:17 -0500
committerBill Schmidt <wschmidt@linux.ibm.com>2021-08-11 16:34:33 -0500
commit873273449a944d7796d08ce6fae06eabcab7bf65 (patch)
tree52c4d65814d700de095411e2a2e69d92c1527305
parentba6aa47470550065d1ff8a8acb40654cdc85fbd9 (diff)
downloadgcc-873273449a944d7796d08ce6fae06eabcab7bf65.zip
gcc-873273449a944d7796d08ce6fae06eabcab7bf65.tar.gz
gcc-873273449a944d7796d08ce6fae06eabcab7bf65.tar.bz2
rs6000: Add available-everywhere and ancient builtins
2021-08-11 Bill Schmidt <wschmidt@linux.ibm.com> gcc/ * config/rs6000/rs6000-builtin-new.def: Add always, power5, and power6 stanzas.
-rw-r--r--gcc/config/rs6000/rs6000-builtin-new.def76
1 files changed, 76 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new.def
index b5d3570..61f5b94 100644
--- a/gcc/config/rs6000/rs6000-builtin-new.def
+++ b/gcc/config/rs6000/rs6000-builtin-new.def
@@ -184,6 +184,82 @@
+; 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 (string);
+ CPU_IS nothing {cpu}
+
+ bool __builtin_cpu_supports (string);
+ CPU_SUPPORTS nothing {cpu}
+
+ unsigned long long __builtin_ppc_get_timebase ();
+ GET_TB rs6000_get_timebase {}
+
+ double __builtin_mffs ();
+ MFFS rs6000_mffs {}
+
+; This thing really assumes long double == __ibm128, and I'm told it has
+; been used as such within libgcc. Given that __builtin_pack_ibm128
+; exists for the same purpose, this should really not be used at all.
+; TODO: Consider adding special handling for this to warn whenever
+; long double is not __ibm128.
+ const long double __builtin_pack_longdouble (double, double);
+ PACK_TF packtf {}
+
+ unsigned long __builtin_ppc_mftb ();
+ MFTB rs6000_mftb_di {32bit}
+
+ 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 (const int[0,3]);
+ SET_FPSCR_RN rs6000_set_fpscr_rn {}
+
+ const double __builtin_unpack_ibm128 (__ibm128, const int<1>);
+ UNPACK_IF unpackif {}
+
+; See above comments for __builtin_pack_longdouble.
+ const double __builtin_unpack_longdouble (long double, const int<1>);
+ UNPACK_TF unpacktf {}
+
+
+; Builtins that have been around just about forever, but not quite.
+[power5]
+ 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 {}
+
+
+; Power6 builtins (ISA 2.05).
+[power6]
+ const signed long __builtin_p6_cmpb (signed long, signed long);
+ CMPB cmpbdi3 {}
+
+ const signed int __builtin_p6_cmpb_32 (signed int, signed int);
+ CMPB_32 cmpbsi3 {}
+
+
; AltiVec builtins.
[altivec]
const vsc __builtin_altivec_abs_v16qi (vsc);