ARM: Teach assembler to enforce constraints for ARM LDRD destination register operands.
authorTilmann Scheller <tilmann.scheller@googlemail.com>
Fri, 27 Sep 2013 13:28:17 +0000 (13:28 +0000)
committerTilmann Scheller <tilmann.scheller@googlemail.com>
Fri, 27 Sep 2013 13:28:17 +0000 (13:28 +0000)
commitcca114611945332852094fcadfaa4ffbd012bfb3
tree96aeb92bfbe577c6bd513fcfa69877be972c913a
parent9f30d43122dce961ae1625c2c429bf74bf292324
ARM: Teach assembler to enforce constraints for ARM LDRD destination register operands.

As specified in A8.8.72/A8.8.73/A8.8.74 in the ARM ARM, all variants of the ARM LDRD instruction have the following two constraints:

LDRD<c> <Rt>, <Rt2>, ...

(a) Rt must be even-numbered and not r14
(b) Rt2 must be R(t+1)

If those two constraints are not met the result of executing the instruction will be unpredictable.

Constraint (b) was already enforced, this commit adds support for constraint (a).

Fixes rdar://14479793.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191520 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/arm-ldrd.s [new file with mode: 0644]
test/MC/ARM/arm-memory-instructions.s