[LLVM - ARM/AArch64] Add ACLE special register intrinsics
authorOliver Stannard <oliver.stannard@arm.com>
Mon, 18 May 2015 16:23:33 +0000 (16:23 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Mon, 18 May 2015 16:23:33 +0000 (16:23 +0000)
commitd811b4bacb44065e4a5b7b477e35ec7e5a02acbd
tree4e09a87f2400f9a0b84a860d61904224b9032697
parentb6f6eee8fd3f0ef8df8d25b85126394588adb1d5
[LLVM - ARM/AArch64] Add ACLE special register intrinsics

This patch implements LLVM support for the ACLE special register intrinsics in
section 10.1, __arm_{w,r}sr{,p,64}.

This patch is intended to lower the read/write_register instrinsics, used to
implement the special register intrinsics in the clang patch for special
register intrinsics (see http://reviews.llvm.org/D9697), to ARM specific
instructions MRC,MCR,MSR etc. to allow reading an writing of coprocessor
registers in AArch32 and AArch64. This is done by inspecting the register
string passed to the intrinsic and then lowering to the appropriate
instruction.

Patch by Luke Cheeseman.

Differential Revision: http://reviews.llvm.org/D9699

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237579 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/AArch64/arm64-named-reg-alloc.ll
test/CodeGen/AArch64/arm64-named-reg-notareg.ll
test/CodeGen/AArch64/special-reg.ll [new file with mode: 0644]
test/CodeGen/ARM/named-reg-alloc.ll
test/CodeGen/ARM/named-reg-notareg.ll
test/CodeGen/ARM/special-reg-acore.ll [new file with mode: 0644]
test/CodeGen/ARM/special-reg-mcore.ll [new file with mode: 0644]
test/CodeGen/ARM/special-reg.ll [new file with mode: 0644]