This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [07/77] Add scalar_float_mode
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Fri, 11 Aug 2017 12:09:23 -0600
- Subject: Re: [07/77] Add scalar_float_mode
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A323F9A25E
- References: <8760ewohsv.fsf@linaro.org> <87bmoon30n.fsf@linaro.org>
On 07/13/2017 02:40 AM, Richard Sandiford wrote:
> This patch adds a scalar_float_mode class, which wraps a mode enum
> that is known to satisfy SCALAR_FLOAT_MODE_P. Things like "SFmode"
> now give a scalar_float_mode object instead of a machine_mode.
> This in turn needs a change to the real.h format_helper, so that
> it can accept both machine_modes and scalar_float_modes.
>
> 2017-07-13 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayward <alan.hayward@arm.com>
> David Sherwood <david.sherwood@arm.com>
>
> gcc/
> * coretypes.h (scalar_float_mode): New type.
> * machmode.h (mode_traits::from_int): Use machine_mode if
> USE_ENUM_MODES is defined.
> (is_a): New function.
> (as_a): Likewise.
> (dyn_cast): Likewise.
> (scalar_float_mode): New class.
> (scalar_float_mode::includes_p): New function.
> (is_float_mode): Likewise.
> * gdbhooks.py (MachineModePrinter): New class.
> (build_pretty_printer): Use it for scalar_float_mode.
> * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
> (format_helper::format_helper): Turn into a template.
> * genmodes.c (get_mode_class): New function.
> (emit_insn_modes_h): Give modes the class returned by get_mode_class,
> or machine_mode if none.
> * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
> as_a <scalar_float_mode>.
> * dwarf2out.c (mem_loc_descriptor): Likewise.
> (insert_float): Likewise.
> (add_const_value_attribute): Likewise.
> * simplify-rtx.c (simplify_immed_subreg): Likewise.
> * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
> (expand_unop): Update accordingly.
> (expand_abs_nojump): Likewise.
> (expand_copysign_absneg): Take a scalar_float_mode.
> (expand_copysign_bit): Likewise.
> (expand_copysign): Update accordingly.
>
> gcc/ada/
> * gcc-interface/utils.c (gnat_type_for_mode): Use is_a
> <scalar_float_mode> instead of SCALAR_FLOAT_MODE_P.
>
> gcc/go/
> * go-lang.c (go_langhook_type_for_mode): Use is_float_mode.
>
OK.
jeff