[all-commits] [llvm/llvm-project] 1e204a: [THUMB2] add .w suffixes for ldr/str (immediate) T4

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Tue Feb 23 09:26:21 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e204ac78952cf7e4fcf335423e80007388d3979
      https://github.com/llvm/llvm-project/commit/1e204ac78952cf7e4fcf335423e80007388d3979
  Author: Nick Desaulniers <ndesaulniers at google.com>
  Date:   2021-02-23 (Tue, 23 Feb 2021)

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

  Log Message:
  -----------
  [THUMB2] add .w suffixes for ldr/str (immediate) T4

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

These are 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.

F1.2 Standard assembler syntax fields
describes the use of the .w (wide) vs .n (narrow) encoding suffix.

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>

Reviewed By: DavidSpickett

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




More information about the All-commits mailing list