]> granicus.if.org Git - llvm/commit
[AVR] Rewrite the CBRRdK instruction as an alias of ANDIRdK
authorDylan McKay <me@dylanmckay.io>
Fri, 18 Jan 2019 07:31:34 +0000 (07:31 +0000)
committerDylan McKay <me@dylanmckay.io>
Fri, 18 Jan 2019 07:31:34 +0000 (07:31 +0000)
commitc3d9898b085b88aad94e54fe43db544c47c2f161
tree47af47b7401fc5641bbffd394c949a96e1127c28
parent1f379ad9ee9b09e38137bbf836675c68d1ae7a2b
[AVR] Rewrite the CBRRdK instruction as an alias of ANDIRdK

The CBR instruction is just an ANDI instruction with the immediate
complemented.

Because of this, prior to this change TableGen would warn due to a
decoding conflict.

This commit fixes the existing compilation warning:

  ===============
  [423/492] Building AVRGenDisassemblerTables.inc...
  Decoding Conflict:
                  0111............
                  01..............
                  ................
          ANDIRdK 0111____________
          CBRRdK 0111____________
  ================

After this commit, there are no more decoding conflicts in the AVR
backend's instruction definitions.

Thanks to Eli F for pointing me torward `t2_so_imm_not` as an example of
how to perform a complement in an instruction alias.

Fixes BugZilla PR38802.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351526 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AVR/AVRInstrInfo.td
lib/Target/AVR/AsmParser/AVRAsmParser.cpp