Skip to content

Commit

Permalink
neon {u,s}addh apply arm64 windows workaround only on msvc<1938 (#1121)
Browse files Browse the repository at this point in the history
  • Loading branch information
Changqing-JING authored Jan 12, 2024
1 parent c376610 commit 14311d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion simde/arm/neon/sqadd.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@

// Workaround on ARM64 windows due to windows SDK bug
// https://developercommunity.visualstudio.com/t/In-arm64_neonh-vsqaddb_u8-vsqaddh_u16/10271747?sort=newest
#if (defined _MSC_VER) && (defined SIMDE_ARM_NEON_A64V8_NATIVE)
#if (defined _MSC_VER) && (defined SIMDE_ARM_NEON_A64V8_NATIVE) && (_MSC_VER < 1938)
#pragma message ("Due to msvc bug, current version of msvc is supported by workaround. Recommend to update msvc")
#undef vsqaddb_u8
#define vsqaddb_u8(src1, src2) neon_usqadds8(__uint8ToN8_v(src1), __int8ToN8_v(src2)).n8_u8[0]
#undef vsqaddh_u16
Expand Down
3 changes: 2 additions & 1 deletion simde/arm/neon/uqadd.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ SIMDE_BEGIN_DECLS_

// Workaround on ARM64 windows due to windows SDK bug
// https://developercommunity.visualstudio.com/t/In-arm64_neonh-vsqaddb_u8-vsqaddh_u16/10271747?sort=newest
#if (defined _MSC_VER) && (defined SIMDE_ARM_NEON_A64V8_NATIVE)
#if (defined _MSC_VER) && (defined SIMDE_ARM_NEON_A64V8_NATIVE) && (_MSC_VER < 1938)
#pragma message ("Due to msvc bug, current version of msvc is supported by workaround. Recommend to update msvc")
#undef vuqaddh_s16
#define vuqaddh_s16(src1, src2) neon_suqadds16(__int16ToN16_v(src1), __uint16ToN16_v(src2)).n16_i16[0]
#undef vuqadds_s32
Expand Down

0 comments on commit 14311d6

Please sign in to comment.