Fix multiple storage bug.
* __forceinline is the equivalent of __always_inline__ on Windows. It has
'extern' as storage, so static must not be used with it
* use __always_inline__ and not always_inline as attribute value instead.
No need to add storage class with __always_inline__ too.
* static inline is fine
SVN revision: 64767
AC_DEFUN([EFL_ATTRIBUTE_ALWAYS_INLINE],
[
-AC_MSG_CHECKING([for __attribute__ ((always_inline))])
+
+have_attribute_forceinline="no"
+
+AC_MSG_CHECKING([for __forceinline])
+
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
-__attribute__((always_inline)) inline void foo(void) {}
+#include <windows.h>
+__forceinline void foo(void) {}
]],
[[
]])],
- [have_attribute_always_inline="yes"],
+ [
+ have_attribute_always_inline="yes"
+ have_attribute_forceinline="yes"
+ ],
[have_attribute_always_inline="no"])
+
AC_MSG_RESULT([${have_attribute_always_inline}])
+if test "x${have_attribute_always_inline}" = "xno" ; then
+ AC_MSG_CHECKING([for __attribute__ ((always_inline))])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+__attribute__((always_inline)) inline void foo(void) {}
+ ]],
+ [[
+ ]])],
+ [have_attribute_always_inline="yes"],
+ [have_attribute_always_inline="no"])
+ AC_MSG_RESULT([${have_attribute_always_inline}])
+fi
+
if test "x${have_attribute_always_inline}" = "xyes" ; then
- AC_DEFINE([EFL_ALWAYS_INLINE], [__attribute__ ((always_inline)) inline], [Macro declaring a function to always be inlined.])
+ if test "x${have_attribute_forceinline}" = "xyes" ; then
+ AC_DEFINE([EFL_ALWAYS_INLINE], [__forceinline], [Macro declaring a function to always be inlined.])
+ else
+ AC_DEFINE([EFL_ALWAYS_INLINE], [__attribute__ ((always_inline)) inline], [Macro declaring a function to always be inlined.])
+ fi
else
AC_DEFINE([EFL_ALWAYS_INLINE], [inline], [Macro declaring a function to always be inlined.])
fi
{ 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 }
};
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha,
const int x, const int y)
{
_soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->cache_entry.w);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst,
const int x, const int y)
{
#include "evas_common_soft16.h"
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_glyph_pt_mask_solid_solid(DATA16 *dst,
const DATA16 rgb565,
const DATA32 rgb565_unpack,
_glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_glyph_pt_mask_transp_solid(DATA16 *dst,
DATA32 rgb565_unpack,
DATA8 alpha,
}
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DATA8 alpha)
{
if (alpha == 32)
* Regular blend operations
*/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha)
{
if (alpha == 31) *p_dst = src;
}
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src)
{
*p_dst = src;
* Blend operations taking an extra alpha (fade in, out)
*/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha)
{
DATA32 a, b;
*p_dst = RGB_565_PACK(b);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha)
{
DATA32 a, b;
* Blend operations with extra alpha and multiply color
*/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
{
DATA32 rgb, d;
*p_dst = RGB_565_PACK(d);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
{
int r1, g1, b1;
* Blend operations with extra multiply color
*/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 r, DATA8 g, DATA8 b)
{
int r1, g1, b1;
}
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_blend_solid_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA16 r, DATA16 g, DATA16 b)
{
int r1, g1, b1;
* _soft16_scanline_<description>_<src>_<dst>[_<modifier>]()
*
****************************************************************************/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_fill_solid_solid(DATA16 *dst, DATA16 rgb565)
{
*dst = rgb565;
*start = rgb565;
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft16_pt_fill_transp_solid(DATA16 *dst, DATA32 rgb565_unpack, DATA8 alpha)
{
DATA32 d;
#include "evas_common_soft8.h"
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_convert_from_rgba_pt(const DATA32 * src, DATA8 * dst, DATA8 * alpha)
{
if (A_VAL(src) == 0)
_soft8_convert_from_rgba_scanline(sp, dp, ap, im->cache_entry.w);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst)
{
*dst = GRY_8_FROM_RGB(src);
#include "evas_common_soft8.h"
#include "evas_soft8_scanline_blend.c"
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_glyph_pt_mask_solid_solid(DATA8 * dst, const DATA8 gry8, const DATA8 * mask)
{
DATA8 alpha = *mask;
_glyph_pt_mask_solid_solid(start, gry8, mask);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_glyph_pt_mask_transp_solid(DATA8 * dst,
DATA8 gry8, DATA8 alpha, const DATA8 * mask)
{
}
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_line_aliased_pt(DATA8 * dst_itr, DATA8 gry8, DATA8 alpha)
{
if (alpha == 32)
*
****************************************************************************/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_blend_transp_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha)
{
if (alpha == 0xff)
_soft8_pt_blend_transp_solid(start, *src, *alpha);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_blend_solid_solid(DATA8 * p_dst, DATA8 src)
{
*p_dst = src;
_soft8_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_blend_solid_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha)
{
*p_dst = GRY_8_BLEND_UNMUL(src, *p_dst, rel_alpha);
* Blend operations with extra alpha and multiply color
*/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_blend_transp_solid_mul_color_transp(DATA8 * p_dst, DATA8 src,
DATA8 alpha, DATA8 rel_alpha,
DATA8 r, DATA8 g, DATA8 b)
(start, *src, *alpha, rel_alpha, r, g, b);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_blend_solid_solid_mul_color_transp(DATA8 * p_dst, DATA8 src,
DATA8 rel_alpha, DATA8 r, DATA8 g,
DATA8 b)
/***********************************************************************
* Blend operations with extra multiply color
*/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_blend_transp_solid_mul_color_solid(DATA8 * p_dst, DATA8 src,
DATA8 alpha, DATA8 r, DATA8 g,
DATA8 b)
(start, *src, *alpha, r, g, b);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_blend_solid_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 r,
DATA8 g, DATA8 b)
{
* _soft8_scanline_<description>_<src>_<dst>[_<modifier>]()
*
****************************************************************************/
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_fill_solid_solid(DATA8 * dst, DATA8 gry8)
{
*dst = gry8;
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_scanline_fill_solid_solid(DATA8 * dst, int size, DATA8 gry8)
{
memset(dst, gry8, size);
}
-static EFL_ALWAYS_INLINE void
+EFL_ALWAYS_INLINE void
_soft8_pt_fill_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha)
{
*dst = GRY_8_BLEND(gry8, *dst, alpha);
static __m128i ALPHA_SSE3;
-static EFL_ALWAYS_INLINE __m128i
+EFL_ALWAYS_INLINE __m128i
mul_256_sse3(__m128i a, __m128i c) {
/* prepare alpha for word multiplication */
return _mm_add_epi32(c0, c1);
}
-static EFL_ALWAYS_INLINE __m128i
+EFL_ALWAYS_INLINE __m128i
sub4_alpha_sse3(__m128i c) {
__m128i c0 = c;
return _mm_sub_epi32(ALPHA_SSE3, c0);
}
-static EFL_ALWAYS_INLINE __m128i
+EFL_ALWAYS_INLINE __m128i
interp4_256_sse3(__m128i a, __m128i c0, __m128i c1)
{
const __m128i zero = _mm_setzero_si128();
return (__m128i) _mm_shuffle_ps( (__m128)cl_sub, (__m128)ch_sub, 0x44);
}
-static EFL_ALWAYS_INLINE __m128i
+EFL_ALWAYS_INLINE __m128i
mul_sym_sse3(__m128i a, __m128i c) {
/* Prepare alpha for word mult */
return _mm_add_epi32(c0, c1);
}
-static EFL_ALWAYS_INLINE __m128i
+EFL_ALWAYS_INLINE __m128i
mul4_sym_sse3(__m128i x, __m128i y) {
const __m128i zero = _mm_setzero_si128();
return _mm_packus_epi16(r_l, r_h);
}
-static EFL_ALWAYS_INLINE __m128i
+EFL_ALWAYS_INLINE __m128i
mul3_sym_sse3(__m128i x, __m128i y) {
__m128i res = mul4_sym_sse3(x, y);