Turn TRULY_NOOP_TRUNCATION into a hook

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 15 September 2017 09:47 EDT

I'm not sure the documentation is correct that outprec is always less than inprec, and each non-default implementation tested for the case in which it wasn't, but the patch leaves it as-is.

The SH port had a couple of TRULY_NOOP_TRUNCATION tests that were left over from the old shmedia port.

2017-09-13 Richard Sandiford Alan Hayard David Sherwood

gcc/
- target.def (truly_noop_truncation): New hook. (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather than TRULY_NOOP_TRUNCATION.
- hooks.h (hook_bool_uint_uint_true): Declare.
- hooks.c (hook_bool_uint_uint_true): New function.
- doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with... (TARGET_TRULY_NOOP_TRUNCATION): ...this.
- doc/tm.texi: Regenerate.
- combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION rather than TRULY_NOOP_TRUNCATION in comments. (simplify_comparison): Likewise. (record_truncated_value): Likewise.
- expmed.c (extract_bit_field_1): Likewise. (extract_split_bit_field): Likewise.
- convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation instead of TRULY_NOOP_TRUNCATION.
- function.c (assign_parm_setup_block): Likewise.
- machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
- rtlhooks.c: Include target.h.
- config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
- config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
- config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
- config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
- config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
- config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
- config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
- config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
- config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
- config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
- config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
- config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
- config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
- config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
- config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
- config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
- config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
- config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
- config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
- config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
- config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
- config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
- config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
- config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
- config/mips/mips.c (mips_truly_noop_truncation): New function. (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
- config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION rather than TRULY_NOOP_TRUNCATION in comments.
- config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
- config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
- config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
- config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
- config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
- config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
- config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
- config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
- config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
- config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
- config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
- config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION rather than TRULY_NOOP_TRUNCATION in comments.
- config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
- config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
- config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
- config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
- config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove TRULY_NOOP_TRUNCATION condition. (MAYBE_INDEX_REGISTER_RTX_P): Likewise. (TRULY_NOOP_TRUNCATION): Delete.
- config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
- config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
- config/spu/spu.c (spu_truly_noop_truncation): New function. (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
- config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
- config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
- config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction. (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
- config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION rather than TRULY_NOOP_TRUNCATION in comments.
- config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
- config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
- config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
- config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
- config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
- system.h (TRULY_NOOP_TRUNCATION): Poison.

050dd61 Turn TRULY_NOOP_TRUNCATION into a hook
gcc/ChangeLog | 89 ++++++++++++++++++++++++++++++++++++++
gcc/combine.c | 8 ++--
gcc/config/aarch64/aarch64.h | 2 -
gcc/config/alpha/alpha.h | 4 --
gcc/config/arc/arc.h | 4 --
gcc/config/arm/arm.h | 3 --
gcc/config/avr/avr.h | 2 -
gcc/config/bfin/bfin.h | 4 --
gcc/config/c6x/c6x.h | 1 -
gcc/config/cr16/cr16.h | 2 -
gcc/config/cris/cris.h | 2 -
gcc/config/epiphany/epiphany.h | 4 --
gcc/config/fr30/fr30.h | 12 -----
gcc/config/frv/frv.h | 12 -----
gcc/config/ft32/ft32.h | 1 -
gcc/config/h8300/h8300.h | 4 --
gcc/config/i386/i386.h | 4 --
gcc/config/ia64/ia64.h | 6 ---
gcc/config/iq2000/iq2000.h | 2 -
gcc/config/lm32/lm32.h | 2 -
gcc/config/m32c/m32c.h | 1 -
gcc/config/m32r/m32r.h | 4 --
gcc/config/m68k/m68k.h | 2 -
gcc/config/mcore/mcore.h | 3 --
gcc/config/microblaze/microblaze.h | 5 ---
gcc/config/mips/mips.c | 11 +++++
gcc/config/mips/mips.h | 5 ---
gcc/config/mips/mips.md | 10 ++---
gcc/config/mmix/mmix.h | 2 -
gcc/config/mn10300/mn10300.h | 4 --
gcc/config/moxie/moxie.h | 3 --
gcc/config/msp430/msp430.h | 2 -
gcc/config/nds32/nds32.h | 5 ---
gcc/config/nios2/nios2.h | 2 -
gcc/config/nvptx/nvptx.h | 1 -
gcc/config/pa/pa.h | 4 --
gcc/config/pdp11/pdp11.h | 4 --
gcc/config/powerpcspe/powerpcspe.h | 4 --
gcc/config/riscv/riscv.h | 2 -
gcc/config/riscv/riscv.md | 3 +-
gcc/config/rl78/rl78.h | 2 -
gcc/config/rs6000/rs6000.h | 4 --
gcc/config/rx/rx.h | 2 -
gcc/config/s390/s390.h | 4 --
gcc/config/sh/sh.h | 7 ---
gcc/config/sparc/sparc.h | 4 --
gcc/config/spu/spu.c | 11 +++++
gcc/config/spu/spu.h | 2 -
gcc/config/stormy16/stormy16.h | 2 -
gcc/config/tilegx/tilegx.c | 10 +++++
gcc/config/tilegx/tilegx.h | 5 ---
gcc/config/tilegx/tilegx.md | 6 +--
gcc/config/tilepro/tilepro.h | 2 -
gcc/config/v850/v850.h | 4 --
gcc/config/vax/vax.h | 4 --
gcc/config/visium/visium.h | 15 -------
gcc/config/xtensa/xtensa.h | 4 --
gcc/convert.c | 2 +-
gcc/doc/tm.texi | 26 +++++------
gcc/doc/tm.texi.in | 16 +------
gcc/expmed.c | 4 +-
gcc/function.c | 3 +-
gcc/hooks.c | 7 +++
gcc/hooks.h | 1 +
gcc/machmode.h | 4 +-
gcc/rtlhooks.c | 1 +
gcc/system.h | 3 +-
gcc/target.def | 16 ++++++-
68 files changed, 180 insertions(+), 236 deletions(-)

Upstream: gcc.gnu.org


  • Share