Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Gramner <gramner@twoorioles.com>2020-01-24 22:34:18 +0300
committerHenrik Gramner <gramner@twoorioles.com>2020-01-29 16:11:38 +0300
commit9c29f229c5aa7d2d9564d44e8932011f23ac4e77 (patch)
tree472a3309d45b5be2a20fb2d3fe2a70d0aafc2174 /include
parent361a3c8ee2d03f87f42a76213ee0f93e49fa9ec3 (diff)
checkasm: Increase buffer alignment to 64-byte on x86-64
Required for AVX-512.
Diffstat (limited to 'include')
-rw-r--r--include/common/attributes.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/common/attributes.h b/include/common/attributes.h
index 4bd8217..d5c4ce5 100644
--- a/include/common/attributes.h
+++ b/include/common/attributes.h
@@ -43,15 +43,18 @@
#endif
#if ARCH_X86_64
-/* x86-64 needs 32-byte alignment for AVX2. */
+/* x86-64 needs 32- and 64-byte alignment for AVX2 and AVX-512. */
+#define ALIGN_64_VAL 64
#define ALIGN_32_VAL 32
#define ALIGN_16_VAL 16
#elif ARCH_X86_32 || ARCH_ARM || ARCH_AARCH64 || ARCH_PPC64LE
/* ARM doesn't benefit from anything more than 16-byte alignment. */
+#define ALIGN_64_VAL 16
#define ALIGN_32_VAL 16
#define ALIGN_16_VAL 16
#else
/* No need for extra alignment on platforms without assembly. */
+#define ALIGN_64_VAL 8
#define ALIGN_32_VAL 8
#define ALIGN_16_VAL 8
#endif
@@ -76,9 +79,10 @@
* becomes:
* ALIGN_STK_$align(uint8_t, var, 1, [2][3][4])
*/
+#define ALIGN_STK_64(type, var, sz1d, sznd) \
+ ALIGN(type var[sz1d]sznd, ALIGN_64_VAL)
#define ALIGN_STK_32(type, var, sz1d, sznd) \
ALIGN(type var[sz1d]sznd, ALIGN_32_VAL)
-// as long as stack is itself 16-byte aligned, this works (win64, gcc)
#define ALIGN_STK_16(type, var, sz1d, sznd) \
ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)