OSDN Git Service

[ARM] Disallow PC, and optionally SP, in VMOVRH and VMOVHR.
authorSimon Tatham <simon.tatham@arm.com>
Mon, 10 Jun 2019 14:43:55 +0000 (14:43 +0000)
committerSimon Tatham <simon.tatham@arm.com>
Mon, 10 Jun 2019 14:43:55 +0000 (14:43 +0000)
commit7fc61c0367b94624214a42d93b8fcf40927f042e
tree27dbb7a6ebff639faa057f1588a048b50cdb6fe8
parent2314c6c63ee10b2a45b3c1a445045803a5b3b2a5
[ARM] Disallow PC, and optionally SP, in VMOVRH and VMOVHR.

Arm v8.1-M supports the VMOV instructions that move a half-precision
value to and from a GPR, but not if the GPR is SP or PC.

To fix this, I've changed those instructions to use the rGPR register
class instead of GPR. rGPR always excludes PC, and it excludes SP
except in the presence of the HasV8Ops target feature (i.e. Arm v8-A).
So the effect is that VMOV.F16 to and from PC is now illegal
everywhere, but VMOV.F16 to and from SP is illegal only on non-v8-A
cores (which I believe is all as it should be).

Reviewers: dmgreen, samparker, SjoerdMeijer, ostannard

Reviewed By: ostannard

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362942 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstrVFP.td
test/MC/ARM/vmovhr.s [new file with mode: 0644]