mirror of https://github.com/PCSX2/pcsx2.git
Linux: A more complete rendition of the GCC compilation fix. Note: GCC requires non-const qualifiers on function pointers and function pointer-templated parameters, but not on void* (didn't know they were that different, did you?).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1057 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
e3b217c57a
commit
4f08dc6bad
|
@ -64,3 +64,4 @@ void DispatcherReg();
|
|||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -218,3 +218,4 @@ namespace StateRecovery
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
// Special form for calling functions. This form automatically resolves the
|
||||
// correct displacement based on the size of the instruction being generated.
|
||||
template< typename T >
|
||||
__forceinline void operator()( const T* func ) const
|
||||
__forceinline void operator()( T* func ) const
|
||||
{
|
||||
if( isJmp )
|
||||
xJccKnownTarget( Jcc_Unconditional, (void*)(uptr)func, false ); // double cast to/from (uptr) needed to appease GCC
|
||||
|
|
|
@ -208,7 +208,7 @@ namespace x86Emitter
|
|||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// JMP / Jcc Instructions!
|
||||
|
||||
extern void xJcc( JccComparisonType comparison, void* target );
|
||||
extern void xJcc( JccComparisonType comparison, const void* target );
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Conditional jumps to fixed targets.
|
||||
|
|
|
@ -81,7 +81,7 @@ xSmartJump::~xSmartJump()
|
|||
// slideForward - used internally by xSmartJump to indicate that the jump target is going
|
||||
// to slide forward in the event of an 8 bit displacement.
|
||||
//
|
||||
__emitinline void Internal::xJccKnownTarget( JccComparisonType comparison, void* target, bool slideForward )
|
||||
__emitinline void Internal::xJccKnownTarget( JccComparisonType comparison, const void* target, bool slideForward )
|
||||
{
|
||||
// Calculate the potential j8 displacement first, assuming an instruction length of 2:
|
||||
sptr displacement8 = (sptr)target - ((sptr)xGetPtr() + 2);
|
||||
|
@ -115,9 +115,10 @@ __emitinline void Internal::xJccKnownTarget( JccComparisonType comparison, void*
|
|||
|
||||
// Low-level jump instruction! Specify a comparison type and a target in void* form, and
|
||||
// a jump (either 8 or 32 bit) is generated.
|
||||
__emitinline void xJcc( JccComparisonType comparison, void* target )
|
||||
__emitinline void xJcc( JccComparisonType comparison, const void* target )
|
||||
{
|
||||
xJccKnownTarget( comparison, target, false );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -254,3 +254,4 @@ __forceinline void FreezeXMMRegs_(int save)
|
|||
#ifndef __INTEL_COMPILER
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -686,7 +686,7 @@ __forceinline void xWrite( T val )
|
|||
extern void SimdPrefix( u8 prefix, u16 opcode );
|
||||
extern void EmitSibMagic( uint regfield, const void* address );
|
||||
extern void EmitSibMagic( uint regfield, const ModSibBase& info );
|
||||
extern void xJccKnownTarget( JccComparisonType comparison, void* target, bool slideForward );
|
||||
extern void xJccKnownTarget( JccComparisonType comparison, const void* target, bool slideForward );
|
||||
|
||||
|
||||
// Writes a ModRM byte for "Direct" register access forms, which is used for all
|
||||
|
|
Loading…
Reference in New Issue