AK/SIMD: Suppress psabi warnings and add explanatory comment

This commit is contained in:
Stephan Unverwerth 2022-01-09 16:07:13 +01:00 committed by Linus Groh
parent 4a428ba252
commit f9c5c120f6
2 changed files with 14 additions and 10 deletions

View file

@ -8,10 +8,12 @@
#include <AK/SIMD.h>
// Returning a vector on i686 target generates warning "psabi".
// This prevents the CI, treating this as an error, from running to completion.
// Functions returning vectors or accepting vector arguments have different calling conventions
// depending on whether the target architecture supports SSE or not. GCC generates warning "psabi"
// when compiling for non-SSE architectures. We disable this warning because these functions
// are static and should never be visible from outside the translation unit that includes this header.
#pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Wpsabi"
#pragma GCC diagnostic ignored "-Wpsabi"
namespace AK::SIMD {
@ -141,6 +143,6 @@ ALWAYS_INLINE static void store4_masked(VectorType v, UnderlyingType* a, Underly
*d = v[3];
}
#pragma GCC diagnostic pop
}
#pragma GCC diagnostic pop

View file

@ -9,10 +9,12 @@
#include <AK/SIMD.h>
#include <math.h>
// Returning a vector on i686 target generates warning "psabi".
// This prevents the CI, treating this as an error, from running to completion.
// Functions returning vectors or accepting vector arguments have different calling conventions
// depending on whether the target architecture supports SSE or not. GCC generates warning "psabi"
// when compiling for non-SSE architectures. We disable this warning because these functions
// are static and should never be visible from outside the translation unit that includes this header.
#pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Wpsabi"
#pragma GCC diagnostic ignored "-Wpsabi"
namespace AK::SIMD {
@ -57,6 +59,6 @@ ALWAYS_INLINE static f32x4 exp(f32x4 v)
};
}
#pragma GCC diagnostic pop
}
#pragma GCC diagnostic pop