Files
haikuports/app-benchmarks/stress-ng/patches/stress_ng_x86-0.18.06.patchset
2024-11-07 11:52:31 +01:00

34 lines
1017 B
Plaintext

From 42bb336358bc647e9ee891e7953a641094390c43 Mon Sep 17 00:00:00 2001
From: David Karoly <david.karoly@outlook.com>
Date: Fri, 26 Nov 2021 17:45:23 +0000
Subject: disable too large alignment on 32-bit Haiku
diff --git a/stress-vecfp.c b/stress-vecfp.c
index b2287b2..c0404ed 100644
--- a/stress-vecfp.c
+++ b/stress-vecfp.c
@@ -63,11 +63,19 @@ typedef double (*stress_vecfp_func_t)(
/*
* float vectors, named by vfloatwN where N = number of elements width
*/
+#ifdef __HAIKU__
+#define VEC_TYPE_T(type, elements) \
+typedef union { \
+ type v __attribute__ ((vector_size(sizeof(type) * elements)));\
+ type f[elements]; \
+} stress_vecfp_ ## type ## _ ## elements ## _t;
+#else
#define VEC_TYPE_T(type, elements) \
typedef union { \
type v ALIGNED(2048) __attribute__ ((vector_size(sizeof(type) * elements)));\
type f[elements] ALIGNED(2048); \
} stress_vecfp_ ## type ## _ ## elements ## _t;
+#endif
VEC_TYPE_T(float, 256)
VEC_TYPE_T(float, 128)
--
2.43.2