mirror of https://github.com/PCSX2/pcsx2.git
x86emitter: extend lea/bswap
This commit is contained in:
parent
eb4db2152c
commit
4bc9cbc24f
|
@ -134,13 +134,14 @@ namespace x86Emitter
|
|||
// These are all defined inline or in ix86.cpp.
|
||||
//
|
||||
|
||||
extern void xBSWAP( const xRegister32& to );
|
||||
extern void xBSWAP( const xRegister32or64& to );
|
||||
|
||||
// ----- Lea Instructions (Load Effective Address) -----
|
||||
// Note: alternate (void*) forms of these instructions are not provided since those
|
||||
// forms are functionally equivalent to Mov reg,imm, and thus better written as MOVs
|
||||
// instead.
|
||||
|
||||
extern void xLEA( xRegister64 to, const xIndirectVoid& src, bool preserve_flags=false );
|
||||
extern void xLEA( xRegister32 to, const xIndirectVoid& src, bool preserve_flags=false );
|
||||
extern void xLEA( xRegister16 to, const xIndirectVoid& src, bool preserve_flags=false );
|
||||
|
||||
|
|
|
@ -907,11 +907,15 @@ static void EmitLeaMagic( const xRegisterInt& to, const xIndirectVoid& src, bool
|
|||
}
|
||||
}
|
||||
|
||||
__emitinline void xLEA( xRegister32 to, const xIndirectVoid& src, bool preserve_flags )
|
||||
__emitinline void xLEA( xRegister64 to, const xIndirectVoid& src, bool preserve_flags )
|
||||
{
|
||||
EmitLeaMagic( to, src, preserve_flags );
|
||||
}
|
||||
|
||||
__emitinline void xLEA( xRegister32 to, const xIndirectVoid& src, bool preserve_flags )
|
||||
{
|
||||
EmitLeaMagic( to, src, preserve_flags );
|
||||
}
|
||||
|
||||
__emitinline void xLEA( xRegister16 to, const xIndirectVoid& src, bool preserve_flags )
|
||||
{
|
||||
|
@ -1077,10 +1081,10 @@ __fi void xINT( u8 imm )
|
|||
|
||||
__fi void xINTO() { xWrite8(0xce); }
|
||||
|
||||
__emitinline void xBSWAP( const xRegister32& to )
|
||||
__emitinline void xBSWAP( const xRegister32or64& to )
|
||||
{
|
||||
xWrite8( 0x0F );
|
||||
xWrite8( 0xC8 | to.Id );
|
||||
xWrite8( 0xC8 | to->Id );
|
||||
}
|
||||
|
||||
static __aligned16 u64 xmm_data[iREGCNT_XMM*2];
|
||||
|
|
Loading…
Reference in New Issue