Skip to content

Commit

Permalink
SPUThread.cpp: remove "__attribute__((always_inline))"
Browse files Browse the repository at this point in the history
cmp_rdata and mov_rdata are using __attribute__((always_inline)),
without inline, that is not supported on current g++ (see #1546).

Moreover __attribute__((always_inline)) is a noop if used without inline so
just remove it.

A proper fix is to move the 2 functions in an header file as static
(with FORCE_INLINE) so it can be correctly inlined by the compiler.
  • Loading branch information
drizzt committed Mar 3, 2021
1 parent 8b8120c commit 9d0ff65
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions rpcs3/Emu/Cell/SPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ static FORCE_INLINE bool cmp_rdata_avx(const __m256i* lhs, const __m256i* rhs)

#ifdef _MSC_VER
__forceinline
#else
__attribute__((always_inline))
#endif
extern bool cmp_rdata(const spu_rdata_t& _lhs, const spu_rdata_t& _rhs)
{
Expand Down Expand Up @@ -189,8 +187,6 @@ static FORCE_INLINE void mov_rdata_avx(__m256i* dst, const __m256i* src)

#ifdef _MSC_VER
__forceinline
#else
__attribute__((always_inline))
#endif
extern void mov_rdata(spu_rdata_t& _dst, const spu_rdata_t& _src)
{
Expand Down

0 comments on commit 9d0ff65

Please sign in to comment.