[NDS32] Refine bit-wise operation and shift patterns

Programming / Compilers / GCC - jasonwucj [138bc75d-0d04-0410-961f-82ee72b054a4] - 5 April 2018 02:51 EDT

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. (si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
- config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand, nds32_ior_operand, nds32_xor_operand): New predicates.

7d05f097852 [NDS32] Refine bit-wise operation and shift patterns.
gcc/ChangeLog | 17 +++
gcc/config/nds32/iterators.md | 6 +
gcc/config/nds32/nds32-md-auxiliary.c | 46 +++++++
gcc/config/nds32/nds32-protos.h | 5 +
gcc/config/nds32/nds32.c | 22 ++++
gcc/config/nds32/nds32.md | 219 +++++++++++++++++-----------------
gcc/config/nds32/predicates.md | 38 ++++++
7 files changed, 242 insertions(+), 111 deletions(-)

Upstream: gcc.gnu.org


  • Share