[llvm] [LoongArch] Add basic UEFI support (PR #154883)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 11 00:21:40 PDT 2025


================
@@ -221,3 +222,22 @@ void LoongArchMCAsmInfo::printSpecifierExpr(raw_ostream &OS,
   if (HasSpecifier)
     OS << ')';
 }
+
+void LoongArchMCAsmInfoMicrosoftCOFF::anchor() {}
+
+LoongArchMCAsmInfoMicrosoftCOFF::LoongArchMCAsmInfoMicrosoftCOFF(
+    const Triple &TT) {
+  PrivateGlobalPrefix = ".L";
+  PrivateLabelPrefix = ".L";
+
+  Data16bitsDirective = "\t.hword\t";
+  Data32bitsDirective = "\t.word\t";
+
+  AlignmentIsInBytes = false;
+  SupportsDebugInformation = true;
+  CodePointerSize = 8;
+
+  CommentString = "//";
----------------
leecheechen wrote:

A review of the EDK2 code reveals the use of "#" for comments in several places, for example: https://github.com/tianocore/edk2/blob/master/MdePkg/Library/BaseLib/LoongArch64/SetJumpLongJump.S#L31
Therefore, we should add support for the "#" comment symbol.  This change will be submitted shortly.

https://github.com/llvm/llvm-project/pull/154883


More information about the llvm-commits mailing list