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:
Jake.Stine 2009-04-24 13:49:00 +00:00
parent e3b217c57a
commit 4f08dc6bad
7 changed files with 33 additions and 29 deletions

View File

@ -64,3 +64,4 @@ void DispatcherReg();
}
#endif
#endif

View File

@ -218,3 +218,4 @@ namespace StateRecovery
}
#endif

View File

@ -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

View File

@ -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.

View File

@ -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 );
}
}

View File

@ -254,3 +254,4 @@ __forceinline void FreezeXMMRegs_(int save)
#ifndef __INTEL_COMPILER
}
#endif

View File

@ -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