mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 13:11:46 +03:00
AK/SIMD: Suppress psabi warnings and add explanatory comment
This commit is contained in:
parent
4a428ba252
commit
f9c5c120f6
Notes:
sideshowbarker
2024-07-17 21:17:50 +09:00
Author: https://github.com/sunverwerth Commit: https://github.com/SerenityOS/serenity/commit/f9c5c120f65 Pull-request: https://github.com/SerenityOS/serenity/pull/11767 Reviewed-by: https://github.com/linusg
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user