https://gcc.gnu.org/g:b5fff1d2a31465d5ea64436a4443de3a07d8affd
commit b5fff1d2a31465d5ea64436a4443de3a07d8affd Author: Michael Meissner <[email protected]> Date: Mon Nov 10 16:53:35 2025 -0500 Revert changes Diff: --- gcc/config/rs6000/altivec.md | 34 +----- gcc/config/rs6000/float16.md | 124 --------------------- gcc/config/rs6000/predicates.md | 26 ----- gcc/config/rs6000/rs6000-builtin.cc | 20 ---- gcc/config/rs6000/rs6000-c.cc | 6 - gcc/config/rs6000/rs6000-call.cc | 20 ---- gcc/config/rs6000/rs6000-modes.def | 9 -- gcc/config/rs6000/rs6000-p8swap.cc | 14 ++- gcc/config/rs6000/rs6000-protos.h | 1 - gcc/config/rs6000/rs6000.cc | 217 ++++-------------------------------- gcc/config/rs6000/rs6000.h | 28 ----- gcc/config/rs6000/rs6000.md | 23 +--- gcc/config/rs6000/rs6000.opt | 4 - gcc/config/rs6000/vector.md | 37 +----- gcc/config/rs6000/vsx.md | 151 +++++++++++-------------- libgcc/config.host | 4 - libgcc/config/rs6000/sfp-machine.h | 50 --------- libgcc/config/rs6000/t-float16 | 61 ---------- libgcc/configure | 23 ---- libgcc/configure.ac | 11 -- 20 files changed, 105 insertions(+), 758 deletions(-) diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index d821960cb5f5..fa3368079ada 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -191,8 +191,6 @@ ;; otherwise handled by altivec (v2df, v2di, ti) (define_mode_iterator VM [V4SI V8HI - V8BF - V8HF V16QI V4SF V2DF @@ -205,8 +203,6 @@ ;; Like VM, except don't do TImode (define_mode_iterator VM2 [V4SI V8HI - V8BF - V8HF V16QI V4SF V2DF @@ -226,38 +222,18 @@ V1TI TI]) -(define_mode_attr VI_char [(V2DI "d") - (V4SI "w") - (V8HI "h") - (V8BF "h") - (V8HF "h") - (V16QI "b")]) -(define_mode_attr VI_scalar [(V2DI "DI") - (V4SI "SI") - (V8HI "HI") - (V8BF "BF") - (V8HF "HF") - (V16QI "QI")]) +(define_mode_attr VI_char [(V2DI "d") (V4SI "w") (V8HI "h") (V16QI "b")]) +(define_mode_attr VI_scalar [(V2DI "DI") (V4SI "SI") (V8HI "HI") (V16QI "QI")]) (define_mode_attr VI_unit [(V16QI "VECTOR_UNIT_ALTIVEC_P (V16QImode)") (V8HI "VECTOR_UNIT_ALTIVEC_P (V8HImode)") - (V8BF "VECTOR_UNIT_ALTIVEC_P (V8BFmode)") - (V8HF "VECTOR_UNIT_ALTIVEC_P (V8HFmode)") (V4SI "VECTOR_UNIT_ALTIVEC_P (V4SImode)") (V2DI "VECTOR_UNIT_P8_VECTOR_P (V2DImode)")]) ;; Vector pack/unpack (define_mode_iterator VP [V2DI V4SI V8HI]) -(define_mode_attr VP_small [(V2DI "V4SI") - (V4SI "V8HI") - (V8HI "V16QI")]) -(define_mode_attr VP_small_lc [(V2DI "v4si") - (V4SI "v8hi") - (V8HI "v16qi")]) -(define_mode_attr VU_char [(V2DI "w") - (V4SI "h") - (V8HI "b") - (V8BF "b") - (V8HF "b")]) +(define_mode_attr VP_small [(V2DI "V4SI") (V4SI "V8HI") (V8HI "V16QI")]) +(define_mode_attr VP_small_lc [(V2DI "v4si") (V4SI "v8hi") (V8HI "v16qi")]) +(define_mode_attr VU_char [(V2DI "w") (V4SI "h") (V8HI "b")]) ;; Vector negate (define_mode_iterator VNEG [V4SI V2DI]) diff --git a/gcc/config/rs6000/float16.md b/gcc/config/rs6000/float16.md deleted file mode 100644 index fec4bb87fd09..000000000000 --- a/gcc/config/rs6000/float16.md +++ /dev/null @@ -1,124 +0,0 @@ -;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler -;; Copyright (C) 1990-2025 Free Software Foundation, Inc. -;; Contributed by Richard Kenner ([email protected]) - -;; This file is part of GCC. - -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. - -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; <http://www.gnu.org/licenses/>. - -;; Support for _Float16 (HFmode) and __bfloat16 (BFmode) - -;; Mode iterator for 16-bit floating point modes both as a scalar and -;; as a vector. -(define_mode_iterator FP16 [(BF "TARGET_FLOAT16") - (HF "TARGET_FLOAT16")]) - -;; Mode attribute giving the vector mode for a 16-bit floating point -;; scalar in both upper and lower case. -(define_mode_attr FP16_VECTOR8 [(BF "V8BF") - (HF "V8HF")]) - -(define_mode_attr fp16_vector8 [(BF "v8bf") - (HF "v8hf")]) - -;; _Float16 and __bfloat16 moves -(define_expand "mov<mode>" - [(set (match_operand:FP16 0 "nonimmediate_operand") - (match_operand:FP16 1 "any_operand"))] - "" -{ - if (MEM_P (operands[0]) && !REG_P (operands[1])) - operands[1] = force_reg (<MODE>mode, operands[1]); -}) - -;; On power10, we can load up HFmode and BFmode constants with xxspltiw -;; or pli. -(define_insn "*mov<mode>_xxspltiw" - [(set (match_operand:FP16 0 "gpc_reg_operand" "=wa,wa,?r,?r") - (match_operand:FP16 1 "fp16_xxspltiw_constant" "j,eP,j,eP"))] - "TARGET_PREFIXED || operands[1] == CONST0_RTX (<MODE>mode)" -{ - rtx op1 = operands[1]; - const REAL_VALUE_TYPE *rtype = CONST_DOUBLE_REAL_VALUE (op1); - long real_words[1]; - - if (op1 == CONST0_RTX (<MODE>mode)) - return (!vsx_register_operand (operands[0], <MODE>mode) - ? "li %0,0" - : "xxlxor %x0,%x0,%x0"); - - real_to_target (real_words, rtype, <MODE>mode); - operands[2] = GEN_INT (real_words[0]); - return (vsx_register_operand (operands[0], <MODE>mode) - ? "xxspltiw %x0,%2" - : "pli %0,%2"); -} - [(set_attr "type" "veclogical, vecsimple, *, *") - (set_attr "prefixed" "no, yes, no, yes")]) - -(define_insn "*mov<mode>_internal" - [(set (match_operand:FP16 0 "nonimmediate_operand" - "=wa, wa, Z, r, r, - m, r, wa, wa, r") - - (match_operand:FP16 1 "any_operand" - "wa, Z, wa, r, m, - r, wa, r, j, j"))] - "gpc_reg_operand (operands[0], <MODE>mode) - || gpc_reg_operand (operands[1], <MODE>mode)" - "@ - xxlor %x0,%x1,%x1 - lxsihzx %x0,%y1 - stxsihx %x1,%y0 - mr %0,%1 - lhz%U1%X1 %0,%1 - sth%U0%X0 %1,%0 - mfvsrwz %0,%x1 - mtvsrwz %x0,%1 - xxlxor %x0,%x0,%x0 - li %0,0" - [(set_attr "type" "vecsimple, fpload, fpstore, *, load, - store, mtvsr, mfvsr, veclogical, *") - (set_attr "isa" "*, p9v, p9v, *, *, - *, p8v, p8v, p9v, *")]) - -;; Vector duplicate -(define_insn "*vecdup<mode>_reg" - [(set (match_operand:<FP16_VECTOR8> 0 "altivec_register_operand" "=v") - (vec_duplicate:<FP16_VECTOR8> - (match_operand:FP16 1 "altivec_register_operand" "v")))] - "" - "vsplth %0,%1,3" - [(set_attr "type" "vecperm")]) - -(define_insn "*vecdup<mode>_const" - [(set (match_operand:<FP16_VECTOR8> 0 "vsx_register_operand" "=wa,wa") - (vec_duplicate:<FP16_VECTOR8> - (match_operand:FP16 1 "fp16_xxspltiw_constant" "j,eP")))] - "TARGET_PREFIXED || operands[1] == CONST0_RTX (<MODE>mode)" -{ - rtx op1 = operands[1]; - if (op1 == CONST0_RTX (<MODE>mode)) - return "xxlxor %x0,%x0,%x0"; - - const REAL_VALUE_TYPE *rtype = CONST_DOUBLE_REAL_VALUE (op1); - long real_words[1]; - - real_to_target (real_words, rtype, <MODE>mode); - operands[2] = GEN_INT (real_words[0]); - return "xxspltiw %x0,2"; -} - [(set_attr "type" "veclogical,vecperm") - (set_attr "prefixed" "*,yes")]) diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 7df6f5bcb00d..f1e03ec30c9b 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -633,11 +633,6 @@ if (TARGET_VSX && op == CONST0_RTX (mode)) return 1; - /* Power9 needs to load HFmode constants from memory, Power10 can use - XXSPLTIW. */ - if (mode == HFmode && !TARGET_POWER10) - return 0; - /* Constants that can be generated with ISA 3.1 instructions are easy. */ vec_const_128bit_type vsx_const; if (TARGET_POWER10 && vec_const_128bit_to_bytes (op, mode, &vsx_const)) @@ -2203,24 +2198,3 @@ (and (match_code "subreg") (match_test "subreg_lowpart_offset (mode, GET_MODE (SUBREG_REG (op))) == SUBREG_BYTE (op)"))) - -;; Return 1 if this is a 16-bit floating point constant that can be -;; loaded with XXSPLTIW or is 0.0 that can be loaded with XXSPLTIB. -(define_predicate "fp16_xxspltiw_constant" - (match_code "const_double") -{ - if (!FP16_SCALAR_MODE_P (mode)) - return false; - - if (op == CONST0_RTX (mode)) - return true; - - if (!TARGET_PREFIXED) - return false; - - vec_const_128bit_type vsx_const; - if (!vec_const_128bit_to_bytes (op, mode, &vsx_const)) - return false; - - return constant_generates_xxspltiw (&vsx_const); -}) diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc index c42a50944ac7..a02e4cd03efa 100644 --- a/gcc/config/rs6000/rs6000-builtin.cc +++ b/gcc/config/rs6000/rs6000-builtin.cc @@ -491,10 +491,6 @@ const char *rs6000_type_string (tree type_node) return "voidc*"; else if (type_node == float128_type_node) return "_Float128"; - else if (type_node == float16_type_node) - return "_Float16"; - else if (TARGET_FLOAT16 && type_node == bfloat16_type_node) - return "__bfloat16"; else if (type_node == vector_pair_type_node) return "__vector_pair"; else if (type_node == vector_quad_type_node) @@ -762,22 +758,6 @@ rs6000_init_builtins (void) else ieee128_float_type_node = NULL_TREE; - /* __bfloat16 support. */ - if (TARGET_FLOAT16) - { - if (!bfloat16_type_node) - { - bfloat16_type_node = make_node (REAL_TYPE); - TYPE_PRECISION (bfloat16_type_node) = 16; - SET_TYPE_MODE (bfloat16_type_node, BFmode); - layout_type (bfloat16_type_node); - t = build_qualified_type (bfloat16_type_node, TYPE_QUAL_CONST); - } - - lang_hooks.types.register_builtin_type (bfloat16_type_node, - "__bfloat16"); - } - /* Vector pair and vector quad support. */ vector_pair_type_node = make_node (OPAQUE_TYPE); SET_TYPE_MODE (vector_pair_type_node, OOmode); diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc index a9e611d3488a..22e528e8242b 100644 --- a/gcc/config/rs6000/rs6000-c.cc +++ b/gcc/config/rs6000/rs6000-c.cc @@ -589,12 +589,6 @@ rs6000_target_modify_macros (bool define_p, if ((flags & OPTION_MASK_FLOAT128_HW) != 0) rs6000_define_or_undefine_macro (define_p, "__FLOAT128_HARDWARE__"); - /* 16-bit floating point support. */ - if ((flags & OPTION_MASK_FLOAT16) != 0) - { - rs6000_define_or_undefine_macro (define_p, "__FLOAT16__"); - rs6000_define_or_undefine_macro (define_p, "__BFLOAT16__"); - } /* Tell the user if we are targeting CELL. */ if (rs6000_cpu == PROCESSOR_CELL) rs6000_define_or_undefine_macro (define_p, "__PPU__"); diff --git a/gcc/config/rs6000/rs6000-call.cc b/gcc/config/rs6000/rs6000-call.cc index 1c5bec25ecbe..7541050ffe73 100644 --- a/gcc/config/rs6000/rs6000-call.cc +++ b/gcc/config/rs6000/rs6000-call.cc @@ -685,18 +685,6 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, " altivec instructions are disabled, use %qs" " to enable them", "-maltivec"); } - - /* Warn that __bfloat16 and _Float16 might be returned differently in the - future. The issue is currently 16-bit floating point is returned in - floating point register #1 in 16-bit format. We may or may not want to - return it as a scalar 64-bit value. */ - if (fntype && warn_psabi && !cum->libcall) - { - machine_mode ret_mode = TYPE_MODE (TREE_TYPE (fntype)); - if (ret_mode == BFmode || ret_mode == HFmode) - warning (OPT_Wpsabi, "%s might be returned differently in the future", - ret_mode == BFmode ? "__bfloat16" : "_Float16"); - } } @@ -1655,14 +1643,6 @@ rs6000_function_arg (cumulative_args_t cum_v, const function_arg_info &arg) return NULL_RTX; } - /* Warn that _Float16 and __bfloat16 might be passed differently in the - future. The issue is currently 16-bit floating point values are passed in - floating point registers in the native 16-bit format. We may or may not - want to pass the value it as a scalar 64-bit value. */ - if (warn_psabi && !cum->libcall && (mode == BFmode || mode == HFmode)) - warning (OPT_Wpsabi, "%s might be passed differently in the future", - mode == BFmode ? "__bfloat16" : "_Float16"); - /* Return a marker to indicate whether CR1 needs to set or clear the bit that V.4 uses to say fp args were passed in registers. Assume that we don't need the marker for software floating point, diff --git a/gcc/config/rs6000/rs6000-modes.def b/gcc/config/rs6000/rs6000-modes.def index c210c18504af..9a8b505ab6a7 100644 --- a/gcc/config/rs6000/rs6000-modes.def +++ b/gcc/config/rs6000/rs6000-modes.def @@ -45,13 +45,6 @@ FLOAT_MODE (TF, 16, ieee_quad_format); /* IBM 128-bit floating point. */ FLOAT_MODE (IF, 16, ibm_extended_format); -/* Explicit IEEE 16-bit floating point. */ -FLOAT_MODE (HF, 2, ieee_half_format); - -/* Explicit bfloat16 floating point. */ -FLOAT_MODE (BF, 2, 0); -ADJUST_FLOAT_FORMAT (BF, &arm_bfloat_half_format); - /* Add any extra modes needed to represent the condition code. For the RS/6000, we need separate modes when unsigned (logical) comparisons @@ -77,8 +70,6 @@ VECTOR_MODES (FLOAT, 32); /* V16HF V8SF V4DF */ /* Half VMX/VSX vector (for internal use) */ VECTOR_MODE (FLOAT, SF, 2); /* V2SF */ VECTOR_MODE (INT, SI, 2); /* V2SI */ -VECTOR_MODE (FLOAT, BF, 4); /* V4BF */ -VECTOR_MODE (FLOAT, HF, 4); /* V4HF */ /* Replacement for TImode that only is allowed in GPRs. We also use PTImode for quad memory atomic operations to force getting an even/odd register diff --git a/gcc/config/rs6000/rs6000-p8swap.cc b/gcc/config/rs6000/rs6000-p8swap.cc index 7ba50f11a7bf..e92f01031270 100644 --- a/gcc/config/rs6000/rs6000-p8swap.cc +++ b/gcc/config/rs6000/rs6000-p8swap.cc @@ -1598,10 +1598,10 @@ rs6000_gen_stvx (enum machine_mode mode, rtx dest_exp, rtx src_exp) stvx = gen_altivec_stvx_v16qi (src_exp, dest_exp); else if (mode == V8HImode) stvx = gen_altivec_stvx_v8hi (src_exp, dest_exp); +#ifdef HAVE_V8HFmode else if (mode == V8HFmode) stvx = gen_altivec_stvx_v8hf (src_exp, dest_exp); - else if (mode == V8BFmode) - stvx = gen_altivec_stvx_v8bf (src_exp, dest_exp); +#endif else if (mode == V4SImode) stvx = gen_altivec_stvx_v4si (src_exp, dest_exp); else if (mode == V4SFmode) @@ -1722,10 +1722,10 @@ rs6000_gen_lvx (enum machine_mode mode, rtx dest_exp, rtx src_exp) lvx = gen_altivec_lvx_v16qi (dest_exp, src_exp); else if (mode == V8HImode) lvx = gen_altivec_lvx_v8hi (dest_exp, src_exp); +#ifdef HAVE_V8HFmode else if (mode == V8HFmode) lvx = gen_altivec_lvx_v8hf (dest_exp, src_exp); - else if (mode == V8BFmode) - lvx = gen_altivec_lvx_v8bf (dest_exp, src_exp); +#endif else if (mode == V4SImode) lvx = gen_altivec_lvx_v4si (dest_exp, src_exp); else if (mode == V4SFmode) @@ -1930,7 +1930,11 @@ replace_swapped_load_constant (swap_web_entry *insn_entry, rtx swap_insn) rtx new_const_vector = gen_rtx_CONST_VECTOR (mode, XVEC (vals, 0)); new_mem = force_const_mem (mode, new_const_vector); } - else if (mode == V8HImode || mode == V8HFmode || mode == V8BFmode) + else if ((mode == V8HImode) +#ifdef HAVE_V8HFmode + || (mode == V8HFmode) +#endif + ) { rtx vals = gen_rtx_PARALLEL (mode, rtvec_alloc (8)); int i; diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index bca66c736b27..5392eaf6309e 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -250,7 +250,6 @@ typedef struct { bool all_words_same; /* Are the words all equal? */ bool all_half_words_same; /* Are the half words all equal? */ bool all_bytes_same; /* Are the bytes all equal? */ - machine_mode mode; /* Original constant mode. */ } vec_const_128bit_type; extern bool vec_const_128bit_to_bytes (rtx, machine_mode, diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index d6e7127aba75..46c8c0282a43 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -1929,8 +1929,7 @@ rs6000_hard_regno_mode_ok_uncached (int regno, machine_mode mode) if (ALTIVEC_REGNO_P (regno)) { - if (GET_MODE_SIZE (mode) < 16 && !reg_addr[mode].scalar_in_vmx_p - && !FP16_SCALAR_MODE_P (mode)) + if (GET_MODE_SIZE (mode) < 16 && !reg_addr[mode].scalar_in_vmx_p) return 0; return ALTIVEC_REGNO_P (last_regno); @@ -2023,8 +2022,7 @@ rs6000_modes_tieable_p (machine_mode mode1, machine_mode mode2) { if (mode1 == PTImode || mode1 == OOmode || mode1 == XOmode || mode1 == TDOmode || mode2 == PTImode || mode2 == OOmode - || mode2 == XOmode || mode2 == TDOmode - || FP16_SCALAR_MODE_P (mode1) || FP16_SCALAR_MODE_P (mode2)) + || mode2 == XOmode || mode2 == TDOmode) return mode1 == mode2; if (ALTIVEC_OR_VSX_VECTOR_MODE (mode1)) @@ -2289,8 +2287,6 @@ rs6000_debug_reg_global (void) DImode, TImode, PTImode, - BFmode, - HFmode, SFmode, DFmode, TFmode, @@ -2311,8 +2307,6 @@ rs6000_debug_reg_global (void) V8SImode, V4DImode, V2TImode, - V8BFmode, - V8HFmode, V4SFmode, V2DFmode, V8SFmode, @@ -2678,14 +2672,8 @@ rs6000_setup_reg_addr_masks (void) /* SDmode is special in that we want to access it only via REG+REG addressing on power7 and above, since we want to use the LFIWZX and - STFIWZX instructions to load it. - - Never allow offset addressing for 16-bit floating point modes, since - it is expected that 16-bit floating point should always go into the - vector registers and we only have indexed and indirect 16-bit loads to - VSR registers. */ - bool indexed_only_p = ((m == SDmode && TARGET_NO_SDMODE_STACK) - || FP16_SCALAR_MODE_P (m)); + STFIWZX instructions to load it. */ + bool indexed_only_p = (m == SDmode && TARGET_NO_SDMODE_STACK); any_addr_mask = 0; for (rc = FIRST_RELOAD_REG_CLASS; rc <= LAST_RELOAD_REG_CLASS; rc++) @@ -2749,7 +2737,6 @@ rs6000_setup_reg_addr_masks (void) && !complex_p && (m != E_DFmode || !TARGET_VSX) && (m != E_SFmode || !TARGET_P8_VECTOR) - && !FP16_SCALAR_MODE_P (m) && !small_int_vsx_p) { addr_mask |= RELOAD_REG_PRE_INCDEC; @@ -2970,24 +2957,18 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) rs6000_vector_unit[V16QImode] = VECTOR_ALTIVEC; rs6000_vector_align[V4SImode] = align32; rs6000_vector_align[V8HImode] = align32; - rs6000_vector_align[V8HFmode] = align32; - rs6000_vector_align[V8BFmode] = align32; rs6000_vector_align[V16QImode] = align32; if (TARGET_VSX) { rs6000_vector_mem[V4SImode] = VECTOR_VSX; rs6000_vector_mem[V8HImode] = VECTOR_VSX; - rs6000_vector_mem[V8HFmode] = VECTOR_VSX; - rs6000_vector_mem[V8BFmode] = VECTOR_VSX; rs6000_vector_mem[V16QImode] = VECTOR_VSX; } else { rs6000_vector_mem[V4SImode] = VECTOR_ALTIVEC; rs6000_vector_mem[V8HImode] = VECTOR_ALTIVEC; - rs6000_vector_mem[V8HFmode] = VECTOR_ALTIVEC; - rs6000_vector_mem[V8BFmode] = VECTOR_ALTIVEC; rs6000_vector_mem[V16QImode] = VECTOR_ALTIVEC; } } @@ -3007,15 +2988,6 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) rs6000_vector_align[V1TImode] = 128; } - /* _Float16 support. */ - if (TARGET_FLOAT16) - { - rs6000_vector_mem[HFmode] = VECTOR_VSX; - rs6000_vector_mem[BFmode] = VECTOR_VSX; - rs6000_vector_align[HFmode] = 16; - rs6000_vector_align[BFmode] = 16; - } - /* DFmode, see if we want to use the VSX unit. Memory is handled differently, so don't set rs6000_vector_mem. */ if (TARGET_VSX) @@ -3111,10 +3083,6 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) reg_addr[V16QImode].reload_load = CODE_FOR_reload_v16qi_di_load; reg_addr[V8HImode].reload_store = CODE_FOR_reload_v8hi_di_store; reg_addr[V8HImode].reload_load = CODE_FOR_reload_v8hi_di_load; - reg_addr[V8BFmode].reload_store = CODE_FOR_reload_v8bf_di_store; - reg_addr[V8BFmode].reload_load = CODE_FOR_reload_v8bf_di_load; - reg_addr[V8HFmode].reload_store = CODE_FOR_reload_v8hf_di_store; - reg_addr[V8HFmode].reload_load = CODE_FOR_reload_v8hf_di_load; reg_addr[V4SImode].reload_store = CODE_FOR_reload_v4si_di_store; reg_addr[V4SImode].reload_load = CODE_FOR_reload_v4si_di_load; reg_addr[V2DImode].reload_store = CODE_FOR_reload_v2di_di_store; @@ -3144,14 +3112,6 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) reg_addr[TFmode].reload_load = CODE_FOR_reload_tf_di_load; } - if (TARGET_FLOAT16) - { - reg_addr[HFmode].reload_store = CODE_FOR_reload_hf_di_store; - reg_addr[BFmode].reload_store = CODE_FOR_reload_bf_di_store; - reg_addr[HFmode].reload_load = CODE_FOR_reload_hf_di_load; - reg_addr[BFmode].reload_load = CODE_FOR_reload_bf_di_load; - } - /* Only provide a reload handler for SDmode if lfiwzx/stfiwx are available. */ if (TARGET_NO_SDMODE_STACK) @@ -3174,8 +3134,6 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) reg_addr[V2DImode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxv2di; reg_addr[V4SFmode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxv4sf; reg_addr[V4SImode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxv4si; - reg_addr[V8BFmode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxv8bf; - reg_addr[V8HFmode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxv8hf; reg_addr[V8HImode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxv8hi; reg_addr[V16QImode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxv16qi; reg_addr[SFmode].reload_gpr_vsx = CODE_FOR_reload_gpr_from_vsxsf; @@ -3186,8 +3144,6 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) reg_addr[V2DImode].reload_vsx_gpr = CODE_FOR_reload_vsx_from_gprv2di; reg_addr[V4SFmode].reload_vsx_gpr = CODE_FOR_reload_vsx_from_gprv4sf; reg_addr[V4SImode].reload_vsx_gpr = CODE_FOR_reload_vsx_from_gprv4si; - reg_addr[V8BFmode].reload_vsx_gpr = CODE_FOR_reload_vsx_from_gprv8bf; - reg_addr[V8HFmode].reload_vsx_gpr = CODE_FOR_reload_vsx_from_gprv8hf; reg_addr[V8HImode].reload_vsx_gpr = CODE_FOR_reload_vsx_from_gprv8hi; reg_addr[V16QImode].reload_vsx_gpr = CODE_FOR_reload_vsx_from_gprv16qi; reg_addr[SFmode].reload_vsx_gpr = CODE_FOR_reload_vsx_from_gprsf; @@ -3225,10 +3181,6 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) reg_addr[V2DImode].reload_load = CODE_FOR_reload_v2di_si_load; reg_addr[V1TImode].reload_store = CODE_FOR_reload_v1ti_si_store; reg_addr[V1TImode].reload_load = CODE_FOR_reload_v1ti_si_load; - reg_addr[V8BFmode].reload_store = CODE_FOR_reload_v8bf_si_store; - reg_addr[V8BFmode].reload_load = CODE_FOR_reload_v8bf_si_load; - reg_addr[V8HFmode].reload_store = CODE_FOR_reload_v8hf_si_store; - reg_addr[V8HFmode].reload_load = CODE_FOR_reload_v8hf_si_load; reg_addr[V4SFmode].reload_store = CODE_FOR_reload_v4sf_si_store; reg_addr[V4SFmode].reload_load = CODE_FOR_reload_v4sf_si_load; reg_addr[V2DFmode].reload_store = CODE_FOR_reload_v2df_si_store; @@ -3252,14 +3204,6 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) reg_addr[TFmode].reload_load = CODE_FOR_reload_tf_si_load; } - if (TARGET_FLOAT16) - { - reg_addr[HFmode].reload_store = CODE_FOR_reload_hf_si_store; - reg_addr[BFmode].reload_store = CODE_FOR_reload_bf_si_store; - reg_addr[HFmode].reload_load = CODE_FOR_reload_hf_si_load; - reg_addr[BFmode].reload_load = CODE_FOR_reload_bf_si_load; - } - /* Only provide a reload handler for SDmode if lfiwzx/stfiwx are available. */ if (TARGET_NO_SDMODE_STACK) @@ -4009,16 +3953,6 @@ rs6000_option_override_internal (bool global_init_p) } } - /* -mfloat16 needs power8 at a minimum in order to load up 16-bit values into - vector registers via loads/stores from GPRs and then using direct - moves. */ - if (TARGET_FLOAT16 && !TARGET_POWER8) - { - rs6000_isa_flags &= ~OPTION_MASK_FLOAT16; - if (rs6000_isa_flags_explicit & OPTION_MASK_FLOAT16) - error ("%qs requires at least %qs", "-mfloat16", "-mcpu=power8"); - } - /* If hard-float/altivec/vsx were explicitly turned off then don't allow the -mcpu setting to enable options that conflict. */ if ((!TARGET_HARD_FLOAT || !TARGET_ALTIVEC || !TARGET_VSX) @@ -6592,12 +6526,9 @@ easy_altivec_constant (rtx op, machine_mode mode) else if (mode != GET_MODE (op)) return 0; - /* V2DI/V2DF was added with VSX. Only allow 0 and all 1's as easy constants. - Likewise, don't handle 16-bit floating point constants here, unless they - are 0.0. */ - if (mode == V2DFmode - || FP16_SCALAR_MODE_P (mode) - || FP16_VECTOR_MODE_P (mode)) + /* V2DI/V2DF was added with VSX. Only allow 0 and all 1's as easy + constants. */ + if (mode == V2DFmode) return zero_constant (op, mode) ? 8 : 0; else if (mode == V2DImode) @@ -6723,12 +6654,6 @@ xxspltib_constant_p (rtx op, /* Handle (vec_duplicate <constant>). */ if (GET_CODE (op) == VEC_DUPLICATE) { - element = XEXP (op, 0); - - /* For V8BFmode & V8HFmode, the only valid to use xxspltib is 0.0. */ - if (mode == V8BFmode || mode == V8HFmode) - return element == CONST0_RTX (GET_MODE_INNER (mode)); - if (mode != V16QImode && mode != V8HImode && mode != V4SImode && mode != V2DImode) return false; @@ -6745,20 +6670,6 @@ xxspltib_constant_p (rtx op, /* Handle (const_vector [...]). */ else if (GET_CODE (op) == CONST_VECTOR) { - /* For V8BFmode & V8HFmode, the only valid to use xxspltib is 0.0. */ - if (mode == V8BFmode || mode == V8HFmode) - { - if (op == CONST0_RTX (mode)) - return true; - - rtx zero = CONST0_RTX (GET_MODE_INNER (mode)); - for (i = 0; i < nunits; i++) - if (CONST_VECTOR_ELT (op, i) != zero) - return false; - - return true; - } - if (mode != V16QImode && mode != V8HImode && mode != V4SImode && mode != V2DImode) return false; @@ -6975,8 +6886,6 @@ output_vec_const_move (rtx *operands) return "vspltisw %0,%1"; case E_V8HImode: - case E_V8HFmode: - case E_V8BFmode: return "vspltish %0,%1"; case E_V16QImode: @@ -7205,15 +7114,6 @@ rs6000_expand_vector_init (rtx target, rtx vals) return; } - /* Special case splats of 16-bit floating point. */ - if (all_same && FP16_VECTOR_MODE_P (mode)) - { - rtx op0 = force_reg (GET_MODE_INNER (mode), XVECEXP (vals, 0, 0)); - rtx dup = gen_rtx_VEC_DUPLICATE (mode, op0); - emit_insn (gen_rtx_SET (target, dup)); - return; - } - /* Special case initializing vector short/char that are splats if we are on 64-bit systems with direct move. */ if (all_same && TARGET_DIRECT_MOVE_64BIT @@ -7277,9 +7177,7 @@ rs6000_expand_vector_init (rtx target, rtx vals) return; } - if (TARGET_DIRECT_MOVE - && (mode == V16QImode || mode == V8HImode || mode == V8HFmode - || mode == V8BFmode)) + if (TARGET_DIRECT_MOVE && (mode == V16QImode || mode == V8HImode)) { rtx op[16]; /* Force the values into word_mode registers. */ @@ -8854,8 +8752,6 @@ reg_offset_addressing_ok_p (machine_mode mode) { case E_V16QImode: case E_V8HImode: - case E_V8HFmode: - case E_V8BFmode: case E_V4SFmode: case E_V4SImode: case E_V2DFmode: @@ -8883,13 +8779,6 @@ reg_offset_addressing_ok_p (machine_mode mode) case E_TDOmode: return TARGET_DENSE_MATH; - /* For 16-bit floating point types, do not allow offset addressing, since - it is assumed that most of the use will be in vector registers, and we - only have reg+reg addressing for 16-bit modes. */ - case E_BFmode: - case E_HFmode: - return false; - case E_SDmode: /* If we can do direct load/stores of SDmode, restrict it to reg+reg addressing for the LFIWZX and STFIWX instructions. */ @@ -9174,13 +9063,6 @@ rs6000_legitimate_offset_address_p (machine_mode mode, rtx x, extra = 0; switch (mode) { - /* For 16-bit floating point types, do not allow offset addressing, since - it is assumed that most of the use will be in vector registers, and we - only have reg+reg addressing for 16-bit modes. */ - case E_BFmode: - case E_HFmode: - return false; - case E_DFmode: case E_DDmode: case E_DImode: @@ -9282,11 +9164,6 @@ macho_lo_sum_memory_operand (rtx x, machine_mode mode) static bool legitimate_lo_sum_address_p (machine_mode mode, rtx x, int strict) { - /* For 16-bit floating point types, do not allow offset addressing, since - it is assumed that most of the use will be in vector registers, and we - only have reg+reg addressing for 16-bit modes. */ - if (FP16_SCALAR_MODE_P (mode)) - return false; if (GET_CODE (x) != LO_SUM) return false; if (!REG_P (XEXP (x, 0))) @@ -10983,8 +10860,6 @@ rs6000_const_vec (machine_mode mode) subparts = 4; break; case E_V8HImode: - case E_V8HFmode: - case E_V8BFmode: subparts = 8; break; case E_V16QImode: @@ -11440,8 +11315,6 @@ rs6000_emit_move (rtx dest, rtx source, machine_mode mode) case E_V16QImode: case E_V8HImode: - case E_V8HFmode: - case E_V8BFmode: case E_V4SFmode: case E_V4SImode: case E_V2DFmode: @@ -12894,9 +12767,6 @@ rs6000_secondary_reload_simple_move (enum rs6000_reg_type to_type, && ((to_type == GPR_REG_TYPE && from_type == VSX_REG_TYPE) || (to_type == VSX_REG_TYPE && from_type == GPR_REG_TYPE))) { - if (FP16_SCALAR_MODE_P (mode)) - return true; - if (TARGET_POWERPC64) { /* ISA 2.07: MTVSRD or MVFVSRD. */ @@ -13695,11 +13565,6 @@ rs6000_preferred_reload_class (rtx x, enum reg_class rclass) || mode_supports_dq_form (mode)) return rclass; - /* IEEE 16-bit and bfloat16 don't support offset addressing, but they can - go in any floating point/vector register. */ - if (FP16_SCALAR_MODE_P (mode)) - return rclass; - /* If this is a scalar floating point value and we don't have D-form addressing, prefer the traditional floating point registers so that we can use D-form (register+offset) addressing. */ @@ -13937,9 +13802,6 @@ rs6000_can_change_mode_class (machine_mode from, unsigned from_size = GET_MODE_SIZE (from); unsigned to_size = GET_MODE_SIZE (to); - if (FP16_SCALAR_MODE_P (from) || FP16_SCALAR_MODE_P (to)) - return from_size == to_size; - if (from_size != to_size) { enum reg_class xclass = (TARGET_VSX) ? VSX_REGS : FLOAT_REGS; @@ -23282,7 +23144,7 @@ rs6000_load_constant_and_splat (machine_mode mode, REAL_VALUE_TYPE dconst) { rtx reg; - if (mode == SFmode || mode == DFmode || FP16_SCALAR_MODE_P (mode)) + if (mode == SFmode || mode == DFmode) { rtx d = const_double_from_real_value (dconst, mode); reg = force_reg (mode, d); @@ -24615,8 +24477,6 @@ rs6000_scalar_mode_supported_p (scalar_mode mode) return default_decimal_float_supported_p (); else if (TARGET_FLOAT128_TYPE && (mode == KFmode || mode == IFmode)) return true; - else if (FP16_SCALAR_MODE_P (mode)) - return true; else return default_scalar_mode_supported_p (mode); } @@ -24641,10 +24501,6 @@ rs6000_libgcc_floating_mode_supported_p (scalar_float_mode mode) case E_KFmode: return TARGET_FLOAT128_TYPE && !TARGET_IEEEQUAD; - case E_BFmode: - case E_HFmode: - return TARGET_FLOAT16; - default: return false; } @@ -24672,9 +24528,6 @@ rs6000_floatn_mode (int n, bool extended) { switch (n) { - case 16: - return TARGET_FLOAT16 ? SFmode : opt_scalar_float_mode (); - case 32: return DFmode; @@ -24696,9 +24549,6 @@ rs6000_floatn_mode (int n, bool extended) { switch (n) { - case 16: - return TARGET_FLOAT16 ? HFmode : opt_scalar_float_mode (); - case 32: return SFmode; @@ -24821,7 +24671,6 @@ static struct rs6000_opt_mask const rs6000_opt_masks[] = { "power11", OPTION_MASK_POWER11, false, false }, { "hard-dfp", OPTION_MASK_DFP, false, true }, { "htm", OPTION_MASK_HTM, false, true }, - { "float16", OPTION_MASK_FLOAT16, false, true }, { "isel", OPTION_MASK_ISEL, false, true }, { "mfcrf", OPTION_MASK_MFCRF, false, true }, { "mfpgpr", 0, false, true }, @@ -29276,37 +29125,24 @@ constant_fp_to_128bit_vector (rtx op, const REAL_VALUE_TYPE *rtype = CONST_DOUBLE_REAL_VALUE (op); long real_words[VECTOR_128BIT_WORDS]; - /* For 16-bit floating point, the constant doesn't fill the whole 32-bit - word. Deal with it here, storing the bytes in big endian fashion. */ - if (FP16_SCALAR_MODE_P (mode)) - { - real_to_target (real_words, rtype, mode); - info->bytes[byte_num] = (unsigned char) (real_words[0] >> 8); - info->bytes[byte_num+1] = (unsigned char) (real_words[0]); - } + /* Make sure we don't overflow the real_words array and that it is + filled completely. */ + gcc_assert (num_words <= VECTOR_128BIT_WORDS && (bitsize % 32) == 0); - else - { - /* Make sure we don't overflow the real_words array and that it is filled - completely. */ - gcc_assert (num_words <= VECTOR_128BIT_WORDS && (bitsize % 32) == 0); + real_to_target (real_words, rtype, mode); - real_to_target (real_words, rtype, mode); - - /* Iterate over each 32-bit word in the floating point constant. The - real_to_target function puts out words in target endian fashion. We - need to arrange the order so that the bytes are written in big endian - order. */ - for (unsigned num = 0; num < num_words; num++) - { - unsigned endian_num = (BYTES_BIG_ENDIAN - ? num - : num_words - 1 - num); + /* Iterate over each 32-bit word in the floating point constant. The + real_to_target function puts out words in target endian fashion. We need + to arrange the order so that the bytes are written in big endian order. */ + for (unsigned num = 0; num < num_words; num++) + { + unsigned endian_num = (BYTES_BIG_ENDIAN + ? num + : num_words - 1 - num); - unsigned uvalue = real_words[endian_num]; - for (int shift = 32 - 8; shift >= 0; shift -= 8) - info->bytes[byte_num++] = (uvalue >> shift) & 0xff; - } + unsigned uvalue = real_words[endian_num]; + for (int shift = 32 - 8; shift >= 0; shift -= 8) + info->bytes[byte_num++] = (uvalue >> shift) & 0xff; } /* Mark that this constant involves floating point. */ @@ -29345,7 +29181,6 @@ vec_const_128bit_to_bytes (rtx op, return false; /* Set up the bits. */ - info->mode = mode; switch (GET_CODE (op)) { /* Integer constants, default to double word. */ @@ -29573,10 +29408,6 @@ constant_generates_xxspltiw (vec_const_128bit_type *vsx_const) if (!TARGET_SPLAT_WORD_CONSTANT || !TARGET_PREFIXED || !TARGET_VSX) return 0; - /* HFmode/BFmode constants can always use XXSPLTIW. */ - if (FP16_SCALAR_MODE_P (vsx_const->mode)) - return 1; - if (!vsx_const->all_words_same) return 0; diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index ad779b027154..6fde412d0131 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -343,32 +343,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); || ((MODE) == TDmode) \ || (!TARGET_FLOAT128_TYPE && FLOAT128_IEEE_P (MODE))) -/* Do we have conversion support in hardware for the 16-bit floating point? */ -#define TARGET_BFLOAT16_HW (TARGET_FLOAT16 && TARGET_POWER10) -#define TARGET_FLOAT16_HW (TARGET_FLOAT16 && TARGET_POWER9) - -/* Do we have conversion support in hardware for the 16-bit floating point and - also enable the 16-bit floating point vector optimizations? */ -#define TARGET_BFLOAT16_HW_VECTOR \ - (TARGET_FLOAT16 && TARGET_POWER10 && TARGET_BFLOAT16_VECTOR) - -#define TARGET_FLOAT16_HW_VECTOR \ - (TARGET_FLOAT16 && TARGET_POWER9 && TARGET_FLOAT16_VECTOR) - -/* Is this a valid 16-bit scalar floating point mode? */ -#define FP16_SCALAR_MODE_P(MODE) \ - (TARGET_FLOAT16 && ((MODE) == HFmode || (MODE) == BFmode)) - -/* Is this a valid 16-bit scalar floating point mode that has hardware - conversions? */ -#define FP16_HW_SCALAR_MODE_P(MODE) \ - (((MODE) == HFmode && TARGET_FLOAT16_HW) \ - || ((MODE) == BFmode && TARGET_BFLOAT16_HW)) - -/* Is this a valid 16-bit scalar floating point mode? */ -#define FP16_VECTOR_MODE_P(MODE) \ - (TARGET_FLOAT16 && ((MODE) == V8HFmode || (MODE) == V8BFmode)) - /* Return true for floating point that does not use a vector register. */ #define SCALAR_FLOAT_MODE_NOT_VECTOR_P(MODE) \ (SCALAR_FLOAT_MODE_P (MODE) && !FLOAT128_VECTOR_P (MODE)) @@ -1027,8 +1001,6 @@ enum data_align { align_abi, align_opt, align_both }; #define ALTIVEC_VECTOR_MODE(MODE) \ ((MODE) == V16QImode \ || (MODE) == V8HImode \ - || (MODE) == V8HFmode \ - || (MODE) == V8BFmode \ || (MODE) == V4SFmode \ || (MODE) == V4SImode \ || VECTOR_ALIGNMENT_P (MODE)) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 6f2d6cb90239..0717e86e9d6b 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -554,8 +554,6 @@ (define_mode_iterator FMOVE128_GPR [TI V16QI V8HI - V8BF - V8HF V4SI V4SF V2DI @@ -716,14 +714,10 @@ ; A generic w/d attribute, for things like cmpw/cmpd. (define_mode_attr wd [(QI "b") (HI "h") - (BF "h") - (HF "h") (SI "w") (DI "d") (V16QI "b") (V8HI "h") - (V8BF "h") - (V8HF "h") (V4SI "w") (V2DI "d") (V1TI "q") @@ -736,8 +730,6 @@ (DI "d") (V16QI "du") (V8HI "du") - (V8BF "du") - (V8HF "du") (V4SI "du") (V2DI "d")]) @@ -787,8 +779,6 @@ PTI (V16QI "TARGET_ALTIVEC") (V8HI "TARGET_ALTIVEC") - (V8BF "TARGET_ALTIVEC") - (V8HF "TARGET_ALTIVEC") (V4SI "TARGET_ALTIVEC") (V4SF "TARGET_ALTIVEC") (V2DI "TARGET_ALTIVEC") @@ -806,8 +796,6 @@ (PTI "&r,r,r") (V16QI "wa,v,&?r,?r,?r") (V8HI "wa,v,&?r,?r,?r") - (V8BF "wa,v,&?r,?r,?r") - (V8HF "wa,v,&?r,?r,?r") (V4SI "wa,v,&?r,?r,?r") (V4SF "wa,v,&?r,?r,?r") (V2DI "wa,v,&?r,?r,?r") @@ -819,8 +807,6 @@ (PTI "r,0,r") (V16QI "wa,v,r,0,r") (V8HI "wa,v,r,0,r") - (V8BF "wa,v,r,0,r") - (V8HF "wa,v,r,0,r") (V4SI "wa,v,r,0,r") (V4SF "wa,v,r,0,r") (V2DI "wa,v,r,0,r") @@ -832,8 +818,6 @@ (PTI "r,r,0") (V16QI "wa,v,r,r,0") (V8HI "wa,v,r,r,0") - (V8BF "wa,v,r,r,0") - (V8HF "wa,v,r,r,0") (V4SI "wa,v,r,r,0") (V4SF "wa,v,r,r,0") (V2DI "wa,v,r,r,0") @@ -847,8 +831,6 @@ (PTI "r,0,0") (V16QI "wa,v,r,0,0") (V8HI "wa,v,r,0,0") - (V8BF "wa,v,r,0,0") - (V8HF "wa,v,r,0,0") (V4SI "wa,v,r,0,0") (V4SF "wa,v,r,0,0") (V2DI "wa,v,r,0,0") @@ -857,8 +839,8 @@ ;; Reload iterator for creating the function to allocate a base register to ;; supplement addressing modes. -(define_mode_iterator RELOAD [V16QI V8HI V8BF V8HF V4SI V2DI V4SF V2DF V1TI - SF SD SI DF DD DI TI PTI KF IF TF HF BF +(define_mode_iterator RELOAD [V16QI V8HI V4SI V2DI V4SF V2DF V1TI + SF SD SI DF DD DI TI PTI KF IF TF OO XO]) ;; Iterate over smin, smax @@ -15895,4 +15877,3 @@ (include "htm.md") (include "fusion.md") (include "pcrel-opt.md") -(include "float16.md") diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt index 3d1986fa12bd..8a1b339c6e83 100644 --- a/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt @@ -645,10 +645,6 @@ mdense_math Target Mask(DENSE_MATH) Var(rs6000_isa_flags) Generate (do not generate) dense math MMA+ instructions. -mfloat16 -Target Mask(FLOAT16) Var(rs6000_isa_flags) -Enable or disable 16-bit floating point. - ; Documented parameters -param=rs6000-vect-unroll-limit= diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md index 0b9727cca35c..f5797387ca79 100644 --- a/gcc/config/rs6000/vector.md +++ b/gcc/config/rs6000/vector.md @@ -50,31 +50,11 @@ (define_mode_iterator VEC_K [V16QI V8HI V4SI V4SF]) ;; Vector logical modes -(define_mode_iterator VEC_L [V16QI - V8HI - V8BF - V8HF - V4SI - V2DI - V4SF - V2DF - V1TI - TI - KF - TF]) +(define_mode_iterator VEC_L [V16QI V8HI V4SI V2DI V4SF V2DF V1TI TI KF TF]) ;; Vector modes for moves. Don't do TImode or TFmode here, since their ;; moves are handled elsewhere. -(define_mode_iterator VEC_M [V16QI - V8HI - V4SI - V2DI - V8BF - V8HF - V4SF - V2DF - V1TI - KF]) +(define_mode_iterator VEC_M [V16QI V8HI V4SI V2DI V4SF V2DF V1TI KF]) ;; Vector modes for types that don't need a realignment under VSX (define_mode_iterator VEC_N [V4SI V4SF V2DI V2DF V1TI KF TF]) @@ -83,14 +63,7 @@ (define_mode_iterator VEC_C [V16QI V8HI V4SI V2DI V4SF V2DF V1TI]) ;; Vector init/extract modes -(define_mode_iterator VEC_E [V16QI - V8HI - V4SI - V2DI - V8BF - V8HF - V4SF - V2DF]) +(define_mode_iterator VEC_E [V16QI V8HI V4SI V2DI V4SF V2DF]) ;; Vector modes for 64-bit base types (define_mode_iterator VEC_64 [V2DI V2DF]) @@ -103,8 +76,6 @@ (V8HI "HI") (V4SI "SI") (V2DI "DI") - (V8BF "BF") - (V8HF "HF") (V4SF "SF") (V2DF "DF") (V1TI "TI") @@ -115,8 +86,6 @@ (V8HI "hi") (V4SI "si") (V2DI "di") - (V8BF "bf") - (V8HF "hf") (V4SF "sf") (V2DF "df") (V1TI "ti") diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index 3198802dabb9..dd3573b80868 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -46,14 +46,9 @@ ;; Iterator for vector floating point types supported by VSX (define_mode_iterator VSX_F [V4SF V2DF]) -;; Iterator for 8 element vectors -(define_mode_iterator VECTOR_16BIT [V8HI V8BF V8HF]) - ;; Iterator for logical types supported by VSX (define_mode_iterator VSX_L [V16QI V8HI - V8BF - V8HF V4SI V2DI V4SF @@ -66,8 +61,6 @@ ;; Iterator for memory moves. (define_mode_iterator VSX_M [V16QI V8HI - V8BF - V8HF V4SI V2DI V4SF @@ -78,8 +71,6 @@ TI]) (define_mode_attr VSX_XXBR [(V8HI "h") - (V8BF "h") - (V8HF "h") (V4SI "w") (V4SF "w") (V2DF "d") @@ -89,8 +80,6 @@ ;; Map into the appropriate load/store name based on the type (define_mode_attr VSm [(V16QI "vw4") (V8HI "vw4") - (V8BF "vw4") - (V8HF "vw4") (V4SI "vw4") (V4SF "vw4") (V2DF "vd2") @@ -104,8 +93,6 @@ ;; Map the register class used (define_mode_attr VSr [(V16QI "v") (V8HI "v") - (V8BF "v") - (V8HF "v") (V4SI "v") (V4SF "wa") (V2DI "wa") @@ -121,8 +108,6 @@ ;; What value we need in the "isa" field, to make the IEEE QP float work. (define_mode_attr VSisa [(V16QI "*") (V8HI "*") - (V8BF "p10") - (V8HF "p9v") (V4SI "*") (V4SF "*") (V2DI "*") @@ -139,8 +124,6 @@ ;; integer modes. (define_mode_attr ??r [(V16QI "??r") (V8HI "??r") - (V8BF "??r") - (V8HF "??r") (V4SI "??r") (V4SF "??r") (V2DI "??r") @@ -153,8 +136,6 @@ ;; A mode attribute used for 128-bit constant values. (define_mode_attr nW [(V16QI "W") (V8HI "W") - (V8BF "W") - (V8HF "W") (V4SI "W") (V4SF "W") (V2DI "W") @@ -182,8 +163,6 @@ ;; operation (define_mode_attr VSv [(V16QI "v") (V8HI "v") - (V8BF "v") - (V8HF "v") (V4SI "v") (V4SF "v") (V2DI "v") @@ -417,8 +396,6 @@ ;; Like VM2 in altivec.md, just do char, short, int, long, float and double (define_mode_iterator VM3 [V4SI V8HI - V8BF - V8HF V16QI V4SF V2DF @@ -430,8 +407,6 @@ (define_mode_attr VM3_char [(V2DI "d") (V4SI "w") (V8HI "h") - (V8BF "h") - (V8HF "h") (V16QI "b") (V2DF "d") (V4SF "w")]) @@ -566,21 +541,21 @@ [(set_attr "type" "vecload") (set_attr "length" "8")]) -(define_insn_and_split "*vsx_le_perm_load_<mode>" - [(set (match_operand:VECTOR_16BIT 0 "vsx_register_operand" "=wa") - (match_operand:VECTOR_16BIT 1 "indexed_or_indirect_operand" "Z"))] +(define_insn_and_split "*vsx_le_perm_load_v8hi" + [(set (match_operand:V8HI 0 "vsx_register_operand" "=wa") + (match_operand:V8HI 1 "indexed_or_indirect_operand" "Z"))] "!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR" "#" "&& 1" [(set (match_dup 2) - (vec_select:VECTOR_16BIT + (vec_select:V8HI (match_dup 1) (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) (const_int 0) (const_int 1) (const_int 2) (const_int 3)]))) (set (match_dup 0) - (vec_select:VECTOR_16BIT + (vec_select:V8HI (match_dup 2) (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) @@ -827,27 +802,27 @@ (const_int 0) (const_int 1)])))] "") -(define_insn "*vsx_le_perm_store_<mode>" - [(set (match_operand:VECTOR_16BIT 0 "indexed_or_indirect_operand" "=Z") - (match_operand:VECTOR_16BIT 1 "vsx_register_operand" "wa"))] +(define_insn "*vsx_le_perm_store_v8hi" + [(set (match_operand:V8HI 0 "indexed_or_indirect_operand" "=Z") + (match_operand:V8HI 1 "vsx_register_operand" "wa"))] "!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR" "#" [(set_attr "type" "vecstore") (set_attr "length" "12")]) (define_split - [(set (match_operand:VECTOR_16BIT 0 "indexed_or_indirect_operand") - (match_operand:VECTOR_16BIT 1 "vsx_register_operand"))] + [(set (match_operand:V8HI 0 "indexed_or_indirect_operand") + (match_operand:V8HI 1 "vsx_register_operand"))] "!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && !reload_completed" [(set (match_dup 2) - (vec_select:VECTOR_16BIT + (vec_select:V8HI (match_dup 1) (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) (const_int 0) (const_int 1) (const_int 2) (const_int 3)]))) (set (match_dup 0) - (vec_select:VECTOR_16BIT + (vec_select:V8HI (match_dup 2) (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) @@ -886,25 +861,25 @@ ;; The post-reload split requires that we re-permute the source ;; register in case it is still live. (define_split - [(set (match_operand:VECTOR_16BIT 0 "indexed_or_indirect_operand") - (match_operand:VECTOR_16BIT 1 "vsx_register_operand"))] + [(set (match_operand:V8HI 0 "indexed_or_indirect_operand") + (match_operand:V8HI 1 "vsx_register_operand"))] "!BYTES_BIG_ENDIAN && TARGET_VSX && !TARGET_P9_VECTOR && reload_completed" [(set (match_dup 1) - (vec_select:VECTOR_16BIT + (vec_select:V8HI (match_dup 1) (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) (const_int 0) (const_int 1) (const_int 2) (const_int 3)]))) (set (match_dup 0) - (vec_select:VECTOR_16BIT + (vec_select:V8HI (match_dup 1) (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) (const_int 0) (const_int 1) (const_int 2) (const_int 3)]))) (set (match_dup 1) - (vec_select:VECTOR_16BIT + (vec_select:V8HI (match_dup 1) (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) @@ -1459,15 +1434,15 @@ "lxvw4x %x0,%y1" [(set_attr "type" "vecload")]) -(define_expand "vsx_ld_elemrev_<mode>" - [(set (match_operand:VECTOR_16BIT 0 "vsx_register_operand" "=wa") - (vec_select:VECTOR_16BIT - (match_operand:VECTOR_16BIT 1 "memory_operand" "Z") +(define_expand "vsx_ld_elemrev_v8hi" + [(set (match_operand:V8HI 0 "vsx_register_operand" "=wa") + (vec_select:V8HI + (match_operand:V8HI 1 "memory_operand" "Z") (parallel [(const_int 7) (const_int 6) (const_int 5) (const_int 4) (const_int 3) (const_int 2) (const_int 1) (const_int 0)])))] - "VECTOR_MEM_VSX_P (<MODE>mode) && !BYTES_BIG_ENDIAN" + "VECTOR_MEM_VSX_P (V8HImode) && !BYTES_BIG_ENDIAN" { if (!TARGET_P9_VECTOR) { @@ -1477,9 +1452,9 @@ unsigned int reorder[16] = {13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2}; int i; - subreg = simplify_gen_subreg (V4SImode, operands[1], <MODE>mode, 0); + subreg = simplify_gen_subreg (V4SImode, operands[1], V8HImode, 0); emit_insn (gen_vsx_ld_elemrev_v4si (tmp, subreg)); - subreg2 = simplify_gen_subreg (<MODE>mode, tmp, V4SImode, 0); + subreg2 = simplify_gen_subreg (V8HImode, tmp, V4SImode, 0); for (i = 0; i < 16; ++i) perm[i] = GEN_INT (reorder[i]); @@ -1487,21 +1462,21 @@ pcv = force_reg (V16QImode, gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm))); - emit_insn (gen_altivec_vperm_<mode>_direct (operands[0], subreg2, - subreg2, pcv)); + emit_insn (gen_altivec_vperm_v8hi_direct (operands[0], subreg2, + subreg2, pcv)); DONE; } }) -(define_insn "*vsx_ld_elemrev_<mode>_internal" - [(set (match_operand:VECTOR_16BIT 0 "vsx_register_operand" "=wa") - (vec_select:VECTOR_16BIT - (match_operand:VECTOR_16BIT 1 "memory_operand" "Z") +(define_insn "*vsx_ld_elemrev_v8hi_internal" + [(set (match_operand:V8HI 0 "vsx_register_operand" "=wa") + (vec_select:V8HI + (match_operand:V8HI 1 "memory_operand" "Z") (parallel [(const_int 7) (const_int 6) (const_int 5) (const_int 4) (const_int 3) (const_int 2) (const_int 1) (const_int 0)])))] - "VECTOR_MEM_VSX_P (<MODE>mode) && !BYTES_BIG_ENDIAN && TARGET_P9_VECTOR" + "VECTOR_MEM_VSX_P (V8HImode) && !BYTES_BIG_ENDIAN && TARGET_P9_VECTOR" "lxvh8x %x0,%y1" [(set_attr "type" "vecload")]) @@ -1609,20 +1584,20 @@ "stxvw4x %x1,%y0" [(set_attr "type" "vecstore")]) -(define_expand "vsx_st_elemrev_<mode>" - [(set (match_operand:VECTOR_16BIT 0 "memory_operand" "=Z") - (vec_select:VECTOR_16BIT - (match_operand:VECTOR_16BIT 1 "vsx_register_operand" "wa") +(define_expand "vsx_st_elemrev_v8hi" + [(set (match_operand:V8HI 0 "memory_operand" "=Z") + (vec_select:V8HI + (match_operand:V8HI 1 "vsx_register_operand" "wa") (parallel [(const_int 7) (const_int 6) (const_int 5) (const_int 4) (const_int 3) (const_int 2) (const_int 1) (const_int 0)])))] - "VECTOR_MEM_VSX_P (<MODE>mode) && !BYTES_BIG_ENDIAN" + "VECTOR_MEM_VSX_P (V8HImode) && !BYTES_BIG_ENDIAN" { if (!TARGET_P9_VECTOR) { rtx mem_subreg, subreg, perm[16], pcv; - rtx tmp = gen_reg_rtx (<MODE>mode); + rtx tmp = gen_reg_rtx (V8HImode); /* 2 is leftmost element in register */ unsigned int reorder[16] = {13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2}; int i; @@ -1633,10 +1608,10 @@ pcv = force_reg (V16QImode, gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, perm))); - emit_insn (gen_altivec_vperm_<mode>_direct (tmp, operands[1], - operands[1], pcv)); - subreg = simplify_gen_subreg (V4SImode, tmp, <MODE>mode, 0); - mem_subreg = simplify_gen_subreg (V4SImode, operands[0], <MODE>mode, 0); + emit_insn (gen_altivec_vperm_v8hi_direct (tmp, operands[1], + operands[1], pcv)); + subreg = simplify_gen_subreg (V4SImode, tmp, V8HImode, 0); + mem_subreg = simplify_gen_subreg (V4SImode, operands[0], V8HImode, 0); emit_insn (gen_vsx_st_elemrev_v4si (mem_subreg, subreg)); DONE; } @@ -1651,15 +1626,15 @@ "stxvd2x %x1,%y0" [(set_attr "type" "vecstore")]) -(define_insn "*vsx_st_elemrev_<mode>_internal" - [(set (match_operand:VECTOR_16BIT 0 "memory_operand" "=Z") - (vec_select:VECTOR_16BIT - (match_operand:VECTOR_16BIT 1 "vsx_register_operand" "wa") +(define_insn "*vsx_st_elemrev_v8hi_internal" + [(set (match_operand:V8HI 0 "memory_operand" "=Z") + (vec_select:V8HI + (match_operand:V8HI 1 "vsx_register_operand" "wa") (parallel [(const_int 7) (const_int 6) (const_int 5) (const_int 4) (const_int 3) (const_int 2) (const_int 1) (const_int 0)])))] - "VECTOR_MEM_VSX_P (<MODE>mode) && !BYTES_BIG_ENDIAN && TARGET_P9_VECTOR" + "VECTOR_MEM_VSX_P (V8HImode) && !BYTES_BIG_ENDIAN && TARGET_P9_VECTOR" "stxvh8x %x1,%y0" [(set_attr "type" "vecstore")]) @@ -3324,10 +3299,10 @@ "xxpermdi %x0,%x1,%x1,2" [(set_attr "type" "vecperm")]) -(define_insn "xxswapd_<mode>" - [(set (match_operand:VECTOR_16BIT 0 "vsx_register_operand" "=wa") - (vec_select:VECTOR_16BIT - (match_operand:VECTOR_16BIT 1 "vsx_register_operand" "wa") +(define_insn "xxswapd_v8hi" + [(set (match_operand:V8HI 0 "vsx_register_operand" "=wa") + (vec_select:V8HI + (match_operand:V8HI 1 "vsx_register_operand" "wa") (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) (const_int 0) (const_int 1) @@ -3427,15 +3402,15 @@ "lxvd2x %x0,%y1" [(set_attr "type" "vecload")]) -(define_insn "*vsx_lxvd2x8_le_<MODE>" - [(set (match_operand:VECTOR_16BIT 0 "vsx_register_operand" "=wa") - (vec_select:VECTOR_16BIT - (match_operand:VECTOR_16BIT 1 "memory_operand" "Z") +(define_insn "*vsx_lxvd2x8_le_V8HI" + [(set (match_operand:V8HI 0 "vsx_register_operand" "=wa") + (vec_select:V8HI + (match_operand:V8HI 1 "memory_operand" "Z") (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) (const_int 0) (const_int 1) (const_int 2) (const_int 3)])))] - "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode) && !TARGET_P9_VECTOR" + "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (V8HImode) && !TARGET_P9_VECTOR" "lxvd2x %x0,%y1" [(set_attr "type" "vecload")]) @@ -3503,15 +3478,15 @@ [(set_attr "type" "vecstore") (set_attr "length" "8")]) -(define_insn "*vsx_stxvd2x8_le_<MODE>" - [(set (match_operand:VECTOR_16BIT 0 "memory_operand" "=Z") - (vec_select:VECTOR_16BIT - (match_operand:VECTOR_16BIT 1 "vsx_register_operand" "wa") +(define_insn "*vsx_stxvd2x8_le_V8HI" + [(set (match_operand:V8HI 0 "memory_operand" "=Z") + (vec_select:V8HI + (match_operand:V8HI 1 "vsx_register_operand" "wa") (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7) (const_int 0) (const_int 1) (const_int 2) (const_int 3)])))] - "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode) && !TARGET_P9_VECTOR" + "!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (V8HImode) && !TARGET_P9_VECTOR" "stxvd2x %x1,%y0" [(set_attr "type" "vecstore")]) @@ -4085,8 +4060,7 @@ if (which_alternative == 0 && ((<MODE>mode == V16QImode && INTVAL (operands[2]) == (BYTES_BIG_ENDIAN ? 7 : 8)) - || ((<MODE>mode == V8HImode || <MODE>mode == V8HFmode - || <MODE>mode == V8BFmode) + || (<MODE>mode == V8HImode && INTVAL (operands[2]) == (BYTES_BIG_ENDIAN ? 3 : 4)))) { enum machine_mode dest_mode = GET_MODE (operands[0]); @@ -4165,8 +4139,7 @@ else vec_tmp = src; } - else if (<MODE>mode == V8HImode || <MODE>mode == V8HFmode - || <MODE>mode == V8BFmode) + else if (<MODE>mode == V8HImode) { if (value != 3) emit_insn (gen_altivec_vsplth_direct (vec_tmp, src, element)); diff --git a/libgcc/config.host b/libgcc/config.host index e1b9cd055be8..82ea1772f516 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1302,10 +1302,6 @@ powerpc*-*-linux*) tmake_file="${tmake_file} rs6000/t-float128-p10-hw" fi - if test $libgcc_cv_powerpc_float16 = yes; then - tmake_file="${tmake_file} rs6000/t-float16" - fi - extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o" md_unwind_header=rs6000/linux-unwind.h ;; diff --git a/libgcc/config/rs6000/sfp-machine.h b/libgcc/config/rs6000/sfp-machine.h index 642d2fc4f215..f0ede0e042a3 100644 --- a/libgcc/config/rs6000/sfp-machine.h +++ b/libgcc/config/rs6000/sfp-machine.h @@ -22,9 +22,6 @@ typedef unsigned int UTItype __attribute__ ((mode (TI))); #define _FP_I_TYPE int #endif /* 32-bits */ -#define _FP_NANFRAC_H _FP_QNANBIT_H -#define _FP_NANFRAC_B _FP_QNANBIT_B - /* The type of the result of a floating point comparison. This must match `__libgcc_cmp_return__' in GCC for the target. */ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); @@ -65,8 +62,6 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); #define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 #endif -#define _FP_NANSIGN_H 1 -#define _FP_NANSIGN_B 1 #define _FP_NANSIGN_S 0 #define _FP_NANSIGN_D 0 #define _FP_NANSIGN_Q 0 @@ -166,48 +161,3 @@ void __sfp_handle_exceptions (int); # define strong_alias(name, aliasname) _strong_alias(name, aliasname) # define _strong_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((alias (#name))); - -/* Add prototypes for the HFmode and BFmode functions. */ -typedef double DFtype2; -typedef float SFtype2; -typedef int DItype2 __attribute__ ((mode (DI))); -typedef unsigned int UDItype2 __attribute__ ((mode (DI))); -typedef int SItype2 __attribute__ ((mode (SI))); -typedef unsigned int USItype2 __attribute__ ((mode (SI))); - -#ifdef __FLOAT16__ -typedef float HFtype2 __attribute__ ((mode (HF))); - -extern CMPtype __eqhf2 (HFtype2, HFtype2); -extern DFtype2 __extendhfdf2 (HFtype2); -extern SFtype2 __extendhfsf2 (HFtype2); -extern DItype2 __fixhfdi (HFtype2); -extern SItype2 __fixhfsi (HFtype2); -extern UDItype2 __fixunshfdi (HFtype2); -extern USItype2 __fixunshfsi (HFtype2); -extern HFtype2 __floatdihf (DItype2); -extern HFtype2 __floatsihf (SItype2); -extern HFtype2 __floatundihf (UDItype2); -extern HFtype2 __floatunsihf (USItype2); -extern HFtype2 __truncdfhf2 (DFtype2); -extern HFtype2 __truncsfhf2 (SFtype2); -#endif - -#ifdef __BFLOAT16__ -typedef float BFtype2 __attribute__ ((mode (BF))); - -extern SFtype2 __extendbfsf2 (BFtype2); -extern BFtype2 __floatdibf (DItype2); -extern BFtype2 __floatsibf (SItype2); -extern BFtype2 __floatundibf (UDItype2); -extern BFtype2 __floatunsibf (USItype2); -extern BFtype2 __truncdfbf2 (DFtype2); -extern BFtype2 __truncsfbf2 (SFtype2); -#endif - -#if defined(__FLOAT16__) && defined(__BFLOAT16__) -extern HFtype2 __truncbfhf2 (BFtype2); -extern BFtype2 __trunchfbf2 (HFtype2); -#endif - - diff --git a/libgcc/config/rs6000/t-float16 b/libgcc/config/rs6000/t-float16 deleted file mode 100644 index f77df910b3ff..000000000000 --- a/libgcc/config/rs6000/t-float16 +++ /dev/null @@ -1,61 +0,0 @@ -# _Float16 library support - -fp16_funcs = eqhf2 extendhfdf2 extendhfsf2 \ - fixhfsi fixhfdi fixhfti fixunshfsi fixunshfdi fixunshfti \ - floatsihf floatdihf floattihf floatunsihf floatundihf floatuntihf \ - truncdfhf2 truncsfhf2 - -fp16_src = $(addprefix $(srcdir)/soft-fp/,$(addsuffix .c,$(fp16_funcs))) -fp16_obj = $(addsuffix $(objext),$(fp16_funcs)) - -FP16_CFLAGS = -mfloat16 -Wno-psabi \ - -I$(srcdir)/soft-fp -I$(srcdir)/config/rs6000 - -$(fp16_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS) - -# __bfloat16 library support - -bfp16_funcs = extendbfsf2 floatdibf floatsibf floatundibf floatunsibf \ - truncdfbf2 truncsfbf2 - -bfp16_src = $(addprefix $(srcdir)/soft-fp/,$(addsuffix .c,$(bfp16_funcs))) -bfp16_obj = $(addsuffix $(objext),$(bfp16_funcs)) - -$(bfp16_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS) - -# Conversion between __bfloat16 and _Float16 - -both_fp16_funcs = truncbfhf2 trunchfbf2 -both_fp16_src = $(addprefix $(srcdir)/soft-fp/,$(addsuffix .c,$(both_fp16_funcs))) -both_fp16_obj = $(addsuffix $(objext),$(both_fp16_funcs)) - -$(both_fp16_obj) : INTERNAL_CFLAGS += $(FP16_CFLAGS) - -# For now, only put it in the static library -# LIB2ADD += $(fp16_src) $(bfp16_src) $(both_fp16_src) - -LIB2ADD_ST += $(fp16_src) $(bfp16_src) $(both_fp16_src) - -.PHONY: test-float16 clean-float16 - -test-float16: - @echo "fp16_src:"; \ - for x in $(fp16_src); do echo " $$x"; done; \ - echo; \ - echo "bfp16_src:"; \ - for x in $(bfp16_src); do echo " $$x"; done; \ - echo; \ - echo "both_fp16_src:"; \ - for x in $(both_fp16_src); do echo " $$x"; done; \ - echo; \ - echo "fp16_obj:"; \ - for x in $(fp16_obj); do echo " $$x"; done; \ - echo; \ - echo "bfp16_obj:"; \ - for x in $(bfp16_obj); do echo " $$x"; done; \ - echo; \ - echo "both_fp16_obj:"; \ - for x in $(bfp16_obj); do echo " $$x"; done; - -clean-float16: - @$(MULTICLEAN) multi-clean DO=clean-float16 diff --git a/libgcc/configure b/libgcc/configure index d53bcf5a1277..d5e80d227ff6 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -5188,8 +5188,6 @@ case ${host} in # check if we have VSX (ISA 2.06) support to build the software libraries, and # whether the assembler can handle xsaddqp for hardware support. Also check if # a new glibc is being used so that __builtin_cpu_supports can be used. -# -# Add float16 support also powerpc*-*-linux*) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" @@ -5284,27 +5282,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_powerpc_3_1_float128_hw" >&5 $as_echo "$libgcc_cv_powerpc_3_1_float128_hw" >&6; } CFLAGS="$saved_CFLAGS" - - CFLAGS="$CFLAGS -mfloat16 -Wno-psabi" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the PowerPC can build the _Float16 libraries" >&5 -$as_echo_n "checking whether the PowerPC can build the _Float16 libraries... " >&6; } -if ${libgcc_cv_powerpc_float16+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -_Float16 addf16 (_Float16 a, _Float16 b) { return a + b; } -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - libgcc_cv_powerpc_float16=yes -else - libgcc_cv_powerpc_float16=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_powerpc_float16" >&5 -$as_echo "$libgcc_cv_powerpc_float16" >&6; } - CFLAGS="$saved_CFLAGS" esac # Collect host-machine-specific information. diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 0e95dc97c867..65cd3c6aa1a5 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -407,8 +407,6 @@ case ${host} in # check if we have VSX (ISA 2.06) support to build the software libraries, and # whether the assembler can handle xsaddqp for hardware support. Also check if # a new glibc is being used so that __builtin_cpu_supports can be used. -# -# Add float16 support also powerpc*-*-linux*) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" @@ -467,15 +465,6 @@ powerpc*-*-linux*) [libgcc_cv_powerpc_3_1_float128_hw=yes], [libgcc_cv_powerpc_3_1_float128_hw=no])]) CFLAGS="$saved_CFLAGS" - - CFLAGS="$CFLAGS -mfloat16 -Wno-psabi" - AC_CACHE_CHECK([whether the PowerPC can build the _Float16 libraries], - [libgcc_cv_powerpc_float16], - [AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([_Float16 addf16 (_Float16 a, _Float16 b) { return a + b; }])], - [libgcc_cv_powerpc_float16=yes], - [libgcc_cv_powerpc_float16=no])]) - CFLAGS="$saved_CFLAGS" esac # Collect host-machine-specific information.
