[all-commits] [llvm/llvm-project] 158118: Revert "[llvm-ml] Fix RIP-relative addressing for ...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Tue Sep 10 00:58:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1581183d59b87760521e7223df3ff25c57e72fb3
      https://github.com/llvm/llvm-project/commit/1581183d59b87760521e7223df3ff25c57e72fb3
  Author: Martin Storsjö <martin at martin.st>
  Date:   2024-09-10 (Tue, 10 Sep 2024)

  Changed paths:
    M llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
    M llvm/test/tools/llvm-ml/rip_relative_addressing.asm

  Log Message:
  -----------
  Revert "[llvm-ml] Fix RIP-relative addressing for ptr operands (#107618)"

This reverts commit 7543d09b852695187d08aa5d56d50016fea8f706.

This change caused failed asserts when building the openmp assembly
sources, reproducible with:

    $ llvm-ml -m64 -D_M_AMD64 -c -Fo out.obj openmp/runtime/src/z_Windows_NT-586_asm.asm
    llvm-ml: ../lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:624: void {anonymous}::X86MCCodeEmitter::emitMemModRMByte(const llvm::MCInst&, unsigned int, unsigned int, uint64_t, {anonymous}::PrefixKind, uint64_t, llvm::SmallVectorImpl<char>&, llvm::SmallVectorImpl<llvm::MCFixup>&, const llvm::MCSubtargetInfo&, bool) const: Assertion `IndexReg.getReg() == 0 && !ForceSIB && "Invalid rip-relative address"' failed.

The assert can also be triggered with one lone instruction:

    lea rdx, QWORD PTR [rax*8+16]



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list