-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Arm64 vector ABI #23675
Arm64 vector ABI #23675
Changes from all commits
bc14374
a17f160
dc310e6
2c5a026
dd186f2
582d506
69e0a6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3305,7 +3305,7 @@ void CodeGen::genFnPrologCalleeRegArgs(regNumber xtraReg, bool* pXtraRegClobbere | |
{ | ||
// A struct might be passed partially in XMM register for System V calls. | ||
// So a single arg might use both register files. | ||
if (isFloatRegType(regType) != doingFloat) | ||
if (emitter::isFloatReg(varDsc->lvArgReg) != doingFloat) | ||
{ | ||
continue; | ||
} | ||
|
@@ -10158,7 +10158,11 @@ bool Compiler::IsMultiRegReturnedType(CORINFO_CLASS_HANDLE hClass) | |
structPassingKind howToReturnStruct; | ||
var_types returnType = getReturnTypeForStruct(hClass, &howToReturnStruct); | ||
|
||
#ifdef _TARGET_ARM64_ | ||
return (varTypeIsStruct(returnType) && (howToReturnStruct != SPK_PrimitiveType)); | ||
#else | ||
return (varTypeIsStruct(returnType)); | ||
#endif | ||
} | ||
|
||
//---------------------------------------------- | ||
|
@@ -10167,11 +10171,7 @@ bool Compiler::IsMultiRegReturnedType(CORINFO_CLASS_HANDLE hClass) | |
|
||
bool Compiler::IsHfa(CORINFO_CLASS_HANDLE hClass) | ||
{ | ||
#ifdef FEATURE_HFA | ||
return varTypeIsFloating(GetHfaType(hClass)); | ||
#else | ||
return false; | ||
#endif | ||
return varTypeIsValidHfaType(GetHfaType(hClass)); | ||
} | ||
|
||
bool Compiler::IsHfa(GenTree* tree) | ||
|
@@ -10204,7 +10204,19 @@ var_types Compiler::GetHfaType(CORINFO_CLASS_HANDLE hClass) | |
{ | ||
#ifdef FEATURE_HFA | ||
CorInfoType corType = info.compCompHnd->getHFAType(hClass); | ||
if (corType != CORINFO_TYPE_UNDEF) | ||
#ifdef _TARGET_ARM64_ | ||
if (corType == CORINFO_TYPE_VALUECLASS) | ||
{ | ||
// This is a vector type. | ||
// HVAs are only supported on ARM64, and only for homogeneous aggregates of 8 or 16 byte vectors. | ||
// For 8-byte vectors corType will be returned as CORINFO_TYPE_DOUBLE. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't classified independently as a short vector? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No; for ABI purposes it is the same (an 8-byte vector is passed in the lower 8-bytes of the register, just as for double) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this something that might be useful to differentiate at some point in the future? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may be, but it will come at a (probably not large) price in complexity and change to the JIT/EE interface (unless the need for it is internal to the JIT), so I'd propose we wait until such time as we need it. |
||
result = TYP_SIMD16; | ||
// This type may not appear elsewhere, but it will occupy a floating point register. | ||
compFloatingPointUsed = true; | ||
} | ||
else | ||
#endif // _TARGET_ARM64_ | ||
if (corType != CORINFO_TYPE_UNDEF) | ||
{ | ||
result = JITtype2varType(corType); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.