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

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 16:08:55 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)

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

There are some TODOs in the test where the non-suffixed versions already
supported seem to differ in behavior from GAS.

Link: https://bugs.llvm.org/show_bug.cgi?id=49118
Link: https://github.com/ClangBuiltLinux/linux/issues/1296
Reported-by: Stefan Agner <stefan at agner.ch>
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/D97096

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: D97096.325108.patch
Type: text/x-patch
Size: 12517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210220/4c4fefc5/attachment.bin>


More information about the llvm-commits mailing list