History

aarch64: Detect I8MM on Windows via SVE-I8MM

There's no direct processor feature constant for I8MM alone, but there is a flag for SVE-I8MM (added in WinSDK 10.0.26100 and recent versions of mingw-w64). If SVE-I8MM is available, we can assume that I8MM is available. While HW supporting these features isn't yet commonly running Windows, this at least allows detecting and running the I8MM codepaths in Windows builds in Wine (possibly running in QEMU).

Martin Storsjö committed 2 years ago

Commit 067abbf1 parent d55ab2b1 file · +7 −0Browse files

Unified · Split

libavutil/aarch64/cpu.c+7−0
@@ -112,6 +112,13 @@ static int detect_flags(void) · 111 unmodified lines
112#ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE112#ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE
113 if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))113 if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
114 flags |= AV_CPU_FLAG_DOTPROD;114 flags |= AV_CPU_FLAG_DOTPROD;
115#endif
116#ifdef PF_ARM_SVE_I8MM_INSTRUCTIONS_AVAILABLE
117 /* There's no PF_* flag that indicates whether plain I8MM is available
118 * or not. But if SVE_I8MM is available, that also implies that
119 * regular I8MM is available. */
120 if (IsProcessorFeaturePresent(PF_ARM_SVE_I8MM_INSTRUCTIONS_AVAILABLE))
121 flags |= AV_CPU_FLAG_I8MM;
115#endif122#endif
116 return flags;123 return flags;
117}124}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t