mirror of https://github.com/libsdl-org/SDL.git
Fix -Wundef warnings due to use of unguarded SDL_SSE_INTRINSICS
This commit is contained in:
parent
547f53c4ba
commit
9d70a57416
|
|
@ -181,7 +181,7 @@ static void SDLCALL SDL_TARGETING("sse3") SDL_ConvertStereoToMono_SSE3(SDL_Audio
|
|||
}
|
||||
#endif
|
||||
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
/* Convert from mono to stereo. Duplicate to stereo left and right. */
|
||||
static void SDLCALL SDL_TARGETING("sse") SDL_ConvertMonoToStereo_SSE(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||
{
|
||||
|
|
@ -842,7 +842,7 @@ static int SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
|
|||
}
|
||||
} else if (channel_converter == SDL_ConvertMonoToStereo) {
|
||||
SDL_AudioFilter filter = NULL;
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
if (!filter && SDL_HasSSE()) {
|
||||
filter = SDL_ConvertMonoToStereo_SSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include "SDL_blit.h"
|
||||
#include "SDL_blit_copy.h"
|
||||
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
/* This assumes 16-byte aligned src and dst */
|
||||
static SDL_INLINE void SDL_TARGETING("sse") SDL_memcpySSE(Uint8 *dst, const Uint8 *src, int len)
|
||||
{
|
||||
|
|
@ -136,7 +136,7 @@ void SDL_BlitCopy(SDL_BlitInfo *info)
|
|||
return;
|
||||
}
|
||||
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
if (SDL_HasSSE() &&
|
||||
!((uintptr_t)src & 15) && !(srcskip & 15) &&
|
||||
!((uintptr_t)dst & 15) && !(dstskip & 15)) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "SDL_blit.h"
|
||||
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
|
|
@ -376,7 +376,7 @@ int SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
|||
{
|
||||
color |= (color << 8);
|
||||
color |= (color << 16);
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
if (SDL_HasSSE()) {
|
||||
fill_function = SDL_FillSurfaceRect1SSE;
|
||||
break;
|
||||
|
|
@ -389,7 +389,7 @@ int SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
|||
case 2:
|
||||
{
|
||||
color |= (color << 16);
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
if (SDL_HasSSE()) {
|
||||
fill_function = SDL_FillSurfaceRect2SSE;
|
||||
break;
|
||||
|
|
@ -408,7 +408,7 @@ int SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
|||
|
||||
case 4:
|
||||
{
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
if (SDL_HasSSE()) {
|
||||
fill_function = SDL_FillSurfaceRect4SSE;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ SDL_TARGETING("mmx") static void kernel_ints_add_mmx(Sint32 *dest, const Sint32
|
|||
}
|
||||
#endif
|
||||
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
SDL_TARGETING("sse") static void kernel_floats_add_sse(float *dest, const float *a, const float *b, size_t size) {
|
||||
for (; size >= 4; size -= 4, dest += 4, a += 4, b += 4) {
|
||||
_mm_storeu_ps(dest, _mm_add_ps(_mm_loadu_ps(a), _mm_loadu_ps (b)));
|
||||
|
|
@ -392,7 +392,7 @@ static int intrinsics_testSSE(void *arg)
|
|||
{
|
||||
if (SDL_HasSSE()) {
|
||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has SSE support.");
|
||||
#if SDL_SSE_INTRINSICS
|
||||
#if defined(SDL_SSE_INTRINSICS)
|
||||
{
|
||||
size_t size;
|
||||
float *dest, *a, *b;
|
||||
|
|
|
|||
Loading…
Reference in New Issue