[PATCH] D95586: [ARM] permit PC as destination of MOVS
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 8 15:36:54 PST 2021
nickdesaulniers added a comment.
In D95586#2549706 <https://reviews.llvm.org/D95586#2549706>, @nickdesaulniers wrote:
> ACK
>
> It looks like the kernel also uses
>
> movs pc, lr
>
> for thumb2 kernel images. Maybe I should repurpose this review for supporting `pc` operand in thumb? `llvm/test/MC/ARM/thumb-mov.s`/`llvm/test/MC/ARM/lsl-zero-errors.s`, or create a new review?
err, is there a way to express that an inst alias should pass a literal `0`?
diff --git a/llvm/lib/Target/ARM/ARMInstrThumb2.td b/llvm/lib/Target/ARM/ARMInstrThumb2.td
index 5642cab32e7c..82f9096957eb 100644
--- a/llvm/lib/Target/ARM/ARMInstrThumb2.td
+++ b/llvm/lib/Target/ARM/ARMInstrThumb2.td
@@ -4144,6 +4144,7 @@ def t2SUBS_PC_LR : T2I <(outs), (ins imm0_255:$imm), NoItinerary,
bits<8> imm;
let Inst{7-0} = imm;
}
+def : t2InstAlias<"movs pc, lr", (t2SUBS_PC_LR imm0_255:"0")>;
// Hypervisor Call is a system instruction.
let isCall = 1 in {
llvm-project/llvm/lib/Target/ARM/ARMInstrThumb2.td:4147:57: error: expected variable name in dag literal
def : t2InstAlias<"movs pc, lr", (t2SUBS_PC_LR imm0_255:"0")>;
^
???
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95586/new/
https://reviews.llvm.org/D95586
More information about the llvm-commits
mailing list