From 27bc4ba40597923b3680ccac0cfe286c17fe8ef6 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sat, 16 Aug 2014 18:19:35 -0700 Subject: [PATCH] Removing XEINLINE*. --- src/alloy/vec128.h | 6 +++--- src/xenia/core/hash.cc | 4 ++-- src/xenia/gpu/xenos/xenos.h | 6 +++--- src/xenia/types.h | 17 ----------------- 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/src/alloy/vec128.h b/src/alloy/vec128.h index 7d251b0ff..cedb39bc9 100644 --- a/src/alloy/vec128.h +++ b/src/alloy/vec128.h @@ -42,7 +42,7 @@ typedef struct XECACHEALIGN vec128_s { return low == b.low && high == b.high; } } vec128_t; -XEFORCEINLINE vec128_t vec128i(uint32_t x, uint32_t y, uint32_t z, uint32_t w) { +static inline vec128_t vec128i(uint32_t x, uint32_t y, uint32_t z, uint32_t w) { vec128_t v; v.i4[0] = x; v.i4[1] = y; @@ -50,7 +50,7 @@ XEFORCEINLINE vec128_t vec128i(uint32_t x, uint32_t y, uint32_t z, uint32_t w) { v.i4[3] = w; return v; } -XEFORCEINLINE vec128_t vec128f(float x, float y, float z, float w) { +static inline vec128_t vec128f(float x, float y, float z, float w) { vec128_t v; v.f4[0] = x; v.f4[1] = y; @@ -58,7 +58,7 @@ XEFORCEINLINE vec128_t vec128f(float x, float y, float z, float w) { v.f4[3] = w; return v; } -XEFORCEINLINE vec128_t vec128b(uint8_t x0, uint8_t x1, uint8_t x2, uint8_t x3, +static inline vec128_t vec128b(uint8_t x0, uint8_t x1, uint8_t x2, uint8_t x3, uint8_t y0, uint8_t y1, uint8_t y2, uint8_t y3, uint8_t z0, uint8_t z1, uint8_t z2, uint8_t z3, uint8_t w0, uint8_t w1, uint8_t w2, uint8_t w3) { diff --git a/src/xenia/core/hash.cc b/src/xenia/core/hash.cc index 4e7785d38..d2b9afb06 100644 --- a/src/xenia/core/hash.cc +++ b/src/xenia/core/hash.cc @@ -63,11 +63,11 @@ inline uint64_t Hash128to64(const uint128_t &x) { return b; } -XEFORCEINLINE uint64_t UNALIGNED_LOAD64(const char *p) { +inline uint64_t UNALIGNED_LOAD64(const char *p) { const uint64_t *p64 = (const uint64_t *)p; return *p64; } -XEFORCEINLINE uint32_t UNALIGNED_LOAD32(const char *p) { +inline uint32_t UNALIGNED_LOAD32(const char *p) { const uint32_t *p32 = (const uint32_t *)p; return *p32; } diff --git a/src/xenia/gpu/xenos/xenos.h b/src/xenia/gpu/xenos/xenos.h index ccd9a174d..c224f336b 100644 --- a/src/xenia/gpu/xenos/xenos.h +++ b/src/xenia/gpu/xenos/xenos.h @@ -73,7 +73,7 @@ typedef enum { XE_GPU_SWIZZLE_R000 = XE_GPU_MAKE_SWIZZLE(R, 0, 0, 0), } XE_GPU_SWIZZLE; -XEFORCEINLINE uint32_t GpuSwap(uint32_t value, XE_GPU_ENDIAN endianness) { +inline uint32_t GpuSwap(uint32_t value, XE_GPU_ENDIAN endianness) { switch (endianness) { default: case XE_GPU_ENDIAN_NONE: // No swap. @@ -89,11 +89,11 @@ XEFORCEINLINE uint32_t GpuSwap(uint32_t value, XE_GPU_ENDIAN endianness) { } } -XEFORCEINLINE uint32_t GpuToCpu(uint32_t p) { +inline uint32_t GpuToCpu(uint32_t p) { return p; } -XEFORCEINLINE uint32_t GpuToCpu(uint32_t base, uint32_t p) { +inline uint32_t GpuToCpu(uint32_t base, uint32_t p) { uint32_t upper = base & 0xFF000000; uint32_t lower = p & 0x00FFFFFF; return upper + lower;// -(((base >> 20) + 0x200) & 0x1000); diff --git a/src/xenia/types.h b/src/xenia/types.h index 41aea7c3b..559fc9917 100644 --- a/src/xenia/types.h +++ b/src/xenia/types.h @@ -33,23 +33,6 @@ class name; \ } } } } -#if XE_COMPILER_MSVC -// http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx -#define XEFORCEINLINE static __forceinline -#define XENOINLINE __declspec(noinline) -#elif XE_COMPILER_GNUC -// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html -#if (__GNUC__ >= 4) -#define XEFORCEINLINE static __inline__ __attribute__((always_inline)) -#else -#define XEFORCEINLINE static __inline__ -#endif -#define XENOINLINE -#else -#define XEFORCEINLINE -#define XENOINLINE -#endif // MSVC - #if XE_COMPILER_MSVC #define XEPACKEDSTRUCT(name, value) \ __pragma(pack(push, 1)) struct name##_s value __pragma(pack(pop)); \