Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/gcinfo/gcinfodumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ BOOL GcInfoDumper::ReportPointerRecord (
#undef REG
#elif defined(TARGET_RISCV64)
#undef REG
#define REG(reg, field) { offsetof(Riscv64VolatileContextPointer, field) }
#define REG(reg, field) { offsetof(RiscV64VolatileContextPointer, field) }
REG(zero, R0),
REG(a0, A0),
REG(a1, A1),
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/inc/regdisp.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ typedef struct _Loongarch64VolatileContextPointer
#endif

#if defined(TARGET_RISCV64)
typedef struct _Riscv64VolatileContextPointer
typedef struct _RiscV64VolatileContextPointer
{
PDWORD64 R0;
PDWORD64 A0;
Expand All @@ -229,7 +229,7 @@ typedef struct _Riscv64VolatileContextPointer
PDWORD64 T4;
PDWORD64 T5;
PDWORD64 T6;
} Riscv64VolatileContextPointer;
} RiscV64VolatileContextPointer;
#endif

struct REGDISPLAY : public REGDISPLAY_BASE {
Expand All @@ -242,7 +242,7 @@ struct REGDISPLAY : public REGDISPLAY_BASE {
#endif

#ifdef TARGET_RISCV64
Riscv64VolatileContextPointer volatileCurrContextPointers;
RiscV64VolatileContextPointer volatileCurrContextPointers;
#endif

REGDISPLAY()
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/inc/targetosarch.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,47 +54,47 @@ class TargetArchitecture
static const bool IsArm32 = true;
static const bool IsArmArch = true;
static const bool IsLoongArch64 = false;
static const bool IsRiscv64 = false;
static const bool IsRiscV64 = false;
#elif defined(TARGET_ARM64)
static const bool IsX86 = false;
static const bool IsX64 = false;
static const bool IsArm64 = true;
static const bool IsArm32 = false;
static const bool IsArmArch = true;
static const bool IsLoongArch64 = false;
static const bool IsRiscv64 = false;
static const bool IsRiscV64 = false;
#elif defined(TARGET_AMD64)
static const bool IsX86 = false;
static const bool IsX64 = true;
static const bool IsArm64 = false;
static const bool IsArm32 = false;
static const bool IsArmArch = false;
static const bool IsLoongArch64 = false;
static const bool IsRiscv64 = false;
static const bool IsRiscV64 = false;
#elif defined(TARGET_X86)
static const bool IsX86 = true;
static const bool IsX64 = false;
static const bool IsArm64 = false;
static const bool IsArm32 = false;
static const bool IsArmArch = false;
static const bool IsLoongArch64 = false;
static const bool IsRiscv64 = false;
static const bool IsRiscV64 = false;
#elif defined(TARGET_LOONGARCH64)
static const bool IsX86 = false;
static const bool IsX64 = false;
static const bool IsArm64 = false;
static const bool IsArm32 = false;
static const bool IsArmArch = false;
static const bool IsLoongArch64 = true;
static const bool IsRiscv64 = false;
static const bool IsRiscV64 = false;
#elif defined(TARGET_RISCV64)
static const bool IsX86 = false;
static const bool IsX64 = false;
static const bool IsArm64 = false;
static const bool IsArm32 = false;
static const bool IsArmArch = false;
static const bool IsLoongArch64 = false;
static const bool IsRiscv64 = true;
static const bool IsRiscV64 = true;
#else
#error Unknown architecture
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/jit/emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7562,7 +7562,7 @@ unsigned emitter::emitEndCodeGen(Compiler* comp,
assert(!jmp->idAddr()->iiaHasInstrCount());
emitOutputLJ(NULL, adr, jmp);
#elif defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
// For LoongArch64 and Riscv64 `emitFwdJumps` is always false.
// For LoongArch64 and RiscV64 `emitFwdJumps` is always false.
unreached();
#else
#error Unsupported or unset target architecture
Expand All @@ -7578,7 +7578,7 @@ unsigned emitter::emitEndCodeGen(Compiler* comp,
assert(!jmp->idAddr()->iiaHasInstrCount());
emitOutputLJ(NULL, adr, jmp);
#elif defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
// For LoongArch64 and Riscv64 `emitFwdJumps` is always false.
// For LoongArch64 and RiscV64 `emitFwdJumps` is always false.
unreached();
#else
#error Unsupported or unset target architecture
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ inline bool compMacOsArm64Abi()
}
inline bool compFeatureArgSplit()
{
return TargetArchitecture::IsLoongArch64 || TargetArchitecture::IsArm32 || TargetArchitecture::IsRiscv64 ||
return TargetArchitecture::IsLoongArch64 || TargetArchitecture::IsArm32 || TargetArchitecture::IsRiscV64 ||
(TargetOS::IsWindows && TargetArchitecture::IsArm64);
}
inline bool compUnixX86Abi()
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/callingconvention.h
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@ int ArgIteratorTemplate<ARGITERATOR_BASE>::GetNextOffset()
pMethodTable = thValueType.AsNativeValueType();
}
_ASSERTE(pMethodTable != nullptr);
flags = MethodTable::GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
flags = MethodTable::GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
if (flags & STRUCT_HAS_FLOAT_FIELDS_MASK)
{
cFPRegs = (flags & STRUCT_FLOAT_FIELD_ONLY_TWO) ? 2 : 1;
Expand Down Expand Up @@ -2040,7 +2040,7 @@ void ArgIteratorTemplate<ARGITERATOR_BASE>::ComputeReturnFlags()
assert(!thValueType.IsTypeDesc());

MethodTable *pMethodTable = thValueType.AsMethodTable();
flags = (MethodTable::GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable) & 0xff) << RETURN_FP_SIZE_SHIFT;
flags = (MethodTable::GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable) & 0xff) << RETURN_FP_SIZE_SHIFT;
break;
}
#else
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9527,7 +9527,7 @@ uint32_t CEEInfo::getRISCV64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)
uint32_t size = STRUCT_NO_FLOAT_FIELD;

#if defined(TARGET_RISCV64)
size = (uint32_t)MethodTable::GetRiscv64PassStructInRegisterFlags(cls);
size = (uint32_t)MethodTable::GetRiscV64PassStructInRegisterFlags(cls);
#endif // TARGET_RISCV64

EE_TO_JIT_TRANSITION_LEAF();
Expand Down
28 changes: 14 additions & 14 deletions src/coreclr/vm/methodtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3534,7 +3534,7 @@ int MethodTable::GetLoongArch64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cl

#if defined(TARGET_RISCV64)

bool MethodTable::IsRiscv64OnlyOneField(MethodTable * pMT)
bool MethodTable::IsRiscV64OnlyOneField(MethodTable * pMT)
{
TypeHandle th(pMT);

Expand Down Expand Up @@ -3568,7 +3568,7 @@ bool MethodTable::IsRiscv64OnlyOneField(MethodTable * pMT)
pMethodTable = pFieldStart->GetApproxFieldTypeHandleThrowing().GetMethodTable();
if (pMethodTable->GetNumIntroducedInstanceFields() == 1)
{
ret = IsRiscv64OnlyOneField(pMethodTable);
ret = IsRiscV64OnlyOneField(pMethodTable);
}
}
}
Expand Down Expand Up @@ -3621,7 +3621,7 @@ bool MethodTable::IsRiscv64OnlyOneField(MethodTable * pMT)
if (nfc == NativeFieldCategory::NESTED)
{
pMethodTable = pNativeFieldDescs->GetNestedNativeMethodTable();
ret = IsRiscv64OnlyOneField(pMethodTable);
ret = IsRiscV64OnlyOneField(pMethodTable);
}
else if (nfc != NativeFieldCategory::ILLEGAL)
{
Expand All @@ -3640,7 +3640,7 @@ bool MethodTable::IsRiscv64OnlyOneField(MethodTable * pMT)
return ret;
}

int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)
int MethodTable::GetRiscV64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)
{
TypeHandle th(cls);

Expand Down Expand Up @@ -3679,7 +3679,7 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)
else if (fieldType == ELEMENT_TYPE_VALUETYPE)
{
pMethodTable = pFieldStart->GetApproxFieldTypeHandleThrowing().GetMethodTable();
size = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
size = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
}
}
else if (numIntroducedFields == 2)
Expand Down Expand Up @@ -3722,9 +3722,9 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)
else if (fieldType == ELEMENT_TYPE_VALUETYPE)
{
pMethodTable = pFieldFirst->GetApproxFieldTypeHandleThrowing().GetMethodTable();
if (IsRiscv64OnlyOneField(pMethodTable))
if (IsRiscV64OnlyOneField(pMethodTable))
{
size = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
size = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
if ((size & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0)
{
size = pFieldFirst[0].GetSize() == 8 ? STRUCT_FIRST_FIELD_DOUBLE : STRUCT_FLOAT_FIELD_FIRST;
Expand Down Expand Up @@ -3778,9 +3778,9 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)
else if (fieldType == ELEMENT_TYPE_VALUETYPE)
{
pMethodTable = pFieldSecond[0].GetApproxFieldTypeHandleThrowing().GetMethodTable();
if (IsRiscv64OnlyOneField(pMethodTable))
if (IsRiscV64OnlyOneField(pMethodTable))
{
int size2 = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
int size2 = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
if ((size2 & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0)
{
if (pFieldSecond[0].GetSize() == 8)
Expand Down Expand Up @@ -3901,7 +3901,7 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)
if (nfc == NativeFieldCategory::NESTED)
{
pMethodTable = pNativeFieldDescs->GetNestedNativeMethodTable();
size = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
size = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable);
return size;
}
else if (nfc == NativeFieldCategory::FLOAT)
Expand Down Expand Up @@ -3985,13 +3985,13 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)

MethodTable* pMethodTable2 = pNativeFieldDescs->GetNestedNativeMethodTable();

if (!IsRiscv64OnlyOneField(pMethodTable2))
if (!IsRiscV64OnlyOneField(pMethodTable2))
{
size = STRUCT_NO_FLOAT_FIELD;
goto _End_arg;
}

size = GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable2);
size = GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable2);
if ((size & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0)
{
if (pFieldStart->GetSize() == 8)
Expand Down Expand Up @@ -4081,13 +4081,13 @@ int MethodTable::GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE cls)

MethodTable* pMethodTable2 = pNativeFieldDescs[1].GetNestedNativeMethodTable();

if (!IsRiscv64OnlyOneField(pMethodTable2))
if (!IsRiscV64OnlyOneField(pMethodTable2))
{
size = STRUCT_NO_FLOAT_FIELD;
goto _End_arg;
}

if ((GetRiscv64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable2) & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0)
if ((GetRiscV64PassStructInRegisterFlags((CORINFO_CLASS_HANDLE)pMethodTable2) & STRUCT_FLOAT_FIELD_ONLY_ONE) != 0)
{
if (pFieldStart[1].GetSize() == 4)
{
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/methodtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ class MethodTable
#endif

#if defined(TARGET_RISCV64)
static bool IsRiscv64OnlyOneField(MethodTable * pMT);
static int GetRiscv64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE clh);
static bool IsRiscV64OnlyOneField(MethodTable * pMT);
static int GetRiscV64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE clh);
#endif

#if defined(UNIX_AMD64_ABI_ITF)
Expand Down