summaryrefslogtreecommitdiff
path: root/src/vm/argdestination.h
diff options
context:
space:
mode:
authorCarol Eidt <carol.eidt@microsoft.com>2019-04-16 09:35:49 -0700
committerGitHub <noreply@github.com>2019-04-16 09:35:49 -0700
commit5be6b66ff3597df6a1ce3b66a8cf65b0beb40856 (patch)
treea40d84e300782a3da0b33386086f629da646f98e /src/vm/argdestination.h
parent11a3859c10dcc20a6c5865135334f4df62d2358c (diff)
downloadcoreclr-5be6b66ff3597df6a1ce3b66a8cf65b0beb40856.tar.gz
coreclr-5be6b66ff3597df6a1ce3b66a8cf65b0beb40856.tar.bz2
coreclr-5be6b66ff3597df6a1ce3b66a8cf65b0beb40856.zip
Arm64 vector ABI (#23675)
* Support for Arm64 Vector ABI Extend HFA support to support vectors as well as floating point types. This requires that the JIT recognize vector types even during crossgen, so that the ABI is supported consistently. Also, fix and re-enable the disabled Arm64 Simd tests. Fix #16022
Diffstat (limited to 'src/vm/argdestination.h')
-rw-r--r--src/vm/argdestination.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vm/argdestination.h b/src/vm/argdestination.h
index 386ba57c82..8ddd7b2104 100644
--- a/src/vm/argdestination.h
+++ b/src/vm/argdestination.h
@@ -60,22 +60,24 @@ public:
// fieldBytes - size of the structure
void CopyHFAStructToRegister(void *src, int fieldBytes)
{
- // We are either copying either a float or double HFA and need to
+ // We are copying a float, double or vector HFA/HVA and need to
// enregister each field.
int floatRegCount = m_argLocDescForStructInRegs->m_cFloatReg;
- bool typeFloat = m_argLocDescForStructInRegs->m_isSinglePrecision;
+ int hfaFieldSize = m_argLocDescForStructInRegs->m_hfaFieldSize;
UINT64* dest = (UINT64*) this->GetDestinationAddress();
for (int i = 0; i < floatRegCount; ++i)
{
// Copy 4 or 8 bytes from src.
- UINT64 val = typeFloat ? *((UINT32*)src + i) : *((UINT64*)src + i);
+ UINT64 val = (hfaFieldSize == 4) ? *((UINT32*)src) : *((UINT64*)src);
// Always store 8 bytes
*(dest++) = val;
- // For now, always zero the next 8 bytes.
- // (When HVAs are supported we will get the next 8 bytes from src.)
- *(dest++) = 0;
+ // Either zero the next 8 bytes or get the next 8 bytes from src for 16-byte vector.
+ *(dest++) = (hfaFieldSize == 16) ? *((UINT64*)src + 1) : 0;
+
+ // Increment src by the appropriate amount.
+ src = (void*)((char*)src + hfaFieldSize);
}
}