[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)
commitd770da9834227c0751aa4e05ab18bd16112f2f99
treeb0893abee9ec39ce16637fd4ae821862f2312250
parent66609a825588f1df1e226709c1d171f79dcea179
[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.

llvm-svn: 351526
llvm/lib/Target/AVR/AVRInstrInfo.td
llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp