summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2023-12-27 18:57:12 +0100
committerChristian Brabandt <cb@256bit.org>2023-12-27 18:57:12 +0100
commit38bea30f53da8e4a8847407404597b255b20334e (patch)
tree50a2fe61591f95fae57f20bedc44763c230e056f
parent65672ae1189e0638fb68856598b98a2b7ee2a0a8 (diff)
patch 9.0.2186: LTCG compile error ARM64 for write_charsv9.0.2186
Problem: LTCG compile error on Win/ARM64 for `write_chars()` Solution: Explicitly initialise the storage to use data rather than BSS (Saleem Abdulrasool) win32: add a workaround for a LTCG issue on Windows ARM64 It appears that the implicit initialisation which would push `g_coords` into BSS causes an aliasing issue with LTCG on ARM64. By explicitly initialising the value, we use usual data storage but prevent the aliasing. This allows the console version of VIM to run on Windows ARM64 again. fixes: #13453 closes: #13775 Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--src/os_win32.c5
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 2bf0fe7122..e5cfac7294 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -156,7 +156,10 @@ static HANDLE g_hConOut = INVALID_HANDLE_VALUE;
// Win32 Screen buffer,coordinate,console I/O information
static SMALL_RECT g_srScrollRegion;
-static COORD g_coord; // 0-based, but external coords are 1-based
+// This is explicitly initialised to work around a LTCG issue on Windows ARM64
+// (at least of 19.39.33321). This pushes this into the `.data` rather than
+// `.bss` which corrects code generation in `write_chars` (#13453).
+static COORD g_coord = {0, 0}; // 0-based, but external coords are 1-based
// The attribute of the screen when the editor was started
static WORD g_attrDefault = 7; // lightgray text on black background
diff --git a/src/version.c b/src/version.c
index 986b174389..5446a5264e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2186,
+/**/
2185,
/**/
2184,