diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def
index defd7e25ffe..d72ff8cb7fe 100644
--- a/gcc/config/rs6000/rs6000-builtins.def
+++ b/gcc/config/rs6000/rs6000-builtins.def
@@ -2867,18 +2867,18 @@
 
 ; Builtins requiring hardware support for IEEE-128 floating-point.
 [ieee128-hw]
-  fpmath _Float128 __builtin_addf128_round_to_odd (_Float128, _Float128);
-    ADDF128_ODD addkf3_odd {}
+  fpmath _Float128 __builtin_addf128_round_to_odd_kf (_Float128, _Float128);
+    ADDF128_ODD_KF addkf3_odd {}
 
-  fpmath _Float128 __builtin_divf128_round_to_odd (_Float128, _Float128);
-    DIVF128_ODD divkf3_odd {}
+  fpmath _Float128 __builtin_divf128_round_to_odd_kf (_Float128, _Float128);
+    DIVF128_ODD_KF divkf3_odd {}
 
-  fpmath _Float128 __builtin_fmaf128_round_to_odd (_Float128, _Float128, \
-                                                   _Float128);
-    FMAF128_ODD fmakf4_odd {}
+  fpmath _Float128 __builtin_fmaf128_round_to_odd_kf (_Float128, _Float128, \
+						      _Float128);
+    FMAF128_ODD_KF fmakf4_odd {}
 
-  fpmath _Float128 __builtin_mulf128_round_to_odd (_Float128, _Float128);
-    MULF128_ODD mulkf3_odd {}
+  fpmath _Float128 __builtin_mulf128_round_to_odd_kf (_Float128, _Float128);
+    MULF128_ODD_KF mulkf3_odd {}
 
   const signed int __builtin_vsx_scalar_cmp_exp_qp_eq (_Float128, _Float128);
     VSCEQPEQ xscmpexpqp_eq_kf {}
@@ -2893,14 +2893,14 @@
       __builtin_vsx_scalar_cmp_exp_qp_unordered (_Float128, _Float128);
     VSCEQPUO xscmpexpqp_unordered_kf {}
 
-  fpmath _Float128 __builtin_sqrtf128_round_to_odd (_Float128);
-    SQRTF128_ODD sqrtkf2_odd {}
+  fpmath _Float128 __builtin_sqrtf128_round_to_odd_kf (_Float128);
+    SQRTF128_ODD_KF sqrtkf2_odd {}
 
-  fpmath _Float128 __builtin_subf128_round_to_odd (_Float128, _Float128);
-    SUBF128_ODD subkf3_odd {}
+  fpmath _Float128 __builtin_subf128_round_to_odd_kf (_Float128, _Float128);
+    SUBF128_ODD_KF subkf3_odd {}
 
-  fpmath double __builtin_truncf128_round_to_odd (_Float128);
-    TRUNCF128_ODD trunckfdf2_odd {}
+  fpmath double __builtin_truncf128_round_to_odd_kf (_Float128);
+    TRUNCF128_ODD_KF trunckfdf2_odd {}
 
   const signed long long __builtin_vsx_scalar_extract_expq (_Float128);
     VSEEQP xsxexpqp_kf {}
@@ -2924,6 +2924,34 @@
     VSTDCNQP xststdcnegqp_kf {}
 
 
+; Builtins requiring hardware support for IEEE-128 floating-point.  Long double
+; must use the IEEE 128-bit encoding.
+[ieee128-hw-ld]
+  fpmath long double __builtin_addf128_round_to_odd_tf (long double, long double);
+    ADDF128_ODD_TF addtf3_odd {ieeeld}
+
+  fpmath long double __builtin_divf128_round_to_odd_tf (long double,long double);
+    DIVF128_ODD_TF divtf3_odd {ieeeld}
+
+  fpmath long double __builtin_fmaf128_round_to_odd_tf (long double, \
+							long double, \
+							long double);
+    FMAF128_ODD_TF fmatf4_odd {ieeeld}
+
+  fpmath long double __builtin_mulf128_round_to_odd_tf (long double, \
+							long double);
+    MULF128_ODD_TF multf3_odd {ieeeld}
+
+  fpmath long double __builtin_sqrtf128_round_to_odd_tf (long double);
+    SQRTF128_ODD_TF sqrttf2_odd {ieeeld}
+
+  fpmath long double __builtin_subf128_round_to_odd_tf (long double, \
+							long double);
+    SUBF128_ODD_TF subtf3_odd {ieeeld}
+
+  fpmath double __builtin_truncf128_round_to_odd_tf (long double);
+    TRUNCF128_ODD_TF trunctfdf2_odd {ieeeld}
+
 
 ; Decimal floating-point builtins.
 [dfp]
diff --git a/gcc/config/rs6000/rs6000-overload.def b/gcc/config/rs6000/rs6000-overload.def
index 44e2945aaa0..f406a16a882 100644
--- a/gcc/config/rs6000/rs6000-overload.def
+++ b/gcc/config/rs6000/rs6000-overload.def
@@ -6175,3 +6175,47 @@
     VUPKLSW  VUPKLSW_DEPR1
   vbll __builtin_vec_vupklsw (vbi);
     VUPKLSW  VUPKLSW_DEPR2
+
+[ADDF128_ODD, SKIP, __builtin_addf128_round_to_odd]
+  long double __builtin_addf128_round_to_odd (long double, long double);
+    ADDF128_ODD_TF
+  _Float128 __builtin_addf128_round_to_odd (_Float128, _Float128);
+    ADDF128_ODD_KF
+
+[DIVF128_ODD, SKIP, __builtin_divf128_round_to_odd]
+  long double __builtin_divf128_round_to_odd (long double, long double);
+    DIVF128_ODD_TF
+  _Float128 __builtin_divf128_round_to_odd (_Float128, _Float128);
+    DIVF128_ODD_KF
+
+[FMAF128_ODD, SKIP, __builtin_fmaf128_round_to_odd]
+  long double __builtin_fmaf128_round_to_odd (long double, long double, \
+					      long double);
+    FMAF128_ODD_TF
+  _Float128 __builtin_fmaf128_round_to_odd (_Float128, _Float128, \
+					    _Float128);
+    FMAF128_ODD_KF
+
+[MULF128_ODD, SKIP, __builtin_mulf128_round_to_odd]
+  long double __builtin_mulf128_round_to_odd (long double, long double);
+    MULF128_ODD_TF
+  _Float128 __builtin_mulf128_round_to_odd (_Float128, _Float128);
+    MULF128_ODD_KF
+
+[SQRTF128_ODD, SKIP, __builtin_sqrtf128_round_to_odd]
+  long double __builtin_sqrtf128_round_to_odd (long double);
+    SQRTF128_ODD_TF
+  _Float128 __builtin_sqrtf128_round_to_odd (_Float128);
+    SQRTF128_ODD_KF
+
+[SUBF128_ODD, SKIP, __builtin_subf128_round_to_odd]
+  long double __builtin_subf128_round_to_odd (long double, long double);
+    SUBF128_ODD_TF
+  _Float128 __builtin_subf128_round_to_odd (_Float128, _Float128);
+    SUBF128_ODD_KF
+
+[TRUNCF128_ODD, SKIP, __builtin_truncf128_round_to_odd]
+  long double __builtin_truncf128_round_to_odd (long double);
+    TRUNCF128_ODD_TF
+  _Float128 __builtin_truncf128_round_to_odd (_Float128);
+    TRUNCF128_ODD_KF
