mirror of https://github.com/PCSX2/pcsx2.git
x86emitter: remove old unused macro
Add some notes for a GCC "bug"
This commit is contained in:
parent
41d13dc2c6
commit
afdf5cdfe2
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue