mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Duktape: Use align-by-8 on all platforms by default
This reproduces upstream commit de7ae8a2ecc597e1c2024c15dbeae4d28c9f2a2c.
* de7ae8a2ec
It was applied to master after the release of Duktape 2.2.0. See also:
* https://github.com/svaarala/duktape/issues/1783
* https://github.com/svaarala/duktape/issues/812#issuecomment-337058737
This commit is contained in:
parent
0687687c37
commit
448228a30c
@ -850,12 +850,6 @@
|
|||||||
#if !defined(DUK_USE_BYTEORDER)
|
#if !defined(DUK_USE_BYTEORDER)
|
||||||
#define DUK_USE_BYTEORDER 1
|
#define DUK_USE_BYTEORDER 1
|
||||||
#endif
|
#endif
|
||||||
/* XXX: This is technically not guaranteed because it's possible to configure
|
|
||||||
* an x86 to require aligned accesses with Alignment Check (AC) flag.
|
|
||||||
*/
|
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 1
|
|
||||||
#endif
|
|
||||||
#define DUK_USE_PACKED_TVAL
|
#define DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_X64)
|
#elif defined(DUK_F_X64)
|
||||||
@ -864,12 +858,6 @@
|
|||||||
#if !defined(DUK_USE_BYTEORDER)
|
#if !defined(DUK_USE_BYTEORDER)
|
||||||
#define DUK_USE_BYTEORDER 1
|
#define DUK_USE_BYTEORDER 1
|
||||||
#endif
|
#endif
|
||||||
/* XXX: This is technically not guaranteed because it's possible to configure
|
|
||||||
* an x86 to require aligned accesses with Alignment Check (AC) flag.
|
|
||||||
*/
|
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 1
|
|
||||||
#endif
|
|
||||||
#undef DUK_USE_PACKED_TVAL
|
#undef DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_X32)
|
#elif defined(DUK_F_X32)
|
||||||
@ -878,48 +866,30 @@
|
|||||||
#if !defined(DUK_USE_BYTEORDER)
|
#if !defined(DUK_USE_BYTEORDER)
|
||||||
#define DUK_USE_BYTEORDER 1
|
#define DUK_USE_BYTEORDER 1
|
||||||
#endif
|
#endif
|
||||||
/* XXX: This is technically not guaranteed because it's possible to configure
|
|
||||||
* an x86 to require aligned accesses with Alignment Check (AC) flag.
|
|
||||||
*/
|
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 1
|
|
||||||
#endif
|
|
||||||
#define DUK_USE_PACKED_TVAL
|
#define DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_ARM32)
|
#elif defined(DUK_F_ARM32)
|
||||||
/* --- ARM 32-bit --- */
|
/* --- ARM 32-bit --- */
|
||||||
#define DUK_USE_ARCH_STRING "arm32"
|
#define DUK_USE_ARCH_STRING "arm32"
|
||||||
/* Byte order varies, so rely on autodetect. */
|
/* Byte order varies, so rely on autodetect. */
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 4
|
|
||||||
#endif
|
|
||||||
#define DUK_USE_PACKED_TVAL
|
#define DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_ARM64)
|
#elif defined(DUK_F_ARM64)
|
||||||
/* --- ARM 64-bit --- */
|
/* --- ARM 64-bit --- */
|
||||||
#define DUK_USE_ARCH_STRING "arm64"
|
#define DUK_USE_ARCH_STRING "arm64"
|
||||||
/* Byte order varies, so rely on autodetect. */
|
/* Byte order varies, so rely on autodetect. */
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#undef DUK_USE_PACKED_TVAL
|
#undef DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_MIPS32)
|
#elif defined(DUK_F_MIPS32)
|
||||||
/* --- MIPS 32-bit --- */
|
/* --- MIPS 32-bit --- */
|
||||||
#define DUK_USE_ARCH_STRING "mips32"
|
#define DUK_USE_ARCH_STRING "mips32"
|
||||||
/* MIPS byte order varies so rely on autodetection. */
|
/* MIPS byte order varies so rely on autodetection. */
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#define DUK_USE_PACKED_TVAL
|
#define DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_MIPS64)
|
#elif defined(DUK_F_MIPS64)
|
||||||
/* --- MIPS 64-bit --- */
|
/* --- MIPS 64-bit --- */
|
||||||
#define DUK_USE_ARCH_STRING "mips64"
|
#define DUK_USE_ARCH_STRING "mips64"
|
||||||
/* MIPS byte order varies so rely on autodetection. */
|
/* MIPS byte order varies so rely on autodetection. */
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#undef DUK_USE_PACKED_TVAL
|
#undef DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_PPC32)
|
#elif defined(DUK_F_PPC32)
|
||||||
@ -928,9 +898,6 @@
|
|||||||
#if !defined(DUK_USE_BYTEORDER)
|
#if !defined(DUK_USE_BYTEORDER)
|
||||||
#define DUK_USE_BYTEORDER 3
|
#define DUK_USE_BYTEORDER 3
|
||||||
#endif
|
#endif
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#define DUK_USE_PACKED_TVAL
|
#define DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_PPC64)
|
#elif defined(DUK_F_PPC64)
|
||||||
@ -939,27 +906,18 @@
|
|||||||
#if !defined(DUK_USE_BYTEORDER)
|
#if !defined(DUK_USE_BYTEORDER)
|
||||||
#define DUK_USE_BYTEORDER 3
|
#define DUK_USE_BYTEORDER 3
|
||||||
#endif
|
#endif
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#undef DUK_USE_PACKED_TVAL
|
#undef DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_SPARC32)
|
#elif defined(DUK_F_SPARC32)
|
||||||
/* --- SPARC 32-bit --- */
|
/* --- SPARC 32-bit --- */
|
||||||
#define DUK_USE_ARCH_STRING "sparc32"
|
#define DUK_USE_ARCH_STRING "sparc32"
|
||||||
/* SPARC byte order varies so rely on autodetection. */
|
/* SPARC byte order varies so rely on autodetection. */
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#define DUK_USE_PACKED_TVAL
|
#define DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_SPARC64)
|
#elif defined(DUK_F_SPARC64)
|
||||||
/* --- SPARC 64-bit --- */
|
/* --- SPARC 64-bit --- */
|
||||||
#define DUK_USE_ARCH_STRING "sparc64"
|
#define DUK_USE_ARCH_STRING "sparc64"
|
||||||
/* SPARC byte order varies so rely on autodetection. */
|
/* SPARC byte order varies so rely on autodetection. */
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#undef DUK_USE_PACKED_TVAL
|
#undef DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_SUPERH)
|
#elif defined(DUK_F_SUPERH)
|
||||||
@ -969,9 +927,6 @@
|
|||||||
/* Based on 'make checkalign' there are no alignment requirements on
|
/* Based on 'make checkalign' there are no alignment requirements on
|
||||||
* Linux SH4, but align by 4 is probably a good basic default.
|
* Linux SH4, but align by 4 is probably a good basic default.
|
||||||
*/
|
*/
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 4
|
|
||||||
#endif
|
|
||||||
#define DUK_USE_PACKED_TVAL
|
#define DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_M68K)
|
#elif defined(DUK_F_M68K)
|
||||||
@ -980,9 +935,6 @@
|
|||||||
#if !defined(DUK_USE_BYTEORDER)
|
#if !defined(DUK_USE_BYTEORDER)
|
||||||
#define DUK_USE_BYTEORDER 3
|
#define DUK_USE_BYTEORDER 3
|
||||||
#endif
|
#endif
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#define DUK_USE_PACKED_TVAL
|
#define DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#elif defined(DUK_F_EMSCRIPTEN)
|
#elif defined(DUK_F_EMSCRIPTEN)
|
||||||
@ -991,9 +943,6 @@
|
|||||||
#if !defined(DUK_USE_BYTEORDER)
|
#if !defined(DUK_USE_BYTEORDER)
|
||||||
#define DUK_USE_BYTEORDER 1
|
#define DUK_USE_BYTEORDER 1
|
||||||
#endif
|
#endif
|
||||||
#if !defined(DUK_USE_ALIGN_BY)
|
|
||||||
#define DUK_USE_ALIGN_BY 8
|
|
||||||
#endif
|
|
||||||
#undef DUK_USE_PACKED_TVAL
|
#undef DUK_USE_PACKED_TVAL
|
||||||
#define DUK_F_PACKED_TVAL_PROVIDED
|
#define DUK_F_PACKED_TVAL_PROVIDED
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user