This is an archive of the discontinued LLVM Phabricator instance.

[THUMB2] add .w suffixes for ldr/str w/ immediates
AbandonedPublic

Authored by nickdesaulniers on Feb 19 2021, 4:08 PM.

Details

Summary

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@agner.ch>
Reported-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Diff Detail

Event Timeline

nickdesaulniers requested review of this revision.Feb 19 2021, 4:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2021, 4:08 PM