[all-commits] [llvm/llvm-project] c35105: [ARM] support symbolic expressions as branch targe...

Jian Cai via All-commits all-commits at lists.llvm.org
Mon Mar 1 17:41:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c35105055ee4565ee6726d5b155538dd5c0307d3
      https://github.com/llvm/llvm-project/commit/c35105055ee4565ee6726d5b155538dd5c0307d3
  Author: Jian Cai <jiancai at google.com>
  Date:   2021-03-01 (Mon, 01 Mar 2021)

  Changed paths:
    M llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
    A llvm/test/MC/ARM/thumb2-b.w-target.s
    M llvm/test/MC/ARM/thumb2-branch-ranges.s

  Log Message:
  -----------
  [ARM] support symbolic expressions as branch target in b.w

Currently ARM backend validates the range of branch targets before the
layout of fragments is finalized. This causes build failure if symbolic
expressions are used, with the exception of a single symbolic value.
For example, "b.w ." works but "b.w . + 2" currently fails to
assemble. This fixes the issue by delaying this check (in
ARMAsmParser::validateInstruction) of b.w instructions until the symbol
expressions are resolved (in ARMAsmBackend::adjustFixupValue).

Link:
https://github.com/ClangBuiltLinux/linux/issues/1286

Reviewed By: MaskRay

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




More information about the All-commits mailing list