[all-commits] [llvm/llvm-project] 0e1acc: [AArch64] Support expression results as immediate ...

Jian Cai via All-commits all-commits at lists.llvm.org
Mon Jun 8 17:57:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e1accd0f726eef2c47be9f37dd0a06cb50d207e
      https://github.com/llvm/llvm-project/commit/0e1accd0f726eef2c47be9f37dd0a06cb50d207e
  Author: Jian Cai <jiancai at google.com>
  Date:   2020-06-08 (Mon, 08 Jun 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
    M llvm/test/MC/AArch64/basic-a64-diagnostics.s
    A llvm/test/MC/AArch64/mov-expr-as-immediate.s
    A llvm/test/MC/AArch64/mov-expression-as-immediate.s
    A llvm/test/MC/AArch64/mov-unsupported-expr-as-immediate.s

  Log Message:
  -----------
  [AArch64] Support expression results as immediate values in mov

Summary:
This patch adds support of using the result of an expression as an
immediate value. For example,

0:
.skip 4
 1:
mov x0, 1b - 0b

is assembled to

mov x0, #4

Currently it does not support expressions requiring relocation unless
explicitly specified. This fixes PR#45781.

Reviewers: peter.smith, ostannard, efriedma

Reviewed By: efriedma

Subscribers: nickdesaulniers, llozano, manojgupta, efriedma, ostannard, kristof.beyls, hiraditya, danielkiss, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list