[NDS32] Refine bit-wise operation and shift patterns.
authorKito Cheng <kito.cheng@gmail.com>
Thu, 5 Apr 2018 02:51:45 +0000 (02:51 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Thu, 5 Apr 2018 02:51:45 +0000 (02:51 +0000)
commita3b13564bf757ea3351d630805cd5716147f033b
tree0bef54daf5c4fb2485e0d330051132490bcbc1a8
parent5c36be57336c5d4c3b989e9be5bbe060a0deba12
[NDS32] Refine bit-wise operation and shift patterns.

gcc/
* config/nds32/iterators.md (shift_rotate): New code iterator.
(shift): New code attribute.
* config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
* config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
* config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
* config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
bit-wise operations.
(andsi3, *andsi3): Ditto.
(iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
(xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
(<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
* config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
nds32_ior_operand, nds32_xor_operand): New predicates.

Co-Authored-By: Chung-Ju Wu <jasonwucj@gmail.com>
From-SVN: r259117
gcc/ChangeLog
gcc/config/nds32/iterators.md
gcc/config/nds32/nds32-md-auxiliary.c
gcc/config/nds32/nds32-protos.h
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.md
gcc/config/nds32/predicates.md