Skip to content

Commit 88e7dc4

Browse files
committed
Address comments
1 parent 12e1815 commit 88e7dc4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler-rt/lib/builtins/aarch64/sme-abi.S

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,16 @@ DEFINE_COMPILERRT_FUNCTION(__arm_sme_state_size)
210210
.variant_pcs __arm_sme_state_size
211211
BTI_C
212212

213-
// Test if SME is available and PSTATE = 1.
213+
// Test if SME is available and ZA state is 'active'.
214214
adrp x16, CPU_FEATS_SYMBOL
215215
ldr x16, [x16, CPU_FEATS_SYMBOL_OFFSET]
216216
tbz x16, #FEAT_SME_BIT, 0f
217217
mrs x16, SVCR
218218
tbz x16, #1, 0f
219+
mrs x16, TPIDR2_EL0
220+
cbnz x16, 0f
219221

220-
// Size = HAS_FEAT_SME2 ? 32 : 96
222+
// Size = HAS_FEAT_SME2 ? 96 : 32
221223
adrp x16, CPU_FEATS_SYMBOL
222224
ldr x16, [x16, CPU_FEATS_SYMBOL_OFFSET]
223225
tst x16, #FEAT_SME2_MASK

0 commit comments

Comments
 (0)