[PATCH] D19857: [mips][microMIPS] Add CodeGen support for microMIPSr6 ROTR and ROTRV and add tests for LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instructions

Zlatko Buljan via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 00:09:03 PDT 2016


zbuljan created this revision.
zbuljan added reviewers: dsanders, sdardis, hvarga, zoran.jovanovic.
zbuljan added subscribers: petarj, llvm-commits.
Herald added a reviewer: vkalintiris.
Herald added subscribers: sdardis, dsanders.

The patch adds CodeGen support for microMIPSr6 ROTR and ROTRV instructions and also adds the standard tests for existing microMIPS LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instruction definitions:
  - separated microMIPS LL, SC, ROTR and ROTRV instructions from equivalent MIPS instructions using `NotInMicroMips` predicate
  - added alias definitions for ROTR and SYSCALL instructions
  - added DAG patterns to description classes for proper selection of ROTR and ROTRV instructions
  - updated `isMovePRegPair()` method (MipsAsmParser.cpp) for MOVEP instruction
  - updated CodeGen tests for microMIPSr6 (//rotate.ll//)
  - added tests for the standard encodings
  - added invalid tests

There was a problem with commit rL266977 of the previous patch D19150.
Test-suite failed with error message:

```
fatal error: error in backend: Cannot select: t17: i32 = rotr t2, t11
...
```

The problem was with selecting microMIPS ROTR and ROTRV instructions in LLVM backend.
For that reason I decided to revert commit rL266977 and make this patch which besides standard regression tests also includes CodeGen support for ROTR and ROTRV instructions.

http://reviews.llvm.org/D19857

Files:
  lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  lib/Target/Mips/MicroMipsInstrInfo.td
  lib/Target/Mips/Mips32r6InstrInfo.td
  lib/Target/Mips/MipsInstrInfo.td
  test/CodeGen/Mips/rotate.ll
  test/MC/Disassembler/Mips/micromips32r3/valid-el.txt
  test/MC/Disassembler/Mips/micromips32r3/valid.txt
  test/MC/Disassembler/Mips/micromips32r6/valid.txt
  test/MC/Disassembler/Mips/micromips64r6/valid.txt
  test/MC/Mips/micromips/invalid-wrong-error.s
  test/MC/Mips/micromips/invalid.s
  test/MC/Mips/micromips32r6/invalid-wrong-error.s
  test/MC/Mips/micromips32r6/invalid.s
  test/MC/Mips/micromips32r6/valid.s
  test/MC/Mips/micromips64r6/invalid-wrong-error.s
  test/MC/Mips/micromips64r6/invalid.s
  test/MC/Mips/micromips64r6/valid.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19857.55951.patch
Type: text/x-patch
Size: 24218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160503/e41aec29/attachment.bin>


More information about the llvm-commits mailing list