diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs
index 70e258d8d297dc..78dfc95c757bea 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs
@@ -1732,16 +1732,8 @@ private void ForceSigWalk()
int floatRegOfsInBytes = argOffset - _transitionBlock.OffsetOfFloatArgumentRegisters;
Debug.Assert((floatRegOfsInBytes % _transitionBlock.FloatRegisterSize) == 0);
pLoc.m_idxFloatReg = floatRegOfsInBytes / _transitionBlock.FloatRegisterSize;
+ pLoc.m_cFloatReg = 1;
- if (!_argTypeHandle.IsNull() && _argTypeHandle.IsHomogeneousAggregate())
- {
- int haElementSize = _argTypeHandle.GetHomogeneousAggregateElementSize();
- pLoc.m_cFloatReg = GetArgSize() / haElementSize;
- }
- else
- {
- pLoc.m_cFloatReg = 1;
- }
return pLoc;
}
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_LoongArch64/ImportThunk.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_LoongArch64/ImportThunk.cs
index 5e0a8751d472b3..8d11f284f39bc3 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_LoongArch64/ImportThunk.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/Target_LoongArch64/ImportThunk.cs
@@ -28,7 +28,7 @@ protected override void EmitCode(NodeFactory factory, ref LoongArch64Emitter ins
if (!relocsOnly)
{
- // movz T0=R12, #index
+ // ori T0=R12, R0, #index
int index = _containingImportSection.IndexFromBeginningOfArray;
instructionEncoder.EmitMOV(Register.R12, checked((ushort)index));
}
diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs
index 2228cb248e760a..09372f143813ce 100644
--- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs
+++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs
@@ -651,8 +651,8 @@ private class LoongArch64TransitionBlock : TransitionBlock
public override int NumCalleeSavedRegisters => 12;
// Callee-saves, argument registers
public override int SizeOfTransitionBlock => SizeOfCalleeSavedRegisters + SizeOfArgumentRegisters;
- public override int OffsetOfArgumentRegisters => SizeOfCalleeSavedRegisters;
- public override int OffsetOfFirstGCRefMapSlot => OffsetOfArgumentRegisters;
+ public override int OffsetOfFirstGCRefMapSlot => SizeOfCalleeSavedRegisters;
+ public override int OffsetOfArgumentRegisters => OffsetOfFirstGCRefMapSlot;
// F0..F7
public override int OffsetOfFloatArgumentRegisters => 8 * sizeof(double);
@@ -671,19 +671,11 @@ public override bool IsArgPassedByRef(TypeHandle th)
}
else
{
- int numIntroducedFields = 0;
- foreach (FieldDesc field in th.GetRuntimeTypeHandle().GetFields())
- {
- if (!field.IsStatic)
- {
- numIntroducedFields++;
- }
- }
- return ((numIntroducedFields == 0) || (numIntroducedFields > 2));
+ return false;
}
}
- public sealed override int GetRetBuffArgOffset(bool hasThis) => OffsetOfArgumentRegisters;
+ public sealed override int GetRetBuffArgOffset(bool hasThis) => OffsetOfFirstGCRefMapSlot + (hasThis ? 8 : 0);
public override int StackElemSize(int parmSize, bool isValueType = false, bool isFloatHfa = false)
{
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs
index 52da7f3e91339c..cd578333425b79 100644
--- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs
@@ -259,6 +259,14 @@ public override string ToString()
sb.AppendLine($" Has Tailcalls: {_wantsReportOnlyLeaf}");
}
+ else if (_machine == Machine.LoongArch64)
+ {
+ if (StackBaseRegister != 0xffffffff)
+ {
+ sb.AppendLine($" StackBaseRegister: {(LoongArch64.Registers)StackBaseRegister}");
+ }
+ sb.AppendLine($" Has Tailcalls: {_wantsReportOnlyLeaf}");
+ }
sb.AppendLine($" Size of parameter area: 0x{SizeOfStackOutgoingAndScratchArea:X}");
if (SizeOfEditAndContinuePreservedArea != 0xffffffff)
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcSlotTable.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcSlotTable.cs
index 153b19d377258b..8355a1a0976dc8 100644
--- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcSlotTable.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcSlotTable.cs
@@ -68,6 +68,9 @@ private static string GetRegisterName(int registerNumber, Machine machine)
case Machine.Arm64:
return ((Arm64.Registers)registerNumber).ToString();
+ case Machine.LoongArch64:
+ return ((LoongArch64.Registers)registerNumber).ToString();
+
default:
throw new NotImplementedException(machine.ToString());
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcTransition.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcTransition.cs
index 3c2bb7c8df9d8e..ecea8cc1dfa6f0 100644
--- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcTransition.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcTransition.cs
@@ -65,6 +65,10 @@ public string GetSlotState(GcSlotTable slotTable, Machine machine)
regType = typeof(Amd64.Registers);
break;
+ case Machine.LoongArch64:
+ regType = typeof(LoongArch64.Registers);
+ break;
+
default:
throw new NotImplementedException();
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfo.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfo.cs
index c619198d31fb6f..03110197b58770 100644
--- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfo.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/DebugInfo.cs
@@ -72,6 +72,8 @@ public static string GetPlatformSpecificRegister(Machine machine, int regnum)
return ((Arm.Registers)regnum).ToString();
case Machine.Arm64:
return ((Arm64.Registers)regnum).ToString();
+ case Machine.LoongArch64:
+ return ((LoongArch64.Registers)regnum).ToString();
default:
throw new NotImplementedException($"No implementation for machine type {machine}.");
}
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs
index 38e85a78969092..9356bce3ccccd9 100644
--- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs
@@ -149,6 +149,11 @@ internal GcInfoTypes(Machine machine)
NUM_UNTRACKED_SLOTS_ENCBASE = 5;
REGISTER_DELTA_ENCBASE = 3;
break;
+ case Machine.LoongArch64:
+ SIZE_OF_RETURN_KIND_FAT = 4;
+ STACK_BASE_REGISTER_ENCBASE = 2;
+ NUM_REGISTERS_ENCBASE = 3;
+ break;
}
}
@@ -159,6 +164,7 @@ internal int DenormalizeCodeLength(int x)
case Machine.ArmThumb2:
return (x << 1);
case Machine.Arm64:
+ case Machine.LoongArch64:
return (x << 2);
}
return x;
@@ -173,6 +179,7 @@ internal int DenormalizeStackSlot(int x)
case Machine.ArmThumb2:
return (x << 2);
case Machine.Arm64:
+ case Machine.LoongArch64:
return (x << 3);
}
return x;
@@ -188,6 +195,8 @@ internal uint DenormalizeStackBaseRegister(uint x)
return ((x ^ 7) + 4);
case Machine.Arm64:
return (x ^ 29);
+ case Machine.LoongArch64:
+ return ((x ^ 22) & 0x3);
}
return x;
}
@@ -201,6 +210,7 @@ internal uint DenormalizeSizeOfStackArea(uint x)
case Machine.ArmThumb2:
return (x << 2);
case Machine.Arm64:
+ case Machine.LoongArch64:
return (x << 3);
}
return x;
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/LoongArch64/Registers.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/LoongArch64/Registers.cs
new file mode 100644
index 00000000000000..23b88ed478855c
--- /dev/null
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/LoongArch64/Registers.cs
@@ -0,0 +1,45 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ILCompiler.Reflection.ReadyToRun.LoongArch64
+{
+ public enum Registers
+ {
+ R0,
+ Ra,
+ Tp,
+ Sp,
+ A0,
+ A1,
+ A2,
+ A3,
+ A4,
+ A5,
+ A6,
+ A7,
+ T0,
+ T1,
+ T2,
+ T3,
+ T4,
+ T5,
+ T6,
+ T7,
+ T8,
+ X0,
+ Fp,
+ S0,
+ S1,
+ S2,
+ S3,
+ S4,
+ S5,
+ S6,
+ S7,
+ S8
+ }
+}
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/LoongArch64/UnwindInfo.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/LoongArch64/UnwindInfo.cs
new file mode 100644
index 00000000000000..98fe6cbfdde3e1
--- /dev/null
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/LoongArch64/UnwindInfo.cs
@@ -0,0 +1,163 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Text;
+
+namespace ILCompiler.Reflection.ReadyToRun.LoongArch64
+{
+ public class Epilog
+ {
+ public int Index { get; set; }
+
+ public uint EpilogStartOffset { get; set; }
+ public uint Res { get; set; }
+ public uint Condition { get; set; }
+ public uint EpilogStartIndex { get; set; }
+ public uint EpilogStartOffsetFromMainFunctionBegin { get; set; }
+
+ public Epilog() { }
+
+ public Epilog(int index, int dw, uint startOffset)
+ {
+ Index = index;
+
+ EpilogStartOffset = UnwindInfo.ExtractBits(dw, 0, 18);
+ Res = UnwindInfo.ExtractBits(dw, 18, 4);
+ Condition = UnwindInfo.ExtractBits(dw, 20, 4);
+ EpilogStartIndex = UnwindInfo.ExtractBits(dw, 22, 10);
+
+ // Note that epilogStartOffset for a funclet is the offset from the beginning
+ // of the current funclet, not the offset from the beginning of the main function.
+ // To help find it when looking through JitDump output, also show the offset from
+ // the beginning of the main function.
+ EpilogStartOffsetFromMainFunctionBegin = EpilogStartOffset * 4 + startOffset;
+ }
+
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.AppendLine($" Epilog Start Offset: 0x{EpilogStartOffset:X5} Actual offset = 0x{EpilogStartOffset * 4:X5} Offset from main function begin = 0x{EpilogStartOffsetFromMainFunctionBegin:X6}");
+ sb.AppendLine($" Condition: {Condition} (0x{Condition:X})" + ((Condition == 0xE) ? " (always)" : ""));
+ sb.Append($" Epilog Start Index: {EpilogStartIndex} (0x{EpilogStartIndex:X})");
+ return sb.ToString();
+ }
+ }
+
+ public class UnwindCode
+ {
+ public int Index { get; set; }
+
+ public UnwindCode() { }
+
+ public UnwindCode(int index)
+ {
+ Index = index;
+
+ }
+ }
+
+ ///
+ /// based on src/jit/unwindloongarch64.cpp DumpUnwindInfo
+ ///
+ public class UnwindInfo : BaseUnwindInfo
+ {
+ public uint CodeWords { get; set; }
+ public uint EpilogCount { get; set; }
+ public uint EBit { get; set; }
+ public uint XBit { get; set; }
+ public uint Vers { get; set; }
+ public uint FunctionLength { get; set; }
+
+ public uint ExtendedCodeWords { get; set; }
+ public uint ExtendedEpilogCount { get; set; }
+
+ public Epilog[] Epilogs { get; set; }
+
+ public UnwindInfo() { }
+
+ public UnwindInfo(byte[] image, int offset)
+ {
+ uint startOffset = (uint)offset;
+
+ int dw = NativeReader.ReadInt32(image, ref offset);
+ CodeWords = ExtractBits(dw, 27, 5);
+ EpilogCount = ExtractBits(dw, 22, 5);
+ EBit = ExtractBits(dw, 21, 1);
+ XBit = ExtractBits(dw, 20, 1);
+ Vers = ExtractBits(dw, 18, 2);
+ FunctionLength = ExtractBits(dw, 0, 18) * 4;
+
+ if (CodeWords == 0 && EpilogCount == 0)
+ {
+ // We have an extension word specifying a larger number of Code Words or Epilog Counts
+ // than can be specified in the header word.
+ dw = NativeReader.ReadInt32(image, ref offset);
+ ExtendedCodeWords = ExtractBits(dw, 16, 8);
+ ExtendedEpilogCount = ExtractBits(dw, 0, 16);
+ }
+
+ bool[] epilogStartAt = new bool[1024]; // One byte per possible epilog start index; initialized to false
+
+ if (EBit == 0)
+ {
+ Epilogs = new Epilog[EpilogCount];
+ if (EpilogCount != 0)
+ {
+ for (int scope = 0; scope < EpilogCount; scope++)
+ {
+ dw = NativeReader.ReadInt32(image, ref offset);
+ Epilogs[scope] = new Epilog(scope, dw, startOffset);
+ epilogStartAt[Epilogs[scope].EpilogStartIndex] = true; // an epilog starts at this offset in the unwind codes
+ }
+ }
+ }
+ else
+ {
+ Epilogs = new Epilog[0];
+ epilogStartAt[EpilogCount] = true; // the one and only epilog starts its unwind codes at this offset
+ }
+
+
+
+ Size = offset - (int)startOffset + (int)CodeWords * 4;
+ int alignmentPad = ((Size + sizeof(int) - 1) & ~(sizeof(int) - 1)) - Size;
+ Size += (alignmentPad + sizeof(uint));
+ }
+
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.AppendLine($" CodeWords: {CodeWords}");
+ sb.AppendLine($" EpilogCount: {EpilogCount}");
+ sb.AppendLine($" EBit: {EBit}");
+ sb.AppendLine($" XBit: {XBit}");
+ sb.AppendLine($" Vers: {Vers}");
+ sb.AppendLine($" FunctionLength: {FunctionLength}");
+ if (CodeWords == 0 && EpilogCount == 0)
+ {
+ sb.AppendLine(" ---- Extension word ----");
+ sb.AppendLine($" Extended Code Words: {CodeWords}");
+ sb.AppendLine($" Extended Epilog Count: {EpilogCount}");
+ }
+ if (EpilogCount == 0)
+ {
+ sb.AppendLine(" No epilogs");
+ }
+ else
+ {
+ for (int i = 0; i < Epilogs.Length; i++)
+ {
+ sb.AppendLine(" -------------------------");
+ sb.AppendLine(Epilogs[i].ToString());
+ sb.AppendLine(" -------------------------");
+ }
+ }
+ return sb.ToString();
+ }
+
+ internal static uint ExtractBits(int dw, int start, int length)
+ {
+ return (uint)((dw >> start) & ((1 << length) - 1));
+ }
+ }
+}
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs
index ca9bc4996880a0..dee60ea5daf3fb 100644
--- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunMethod.cs
@@ -225,6 +225,10 @@ private int GetSize()
{
return (int)arm64Info.FunctionLength;
}
+ else if (UnwindInfo is LoongArch64.UnwindInfo loongarch64Info)
+ {
+ return (int)loongarch64Info.FunctionLength;
+ }
else if (Method.GcInfo != null)
{
return Method.GcInfo.CodeLength;
@@ -488,7 +492,7 @@ private void EnsureInitialized()
}
else
{
- // Arm and Arm64 use the same GcInfo format as Amd64
+ // Arm, Arm64 and LoongArch64 use the same GcInfo format as Amd64
_gcInfo = new Amd64.GcInfo(_readyToRunReader.Image, gcInfoOffset, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion);
}
}
@@ -604,6 +608,10 @@ private void ParseRuntimeFunctions(bool partial)
{
unwindInfo = new Arm64.UnwindInfo(_readyToRunReader.Image, unwindOffset);
}
+ else if (_readyToRunReader.Machine == Machine.LoongArch64)
+ {
+ unwindInfo = new LoongArch64.UnwindInfo(_readyToRunReader.Image, unwindOffset);
+ }
if (i == 0 && unwindInfo != null)
{
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
index 6f256e98c62f52..c46bcc6707d5d7 100644
--- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunReader.cs
@@ -1415,6 +1415,7 @@ private void EnsureImportSections()
case Machine.Amd64:
case Machine.Arm64:
+ case Machine.LoongArch64:
entrySize = 8;
break;
diff --git a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/TransitionBlock.cs b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/TransitionBlock.cs
index cd66d5a660b7cd..dcd1f531443bb6 100644
--- a/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/TransitionBlock.cs
+++ b/src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/TransitionBlock.cs
@@ -31,6 +31,9 @@ public static TransitionBlock FromReader(ReadyToRunReader reader)
case Machine.Arm64:
return Arm64TransitionBlock.Instance;
+ case Machine.LoongArch64:
+ return LoongArch64TransitionBlock.Instance;
+
default:
throw new NotImplementedException();
}
@@ -163,8 +166,8 @@ private sealed class LoongArch64TransitionBlock : TransitionBlock
public override int NumCalleeSavedRegisters => 12;
// Callee-saves, padding, argument registers
public override int SizeOfTransitionBlock => SizeOfCalleeSavedRegisters + SizeOfArgumentRegisters;
- public override int OffsetOfArgumentRegisters => SizeOfCalleeSavedRegisters;
- public override int OffsetOfFirstGCRefMapSlot => OffsetOfArgumentRegisters;
+ public override int OffsetOfFirstGCRefMapSlot => SizeOfCalleeSavedRegisters;
+ public override int OffsetOfArgumentRegisters => OffsetOfFirstGCRefMapSlot;
}
}
}
diff --git a/src/coreclr/tools/r2rdump/CoreDisTools.cs b/src/coreclr/tools/r2rdump/CoreDisTools.cs
index 739a564814309b..eda94336b6722d 100644
--- a/src/coreclr/tools/r2rdump/CoreDisTools.cs
+++ b/src/coreclr/tools/r2rdump/CoreDisTools.cs
@@ -21,7 +21,8 @@ public enum TargetArch
Target_X86,
Target_X64,
Target_Thumb,
- Target_Arm64
+ Target_Arm64,
+ Target_LoongArch64
};
[DllImport(_dll, CallingConvention = CallingConvention.Cdecl)]
@@ -73,6 +74,9 @@ public static IntPtr GetDisasm(Machine machine)
case Machine.ArmThumb2:
target = TargetArch.Target_Thumb;
break;
+ case Machine.LoongArch64:
+ target = TargetArch.Target_LoongArch64;
+ break;
default:
Program.WriteWarning($"{machine} not supported on CoreDisTools");
return IntPtr.Zero;
@@ -184,6 +188,9 @@ private void SetIndentations()
// Instructions are dumped as 4-byte hexadecimal integers
Machine.Arm64 => 4 * 2 + 1,
+ // Instructions are dumped as 4-byte hexadecimal integers
+ Machine.LoongArch64 => 4 * 2 + 1,
+
_ => throw new NotImplementedException()
};
@@ -253,7 +260,7 @@ public int GetInstruction(RuntimeFunction rtf, int imageOffset, int rtfOffset, o
}
else
{
- if (_reader.Machine == Machine.Arm64)
+ if ((_reader.Machine == Machine.Arm64) || (_reader.Machine == Machine.LoongArch64))
{
// Replace " hh hh hh hh " byte dump with " hhhhhhhh ".
// CoreDisTools should be fixed to dump bytes this way for ARM64.
@@ -334,6 +341,10 @@ public int GetInstruction(RuntimeFunction rtf, int imageOffset, int rtfOffset, o
ProbeArm64Quirks(rtf, imageOffset, rtfOffset, ref fixedTranslatedLine);
break;
+ case Machine.LoongArch64:
+ //TODO-LoongArch64: maybe should add ProbeLoongArch64Quirks. At least it's unused now.
+ break;
+
case Machine.ArmThumb2:
break;
diff --git a/src/coreclr/tools/r2rdump/R2RDump.csproj b/src/coreclr/tools/r2rdump/R2RDump.csproj
index 999cb7c4714d67..f0a60be4274e4b 100644
--- a/src/coreclr/tools/r2rdump/R2RDump.csproj
+++ b/src/coreclr/tools/r2rdump/R2RDump.csproj
@@ -4,7 +4,7 @@
1.0.0.0
true
Exe
- x64;x86;arm64;arm
+ x64;x86;arm64;arm;loongarch64
Open
true
$(NetCoreAppToolCurrent)