OSDN Git Service

[ARM] Make coprocessor number restrictions consistent.
authorSimon Tatham <simon.tatham@arm.com>
Thu, 27 Jun 2019 12:40:55 +0000 (12:40 +0000)
committerSimon Tatham <simon.tatham@arm.com>
Thu, 27 Jun 2019 12:40:55 +0000 (12:40 +0000)
commitc27a34eed4e279c21ef324196a6c7960f4ec387b
tree71011ee591bbfa16cb34172598a34b43be9223a6
parentdbfb2af6216ba1bddf5a3160c0f6cf1cedb5effb
[ARM] Make coprocessor number restrictions consistent.

Different versions of the Arm architecture disallow the use of generic
coprocessor instructions like MCR and CDP on different sets of
coprocessors. This commit centralises the check of the coprocessor
number so that it's consistent between assembly and disassembly, and
also updates it for the new restrictions in Arm v8.1-M.

New tests added that check all the coprocessor numbers; old tests
updated, where they used a number that's now become illegal in the
context in question.

Reviewers: DavidSpickett, ostannard

Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63863

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364532 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.h
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/ARM/coprocessors.s [new file with mode: 0644]
test/MC/ARM/diagnostics.s
test/MC/ARM/thumb2-diagnostics.s
test/MC/ARM/v8_IT_manual.s
test/MC/Disassembler/ARM/coprocessors-arm.txt [new file with mode: 0644]
test/MC/Disassembler/ARM/coprocessors-thumb.txt [new file with mode: 0644]