mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 10:39:08 +08:00
268d7bb406
* [sdl2-gfx] Fixed build error ARM64 Windows 10 * [sdl2-gfx] Update CI baseline * [sdl2-gfx] Fixed function name * Revert ci.baseline.txt * Remove sdl2-gfx:arm64-windows from ci.baseline.txt Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
27 lines
681 B
Diff
27 lines
681 B
Diff
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
|
|
|