From 1dbbe685cd2ce421ab94b46228cd21ff90f8e9e9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 15 Mar 2015 04:28:53 +0100 Subject: [PATCH] Start using retro_inline.h for rewind.c --- rewind.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/rewind.c b/rewind.c index b34601fc22..2adbbb18ab 100644 --- a/rewind.c +++ b/rewind.c @@ -21,6 +21,7 @@ #include #include #include +#include #ifndef UINT16_MAX #define UINT16_MAX 0xffff @@ -82,12 +83,12 @@ size thisstart; /* These are called very few constant times per frame, * keep it as simple as possible. */ -static inline void write_size_t(void *ptr, size_t val) +static INLINE void write_size_t(void *ptr, size_t val) { memcpy(ptr, &val, sizeof(val)); } -static inline size_t read_size_t(const void *ptr) +static INLINE size_t read_size_t(const void *ptr) { size_t ret; @@ -274,7 +275,7 @@ void state_manager_push_where(state_manager_t *state, void **data) #if __SSE2__ #if defined(__GNUC__) -static inline int compat_ctz(unsigned x) +static INLINE int compat_ctz(unsigned x) { return __builtin_ctz(x); } @@ -283,7 +284,7 @@ static inline int compat_ctz(unsigned x) /* Only checks at nibble granularity, * because that's what we need. */ -static inline int compat_ctz(unsigned x) +static INLINE int compat_ctz(unsigned x) { if (x & 0x000f) return 0; @@ -301,7 +302,7 @@ static inline int compat_ctz(unsigned x) /* There's no equivalent in libc, you'd think so ... * std::mismatch exists, but it's not optimized at all. */ -static inline size_t find_change(const uint16_t *a, const uint16_t *b) +static INLINE size_t find_change(const uint16_t *a, const uint16_t *b) { const __m128i *a128 = (const __m128i*)a; const __m128i *b128 = (const __m128i*)b; @@ -325,7 +326,7 @@ static inline size_t find_change(const uint16_t *a, const uint16_t *b) } } #else -static inline size_t find_change(const uint16_t *a, const uint16_t *b) +static INLINE size_t find_change(const uint16_t *a, const uint16_t *b) { const uint16_t *a_org = a; #ifdef NO_UNALIGNED_MEM @@ -358,7 +359,7 @@ static inline size_t find_change(const uint16_t *a, const uint16_t *b) } #endif -static inline size_t find_same(const uint16_t *a, const uint16_t *b) +static INLINE size_t find_same(const uint16_t *a, const uint16_t *b) { const uint16_t *a_org = a; #ifdef NO_UNALIGNED_MEM