[llvm] Fix for #99661 (PR #101986)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 07:05:57 PDT 2024


https://github.com/Toni-Graphics created https://github.com/llvm/llvm-project/pull/101986

None

>From 261c9fd3ee1f1899c66d0df64662c10b818725e6 Mon Sep 17 00:00:00 2001
From: Cr0a3 <127748753+Toni-Graphics at users.noreply.github.com>
Date: Wed, 31 Jul 2024 15:45:18 +0000
Subject: [PATCH 1/2] maybe fixing the bug

---
 llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
index 7c8459a546516..664278eca7c3a 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
@@ -424,7 +424,8 @@ void X86IntelInstPrinter::printMemReference(const MCInst *MI, unsigned Op,
     }
   }
 
-  O << ']';
+
+  O << M << ']';
 }
 
 void X86IntelInstPrinter::printSrcIdx(const MCInst *MI, unsigned Op,

>From 9faf3cdc600835b8551ef6972562423fd5f09d13 Mon Sep 17 00:00:00 2001
From: Cr0a3 <127748753+Toni-Graphics at users.noreply.github.com>
Date: Mon, 5 Aug 2024 16:05:31 +0200
Subject: [PATCH 2/2] Update X86IntelInstPrinter.cpp

---
 llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
index 664278eca7c3a..982a8b30a0c65 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
@@ -467,7 +467,7 @@ void X86IntelInstPrinter::printMemOffset(const MCInst *MI, unsigned Op,
     DispSpec.getExpr()->print(O, &MAI);
   }
 
-  O << ']';
+  O << M << ']';
 }
 
 void X86IntelInstPrinter::printU8Imm(const MCInst *MI, unsigned Op,



More information about the llvm-commits mailing list