diff --git a/common/include/x86emitter/implement/jmpcall.h b/common/include/x86emitter/implement/jmpcall.h index 9fa094edbc..7f8ef72744 100644 --- a/common/include/x86emitter/implement/jmpcall.h +++ b/common/include/x86emitter/implement/jmpcall.h @@ -25,6 +25,12 @@ namespace x86Emitter { // Using GCC's always_inline attribute fixes it. This differs from __fi in that it // inlines *even in debug builds* which is (usually) undesirable. // ... except when it avoids compiler bugs. + + // Note: I try with -fabi-version=6 without success + // {standard input}: Assembler messages: + // {standard input}:30773: Error: symbol `_ZNK10x86Emitter13xImpl_JmpCallclIFvvEEEvPT_' is already defined + // pcsx2/CMakeFiles/PCSX2.dir/build.make:4550: recipe for target 'pcsx2/CMakeFiles/PCSX2.dir/x86/ix86-32/iR5900-32.cpp.o' failed + # define __always_inline_tmpl_fail __attribute__((always_inline)) #else # define __always_inline_tmpl_fail diff --git a/common/include/x86emitter/x86emitter.h b/common/include/x86emitter/x86emitter.h index 2de3d3a88e..46fa776118 100644 --- a/common/include/x86emitter/x86emitter.h +++ b/common/include/x86emitter/x86emitter.h @@ -49,37 +49,3 @@ // once most code is no longer dependent on them. #include "legacy_types.h" #include "legacy_instructions.h" - -// -------------------------------------------------------------------------------------- -// CallAddress Macros -- An Optimization work-around hack! -// -------------------------------------------------------------------------------------- -// MSVC 2008 fails to optimize direct invocation of static recompiled code buffers, instead -// insisting on "mov eax, immaddr; call eax". Likewise, GCC fails to optimize it also, unless -// the typecast is explicitly inlined. These macros account for these problems. -// -// But it turns out that MSVC is quite capable of optimising important code out of existance -// if we use these macros in our PGO builds, so it's better just to live with the inefficient call. - -#ifdef _MSC_HAS_FIXED_INLINE_ASM_PGO - -# define CallAddress( ptr ) \ - __asm{ call offset ptr } - -# define FastCallAddress( ptr, param1 ) \ - __asm{ __asm mov ecx, param1 __asm call offset ptr } - -# define FastCallAddress2( ptr, param1, param2 ) \ - __asm{ __asm mov ecx, param1 __asm mov edx, param2 __asm call offset ptr } - -#else - -# define CallAddress( ptr ) \ - ( (void (*)()) &(ptr)[0] )() - -# define FastCallAddress( ptr, param1 ) \ - ( (void (*)( int )) &(ptr)[0] )( param1 ) - -# define FastCallAddress2( ptr, param1, param2 ) \ - ( (void (*)( int, int )) &(ptr)[0] )( param1, param2 ) - -#endif