+#ifdef __ARM_NEON__
+
+/* NEON optimized blitter callers */
+#define make_neon_caller(name, neon_name) \
+extern void neon_name(void *dst, const void *src, int count); \
+static void name(SDL_BlitInfo *info) \
+{ \
+ int width = info->d_width; \
+ int height = info->d_height; \
+ Uint8 *src = info->s_pixels; \
+ Uint8 *dst = info->d_pixels; \
+ int srcskip = info->s_skip; \
+ int dstskip = info->d_skip; \
+\
+ while ( height-- ) { \
+ neon_name(dst, src, width); \
+ src += width * 4 + srcskip; \
+ dst += width * 4 + dstskip; \
+ } \
+}
+
+#define make_neon_callerS(name, neon_name) \
+extern void neon_name(void *dst, const void *src, int count, unsigned int alpha); \
+static void name(SDL_BlitInfo *info) \
+{ \
+ int width = info->d_width; \
+ int height = info->d_height; \
+ Uint8 *src = info->s_pixels; \
+ Uint8 *dst = info->d_pixels; \
+ int srcskip = info->s_skip; \
+ int dstskip = info->d_skip; \
+ unsigned alpha = info->src->alpha;\
+\
+ while ( height-- ) { \
+ neon_name(dst, src, width, alpha); \
+ src += width * 4 + srcskip; \
+ dst += width * 4 + dstskip; \
+ } \
+}
+
+make_neon_caller(BlitABGRtoXRGBalpha_neon, neon_ABGRtoXRGBalpha)
+make_neon_caller(BlitARGBtoXRGBalpha_neon, neon_ARGBtoXRGBalpha)
+make_neon_callerS(BlitABGRtoXRGBalphaS_neon, neon_ABGRtoXRGBalphaS)
+make_neon_callerS(BlitARGBtoXRGBalphaS_neon, neon_ARGBtoXRGBalphaS)
+
+#endif /* __ARM_NEON__ */
+