Fix -Wundef warnings due to use of unguarded SDL_SSE_INTRINSICS

This commit is contained in:
Anonymous Maarten
2023-03-27 19:01:40 +02:00
parent 547f53c4ba
commit 9d70a57416
4 changed files with 10 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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)) {

View File

@@ -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;