Merge pull request #2486 from Tilka/x86_32
Jit64: drop more x86_32 left-overs
This commit is contained in:
commit
210d7c4d54
|
@ -245,15 +245,10 @@ inline OpArg Imm8 (u8 imm) {return OpArg(imm, SCALE_IMM8);}
|
|||
inline OpArg Imm16(u16 imm) {return OpArg(imm, SCALE_IMM16);} //rarely used
|
||||
inline OpArg Imm32(u32 imm) {return OpArg(imm, SCALE_IMM32);}
|
||||
inline OpArg Imm64(u64 imm) {return OpArg(imm, SCALE_IMM64);}
|
||||
#ifdef _ARCH_64
|
||||
inline OpArg ImmPtr(const void* imm) {return Imm64((u64)imm);}
|
||||
#else
|
||||
inline OpArg ImmPtr(const void* imm) {return Imm32((u32)imm);}
|
||||
#endif
|
||||
|
||||
inline u32 PtrOffset(const void* ptr, const void* base)
|
||||
{
|
||||
#ifdef _ARCH_64
|
||||
s64 distance = (s64)ptr-(s64)base;
|
||||
if (distance >= 0x80000000LL ||
|
||||
distance < -0x80000000LL)
|
||||
|
@ -263,9 +258,6 @@ inline u32 PtrOffset(const void* ptr, const void* base)
|
|||
}
|
||||
|
||||
return (u32)distance;
|
||||
#else
|
||||
return (u32)ptr-(u32)base;
|
||||
#endif
|
||||
}
|
||||
|
||||
//usage: int a[]; ARRAY_OFFSET(a,10)
|
||||
|
|
|
@ -166,11 +166,7 @@ private:
|
|||
|
||||
void LoadAddrMaskToReg(int sbits, const void* ptr, u32 mask)
|
||||
{
|
||||
#ifdef _ARCH_64
|
||||
m_code->MOV(64, R(RSCRATCH), ImmPtr(ptr));
|
||||
#else
|
||||
m_code->MOV(32, R(RSCRATCH), ImmPtr(ptr));
|
||||
#endif
|
||||
// If we do not need to mask, we can do the sign extend while loading
|
||||
// from memory. If masking is required, we have to first zero extend,
|
||||
// then mask, then sign extend if needed (1 instr vs. 2/3).
|
||||
|
|
Loading…
Reference in New Issue