Skip to content

Commit af542eb

Browse files
committed
Fixing half vm abi #defines.
1 parent 575adca commit af542eb

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/coreclr/vm/callhelpers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ void MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments, ARG_SLOT *
416416
#ifdef CALLDESCR_REGTYPEMAP
417417
{
418418
CorElementType regMapType = m_argIt.GetArgType();
419-
#ifdef TARGET_XARCH
419+
#if defined(TARGET_AMD64) || defined(TARGET_X86)
420420
// System.Half is passed in floating point registers like a float
421421
if (regMapType == ELEMENT_TYPE_VALUETYPE)
422422
{
@@ -425,7 +425,7 @@ void MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments, ARG_SLOT *
425425
if (!th.IsNull() && th.AsMethodTable()->IsNativeHalfType())
426426
regMapType = ELEMENT_TYPE_R4;
427427
}
428-
#endif // TARGET_XARCH
428+
#endif // TARGET_AMD64 || TARGET_X86
429429
FillInRegTypeMap(ofs, regMapType, pMap);
430430
}
431431
#endif

src/coreclr/vm/callingconvention.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ class ArgIteratorTemplate : public ARGITERATOR_BASE
873873
#if !defined(UNIX_AMD64_ABI)
874874
// On Windows x64, we re-use the location in the transition block for both the integer and floating point registers
875875
if ((m_argType == ELEMENT_TYPE_R4) || (m_argType == ELEMENT_TYPE_R8)
876-
#ifdef TARGET_XARCH
876+
#if defined(TARGET_AMD64) || defined(TARGET_X86)
877877
// System.Half is passed in floating point registers like a float
878878
|| (m_argType == ELEMENT_TYPE_VALUETYPE && !m_argTypeHandle.IsNull() && m_argTypeHandle.AsMethodTable()->IsNativeHalfType())
879879
#endif // TARGET_XARCH
@@ -2002,7 +2002,7 @@ void ArgIteratorTemplate<ARGITERATOR_BASE>::ComputeReturnFlags()
20022002
}
20032003
#endif
20042004

2005-
#ifdef TARGET_XARCH
2005+
#if defined(TARGET_AMD64) || defined(TARGET_X86)
20062006
// System.Half is returned in xmm0 like a float
20072007
if (thValueType.AsMethodTable()->IsNativeHalfType())
20082008
{

src/coreclr/vm/class.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,7 @@ int MethodTable::GetVectorSize()
17201720
return 0;
17211721
}
17221722

1723-
#ifdef TARGET_XARCH
1723+
#if defined(TARGET_AMD64) || defined(TARGET_X86)
17241724
//*******************************************************************************
17251725
// Returns true if this is the System.Half type and the CPU supports AVX10v1.
17261726
// System.Half is passed and returned in floating point registers on xarch

src/coreclr/vm/invokeutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void InvokeUtil::CopyArg(TypeHandle th, PVOID argRef, ArgDestination *argDest) {
220220
case ELEMENT_TYPE_VALUETYPE:
221221
{
222222
MethodTable* pMT = th.GetMethodTable();
223-
#ifdef TARGET_XARCH
223+
#if defined(TARGET_AMD64) || defined(TARGET_X86)
224224
// System.Half is passed in floating point registers. Zero-extend the 2-byte value
225225
// to 4 bytes so that the movss load in CallDescrWorker reads clean data.
226226
if (pMT->IsNativeHalfType())

src/coreclr/vm/methodtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ class MethodTable
20122012
bool IsNativeHFA();
20132013
CorInfoHFAElemType GetNativeHFAType();
20142014

2015-
#ifdef TARGET_XARCH
2015+
#if defined(TARGET_AMD64) || defined(TARGET_X86)
20162016
// Returns true if this is the System.Half type, which is passed and returned
20172017
// in floating point registers on xarch platforms.
20182018
bool IsNativeHalfType();

src/coreclr/vm/reflectioninvocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ extern "C" void QCALLTYPE RuntimeMethodHandle_InvokeMethod(
543543
#ifdef CALLDESCR_REGTYPEMAP
544544
{
545545
CorElementType regMapType = argit.GetArgType();
546-
#ifdef TARGET_XARCH
546+
#if defined(TARGET_AMD64) || defined(TARGET_X86)
547547
// System.Half is passed in floating point registers like a float
548548
if (regMapType == ELEMENT_TYPE_VALUETYPE && !th.IsNull() && th.AsMethodTable()->IsNativeHalfType())
549549
regMapType = ELEMENT_TYPE_R4;

0 commit comments

Comments
 (0)