[NDS32] Add DSP extension instructions

Programming / Compilers / GCC - jasonwucj [138bc75d-0d04-0410-961f-82ee72b054a4] - 13 May 2018 05:41 EDT

gcc/
- config.gcc (nds32be-*-*): Handle --with-ext-dsp.
- config/nds32/constants.md (unspec_element, unspec_volatile_element): Add enum values for DSP extension instructions.
- config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi): New constraints.
- config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus, sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max): New code iterators. (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
- config/nds32/nds32-dspext.md: New file for DSP implementation.
- config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
- config/nds32/nds32-intrinsic.md: Likewise.
- config/nds32/nds32_intrinsic.h: Likewise.
- config/nds32/nds32-md-auxiliary.c: Likewise.
- config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
- config/nds32/nds32-predicates.c (const_vector_to_hwint): New. (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New. (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
- config/nds32/nds32-protos.h: New declarations for DSP extension.
- config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case TYPE_DMAC in switch statement.
- config/nds32/nds32.c: New checking and implementation for DSP extension instructions.
- config/nds32/nds32.h: Likewise.
- config/nds32/nds32.md: Likewise.
- config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
- config/nds32/predicates.md: Implement new predicates for DSP extension.

b7968556664 [NDS32] Add DSP extension instructions.
gcc/ChangeLog | 33 +
gcc/config.gcc | 5 +
gcc/config/nds32/constants.md | 25 +
gcc/config/nds32/constraints.md | 28 +-
gcc/config/nds32/iterators.md | 40 +
gcc/config/nds32/nds32-dspext.md | 5264 ++++++++++++++++++++++++++
gcc/config/nds32/nds32-intrinsic.c | 744 +++-
gcc/config/nds32/nds32-intrinsic.md | 192 +
gcc/config/nds32/nds32-md-auxiliary.c | 499 ++-
gcc/config/nds32/nds32-memory-manipulation.c | 61 +-
gcc/config/nds32/nds32-predicates.c | 77 +
gcc/config/nds32/nds32-protos.h | 29 +
gcc/config/nds32/nds32-utils.c | 1 +
gcc/config/nds32/nds32.c | 65 +
gcc/config/nds32/nds32.h | 330 +-
gcc/config/nds32/nds32.md | 53 +-
gcc/config/nds32/nds32.opt | 12 +
gcc/config/nds32/nds32_intrinsic.h | 668 ++++
gcc/config/nds32/predicates.md | 60 +
19 files changed, 8151 insertions(+), 35 deletions(-)

Upstream: gcc.gnu.org


  • Share