[NDS32] Add DSP extension instructions.
authorMonk Chiang <sh.chiang04@gmail.com>
Sun, 13 May 2018 05:41:37 +0000 (05:41 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Sun, 13 May 2018 05:41:37 +0000 (05:41 +0000)
commit7c32ef413a661d53de9a90d29b5253bf98e6af82
tree118e0d1bd13dc5dd978e2397987235b3e96477d5
parentab22e6ce3fbb53d663961e6f40ac12ebde7a421f
[NDS32] Add DSP extension instructions.

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.

Co-Authored-By: Chung-Ju Wu <jasonwucj@gmail.com>
Co-Authored-By: Kito Cheng <kito.cheng@gmail.com>
From-SVN: r260206
19 files changed:
gcc/ChangeLog
gcc/config.gcc
gcc/config/nds32/constants.md
gcc/config/nds32/constraints.md
gcc/config/nds32/iterators.md
gcc/config/nds32/nds32-dspext.md [new file with mode: 0644]
gcc/config/nds32/nds32-intrinsic.c
gcc/config/nds32/nds32-intrinsic.md
gcc/config/nds32/nds32-md-auxiliary.c
gcc/config/nds32/nds32-memory-manipulation.c
gcc/config/nds32/nds32-predicates.c
gcc/config/nds32/nds32-protos.h
gcc/config/nds32/nds32-utils.c
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.h
gcc/config/nds32/nds32.md
gcc/config/nds32/nds32.opt
gcc/config/nds32/nds32_intrinsic.h
gcc/config/nds32/predicates.md