Skip to content

Commit 83b2eca

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix v142 ARM64 hash and floating point results (#24317)
2 parents 10d64c6 + 3813c09 commit 83b2eca

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎ext/hash/murmur/PMurHash.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ on big endian machines, or a byte-by-byte read if the endianess is unknown.
6767
#define UNALIGNED_SAFE
6868
#endif
6969

70+
/* Avoid miscompiled aligned reads with the v142 ARM64 optimizer. */
71+
#if defined(_MSC_VER) && _MSC_VER < 1930 && defined(_M_ARM64) && !defined(__clang__)
72+
#define UNALIGNED_SAFE
73+
#endif
74+
7075
/* Find best way to ROTL */
7176
#if defined(_MSC_VER)
7277
#define FORCE_INLINE static __forceinline

‎win32/build/config.w32.h.in‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
#define DEFAULT_SHORT_OPEN_TAG "1"
2626

2727
/* Platform-Specific Configuration. Should not be changed. */
28+
/* Match -ffp-contract=off on toolsets that enable ARM64 contractions by default. */
29+
#if defined(_MSC_VER) && _MSC_VER < 1930 && defined(_M_ARM64) && !defined(__clang__)
30+
# pragma fp_contract(off)
31+
#endif
32+
2833
/* Alignment for Zend memory allocator */
2934
#define ZEND_MM_ALIGNMENT (size_t)8
3035
#define ZEND_MM_ALIGNMENT_LOG2 (size_t)3

0 commit comments

Comments
 (0)