[all-commits] [llvm/llvm-project] b34bfc: [SPARC] Add GNU syntax extensions of WRPR instruction

Koakuma via All-commits all-commits at lists.llvm.org
Tue Dec 13 15:03:11 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b34bfc603cbf44dc6718e592fa9fcc6bfabcce39
      https://github.com/llvm/llvm-project/commit/b34bfc603cbf44dc6718e592fa9fcc6bfabcce39
  Author: Koakuma <koachan at protonmail.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/lib/Target/Sparc/SparcInstrAliases.td
    M llvm/test/MC/Sparc/sparcv9-instructions.s

  Log Message:
  -----------
  [SPARC] Add GNU syntax extensions of WRPR instruction

Add two GNU extension forms of wrpr:

wrpr %reg, %rd -> wrpr %reg, %g0, %rd
wrpr  imm, %rd -> wrpr  %g0, imm, %rd

Note: since the semantics of wrpr %rs1, %rs2/imm, %rd is %rd <- (%rs1 xor %rs2/imm),
in case (1) it technically doesn't matter whether the %g0 is placed as the first or
second operand, however, I'm placing it as the second operand to match the encoding
of GNU as.

This fixes the wrpr instruction part of bug #40792

Reviewed By: arsenm

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




More information about the All-commits mailing list