early-access version 2853
This commit is contained in:
26
externals/vcpkg/ports/sdl2-gfx/001-lrint-arm64.patch
vendored
Executable file
26
externals/vcpkg/ports/sdl2-gfx/001-lrint-arm64.patch
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
diff --git a/SDL2_gfxPrimitives.c b/SDL2_gfxPrimitives.c
|
||||
index f81e6da..91817fd 100755
|
||||
--- a/SDL2_gfxPrimitives.c
|
||||
+++ b/SDL2_gfxPrimitives.c
|
||||
@@ -1771,8 +1771,20 @@ __declspec(naked) long int
|
||||
__emit(0xE12FFF1E); // bx lr
|
||||
}
|
||||
#pragma warning(pop)
|
||||
+#elif defined(_M_ARM64)
|
||||
+#include <intrin.h>
|
||||
+#pragma warning(push)
|
||||
+#pragma warning(disable: 4716)
|
||||
+__declspec(naked) long
|
||||
+ lrint (double f)
|
||||
+{
|
||||
+ __emit(0x1e674000); // frintx d0, d0
|
||||
+ __emit(0x9e780000); // fcvtzs x0, d0
|
||||
+ __emit(0xd65f03c0); // ret
|
||||
+}
|
||||
+#pragma warning(pop)
|
||||
#else
|
||||
-#error lrint needed for MSVC on non X86/AMD64/ARM targets.
|
||||
+#error lrint needed for MSVC on non X86/AMD64/ARM/ARM64 targets.
|
||||
#endif
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user