First steps towards 64-bit support in JITIL. Not yet working. yes, those crazy casts (u32)(u64)ptr makes sense when we know the ptr is below 4gig - then it's OK.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2164 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2009-02-08 22:20:35 +00:00
parent f5f99e8f04
commit 935eb226ca
3 changed files with 2135 additions and 2112 deletions

File diff suppressed because it is too large Load Diff

View File

@ -201,6 +201,7 @@ namespace IREmitter {
} }
class IRBuilder { class IRBuilder {
private:
InstLoc EmitZeroOp(unsigned Opcode, unsigned extra); InstLoc EmitZeroOp(unsigned Opcode, unsigned extra);
InstLoc EmitUOp(unsigned OpCode, InstLoc Op1, InstLoc EmitUOp(unsigned OpCode, InstLoc Op1,
unsigned extra = 0); unsigned extra = 0);
@ -229,7 +230,7 @@ namespace IREmitter {
unsigned ComputeKnownZeroBits(InstLoc I); unsigned ComputeKnownZeroBits(InstLoc I);
public: public:
InstLoc EmitIntConst(unsigned value); InstLoc EmitIntConst(unsigned value);
InstLoc EmitStoreLink(InstLoc val) { InstLoc EmitStoreLink(InstLoc val) {
return FoldUOp(StoreLink, val); return FoldUOp(StoreLink, val);

View File

@ -75,6 +75,7 @@ void AsmRoutineManager::Generate()
MOV(64, R(RBX), Imm64((u64)Memory::base)); MOV(64, R(RBX), Imm64((u64)Memory::base));
MOV(64, R(R15), Imm64((u64)jit.GetBlockCache()->GetCodePointers())); //It's below 2GB so 32 bits are good enough MOV(64, R(R15), Imm64((u64)jit.GetBlockCache()->GetCodePointers())); //It's below 2GB so 32 bits are good enough
#endif #endif
// INT3();
const u8 *outerLoop = GetCodePtr(); const u8 *outerLoop = GetCodePtr();
ABI_CallFunction(reinterpret_cast<void *>(&CoreTiming::Advance)); ABI_CallFunction(reinterpret_cast<void *>(&CoreTiming::Advance));
@ -389,7 +390,7 @@ void AsmRoutineManager::GenQuantizedLoads() {
PUNPCKLWD(XMM0, R(XMM1)); PUNPCKLWD(XMM0, R(XMM1));
CVTDQ2PS(XMM0, R(XMM0)); CVTDQ2PS(XMM0, R(XMM0));
SHR(32, R(EAX), Imm8(6)); SHR(32, R(EAX), Imm8(6));
MOVSS(XMM1, MDisp(EAX, (u32)m_dequantizeTableS)); MOVSS(XMM1, MDisp(EAX, (u32)(u64)m_dequantizeTableS));
PUNPCKLDQ(XMM1, R(XMM1)); PUNPCKLDQ(XMM1, R(XMM1));
MULPS(XMM0, R(XMM1)); MULPS(XMM0, R(XMM1));
RET(); RET();
@ -407,7 +408,7 @@ void AsmRoutineManager::GenQuantizedLoads() {
PSRAD(XMM0, 24); PSRAD(XMM0, 24);
CVTDQ2PS(XMM0, R(XMM0)); CVTDQ2PS(XMM0, R(XMM0));
SHR(32, R(EAX), Imm8(6)); SHR(32, R(EAX), Imm8(6));
MOVSS(XMM1, MDisp(EAX, (u32)m_dequantizeTableS)); MOVSS(XMM1, MDisp(EAX, (u32)(u64)m_dequantizeTableS));
PUNPCKLDQ(XMM1, R(XMM1)); PUNPCKLDQ(XMM1, R(XMM1));
MULPS(XMM0, R(XMM1)); MULPS(XMM0, R(XMM1));
RET(); RET();
@ -426,7 +427,7 @@ void AsmRoutineManager::GenQuantizedLoads() {
PUNPCKLWD(XMM0, R(XMM1)); PUNPCKLWD(XMM0, R(XMM1));
CVTDQ2PS(XMM0, R(XMM0)); CVTDQ2PS(XMM0, R(XMM0));
SHR(32, R(EAX), Imm8(6)); SHR(32, R(EAX), Imm8(6));
MOVSS(XMM1, MDisp(EAX, (u32)m_dequantizeTableS)); MOVSS(XMM1, MDisp(EAX, (u32)(u64)m_dequantizeTableS));
PUNPCKLDQ(XMM1, R(XMM1)); PUNPCKLDQ(XMM1, R(XMM1));
MULPS(XMM0, R(XMM1)); MULPS(XMM0, R(XMM1));
RET(); RET();
@ -446,7 +447,7 @@ void AsmRoutineManager::GenQuantizedLoads() {
CVTDQ2PS(XMM0, R(XMM0)); CVTDQ2PS(XMM0, R(XMM0));
SHR(32, R(EAX), Imm8(6)); SHR(32, R(EAX), Imm8(6));
AND(32, R(EAX), Imm32(0xFC)); AND(32, R(EAX), Imm32(0xFC));
MOVSS(XMM1, MDisp(EAX, (u32)m_dequantizeTableS)); MOVSS(XMM1, MDisp(EAX, (u32)(u64)m_dequantizeTableS));
PUNPCKLDQ(XMM1, R(XMM1)); PUNPCKLDQ(XMM1, R(XMM1));
MULPS(XMM0, R(XMM1)); MULPS(XMM0, R(XMM1));
RET(); RET();