[PATCH] D96632: [THUMB2] add .w suffixes for ldr/str w/ immediates

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 13:46:56 PST 2021


nickdesaulniers created this revision.
nickdesaulniers added reviewers: rengolin, ostannard, psmith, rovka, DavidSpickett.
Herald added a subscriber: hiraditya.
nickdesaulniers requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The Linux kernel when built with CONFIG_THUMB2_KERNEL makes use of these
instructions with immediate operands and wide encodings.

These look like the T4 variants of the follow sections from the Arm ARM.
F5.1.72 LDR (immediate)
F5.1.229 STR (immediate)
(Though the docs don't mention the .w suffixes, I assume that's an
oversight?)

I wasn't able to represent these simple aliases using t2InstAlias due to
the Rt = Rt_wb Constraints on the non-suffixed existing instructions,
which results in some manual parsing logic needing to be added.

Link: https://bugs.llvm.org/show_bug.cgi?id=49118
Link: https://github.com/ClangBuiltLinux/linux/issues/1296
Reported-by: Arnd Bergmann <arnd at kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers at google.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96632

Files:
  llvm/lib/Target/ARM/ARMInstrThumb2.td
  llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  llvm/test/MC/ARM/thumb2-ldr.w-str.w.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96632.323469.patch
Type: text/x-patch
Size: 25043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210212/5c0bae5d/attachment.bin>


More information about the llvm-commits mailing list