Skip to content

Commit c1d8656

Browse files
authored
[Arm64] Use SIMD register to zero init frame (#46609)
* Inline "stp q-reg, q-reg, addr-reg" for frames >= 32 bytes * Use a pair of "stp q-reg, q-reg, addr-reg" in a loop that clears 64 bytes per iteration for frames >= 192 bytes * Use dc zva instruction when the instruction is permitted and its block size is set to 64 bytes for frames >= 256 bytes
1 parent 1c0ca4a commit c1d8656

14 files changed

+302
-96
lines changed

src/coreclr/inc/corinfoinstructionset.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ enum CORINFO_InstructionSet
2727
InstructionSet_Atomics=9,
2828
InstructionSet_Vector64=10,
2929
InstructionSet_Vector128=11,
30-
InstructionSet_ArmBase_Arm64=12,
31-
InstructionSet_AdvSimd_Arm64=13,
32-
InstructionSet_Aes_Arm64=14,
33-
InstructionSet_Crc32_Arm64=15,
34-
InstructionSet_Dp_Arm64=16,
35-
InstructionSet_Rdm_Arm64=17,
36-
InstructionSet_Sha1_Arm64=18,
37-
InstructionSet_Sha256_Arm64=19,
30+
InstructionSet_Dczva=12,
31+
InstructionSet_ArmBase_Arm64=13,
32+
InstructionSet_AdvSimd_Arm64=14,
33+
InstructionSet_Aes_Arm64=15,
34+
InstructionSet_Crc32_Arm64=16,
35+
InstructionSet_Dp_Arm64=17,
36+
InstructionSet_Rdm_Arm64=18,
37+
InstructionSet_Sha1_Arm64=19,
38+
InstructionSet_Sha256_Arm64=20,
3839
#endif // TARGET_ARM64
3940
#ifdef TARGET_AMD64
4041
InstructionSet_X86Base=1,
@@ -457,6 +458,8 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet)
457458
return "Vector64";
458459
case InstructionSet_Vector128 :
459460
return "Vector128";
461+
case InstructionSet_Dczva :
462+
return "Dczva";
460463
#endif // TARGET_ARM64
461464
#ifdef TARGET_AMD64
462465
case InstructionSet_X86Base :

src/coreclr/inc/jiteeversionguid.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
//////////////////////////////////////////////////////////////////////////////////////////////////////////
3333
//
3434

35-
constexpr GUID JITEEVersionIdentifier = { /* 000b3acb-92d2-4003-8760-e545241dd9a8 */
36-
0x000b3acb,
37-
0x92d2,
38-
0x4003,
39-
{0x87, 0x60, 0xe5, 0x45, 0x24, 0x1d, 0xd9, 0xa8}
35+
constexpr GUID JITEEVersionIdentifier = { /* 960894e2-ec41-4088-82bb-bdcbac4ac2d3 */
36+
0x960894e2,
37+
0xec41,
38+
0x4088,
39+
{0x82, 0xbb, 0xbd, 0xcb, 0xac, 0x4a, 0xc2, 0xd3}
4040
};
4141

4242
//////////////////////////////////////////////////////////////////////////////////////////////////////////

src/coreclr/jit/codegenarm64.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5454
// Default: false.
5555
//
5656
// Return Value:
57-
// returns true if the immediate was too large and tmpReg was used and modified.
57+
// returns true if the immediate was small enough to be encoded inside instruction. If not,
58+
// returns false meaning the immediate was too large and tmpReg was used and modified.
5859
//
5960
bool CodeGen::genInstrWithConstant(instruction ins,
6061
emitAttr attr,

0 commit comments

Comments
 (0)