--- SwiftShader/src/System/Timer.cpp.orig	2023-07-13 18:12:10.770133700 +0200
+++ SwiftShader/src/System/Timer.cpp	2023-07-13 18:16:31.000139000 +0200
@@ -60,7 +60,13 @@
 {
 #if defined(_WIN32)
 #	if defined(_M_ARM64)
+#		if defined(__MINGW32__)
+	int64_t value;
+	__asm__ volatile("mrs %x0, PMCCNTR_EL0" : "=r" (value));
+	return value;
+#		else
 	return _ReadStatusReg(ARM64_PMCCNTR_EL0);
+#		endif
 #	else
 	return __rdtsc();
 #	endif
