[all-commits] [llvm/llvm-project] 901e48: [SystemZ] Handle index-only addresses in (dis)asse...

Ulrich Weigand via All-commits all-commits at lists.llvm.org
Mon Dec 4 08:06:40 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 901e484fdaba2be4eacbaee4fc9e05df8d5b783b
      https://github.com/llvm/llvm-project/commit/901e484fdaba2be4eacbaee4fc9e05df8d5b783b
  Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
  Date:   2023-12-04 (Mon, 04 Dec 2023)

  Changed paths:
    M llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
    M llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp
    M llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
    M llvm/test/MC/Disassembler/SystemZ/insns-z13.txt
    M llvm/test/MC/SystemZ/fixups.s
    M llvm/test/MC/SystemZ/insn-good-z13.s
    M llvm/test/MC/SystemZ/insn-good.s

  Log Message:
  -----------
  [SystemZ] Handle index-only addresses in (dis)assembler

Most addresses in SystemZ instructions take two registers,
an index register and a base register.  However, either of
those can be omitted.  If there is just a single register,
this usually is taken as the base register - however, there
are certain rare cases where you specifically want to use
an index register but no base register.  This is currently
not handled consistently by the assembler / disassembler.

Fix this by
 - always emitting a dummy 0 as base register for index-
   only addresses
 - correctly handle dummy 0 as indicating no base register
   when parsing an address

This is compatible with current GNU binutils behavior.




More information about the All-commits mailing list