Пример #1
0
void Interpreter::stfs(UGeckoInstruction _inst)
{
	//double value = rPS0(_inst.FS);
	//float fTemp = (float)value;
	//Memory::Write_U32(*(u32*)&fTemp, Helper_Get_EA(_inst));
	Memory::Write_U32(ConvertToSingle(riPS0(_inst.FS)), Helper_Get_EA(_inst));
}
Пример #2
0
void Interpreter::lbz(UGeckoInstruction inst)
{
  const u32 temp = PowerPC::Read_U8(Helper_Get_EA(inst));

  if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
    rGPR[inst.RD] = temp;
}
Пример #3
0
void Interpreter::lwz(UGeckoInstruction _inst)
{ 
	u32 uAddress = Helper_Get_EA(_inst);
	u32 temp = Memory::Read_U32(uAddress);
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
	{
		m_GPR[_inst.RD] = temp;
	}

	// hack to detect SelectThread loop
	// should probably run a pass through memory instead before execution
	// but that would be dangerous

	// Enable idle skipping?
	/*
	if ((_inst.hex & 0xFFFF0000)==0x800D0000 &&
		Memory::ReadUnchecked_U32(PC+4)==0x28000000 &&
		Memory::ReadUnchecked_U32(PC+8)==0x4182fff8)
	{
		if (CommandProcessor::AllowIdleSkipping() && PixelEngine::AllowIdleSkipping())
		{
			CoreTiming::Idle();
		}
	}*/
}
Пример #4
0
// FIXME: lmw should do a total rollback if a DSI occurs
void Interpreter::lmw(UGeckoInstruction inst)
{
  u32 address = Helper_Get_EA(inst);

  if ((address & 0b11) != 0 || UReg_MSR{MSR}.LE)
  {
    GenerateAlignmentException(address);
    return;
  }

  for (int i = inst.RD; i <= 31; i++, address += 4)
  {
    const u32 temp_reg = PowerPC::Read_U32(address);

    if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
    {
      PanicAlert("DSI exception in lmw");
      NOTICE_LOG(POWERPC, "DSI exception in lmw");
      return;
    }
    else
    {
      rGPR[i] = temp_reg;
    }
  }
}
Пример #5
0
void Interpreter::lhz(UGeckoInstruction _inst)
{
	u32 temp = (u32)(u16)Memory::Read_U16(Helper_Get_EA(_inst));
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
	{
		m_GPR[_inst.RD] = temp;
	}
}
Пример #6
0
void Interpreter::lha(UGeckoInstruction inst)
{
  const u32 temp = (u32)(s32)(s16)PowerPC::Read_U16(Helper_Get_EA(inst));

  if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
  {
    rGPR[inst.RD] = temp;
  }
}
void Interpreter::lwz(UGeckoInstruction _inst)
{
	u32 uAddress = Helper_Get_EA(_inst);
	u32 temp = PowerPC::Read_U32(uAddress);
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
	{
		rGPR[_inst.RD] = temp;
	}
}
void Interpreter::lfs(UGeckoInstruction _inst)
{
	u32 uTemp = PowerPC::Read_U32(Helper_Get_EA(_inst));
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
	{
		u64 value = ConvertToDouble(uTemp);
		riPS0(_inst.FD) = value;
		riPS1(_inst.FD) = value;
	}
}
Пример #9
0
void Interpreter::lfs(UGeckoInstruction _inst)
{
	u32 uTemp = Memory::Read_U32(Helper_Get_EA(_inst));
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
	{
		double value = *(float*)&uTemp;
		rPS0(_inst.FD) = value;
		rPS1(_inst.FD) = value;
	}
}
Пример #10
0
void Interpreter::stfs(UGeckoInstruction inst)
{
  const u32 address = Helper_Get_EA(inst);

  if ((address & 0b11) != 0)
  {
    GenerateAlignmentException(address);
    return;
  }

  PowerPC::Write_U32(ConvertToSingle(riPS0(inst.FS)), address);
}
Пример #11
0
// FIXME: stmw should do a total rollback if a DSI occurs
void Interpreter::stmw(UGeckoInstruction _inst)
{
	u32 uAddress = Helper_Get_EA(_inst);
	for (int iReg = _inst.RS; iReg <= 31; iReg++, uAddress+=4)
	{
		Memory::Write_U32(m_GPR[iReg], uAddress);
		if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
		{
			PanicAlert("DSI exception in stmw");
			NOTICE_LOG(POWERPC, "DSI exception in stmw");
			return;
		}
	}
}
Пример #12
0
void Interpreter::lfd(UGeckoInstruction inst)
{
  const u32 address = Helper_Get_EA(inst);

  if ((address & 0b11) != 0)
  {
    GenerateAlignmentException(address);
    return;
  }

  const u64 temp = PowerPC::Read_U64(address);

  if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
    riPS0(inst.FD) = temp;
}
Пример #13
0
// FIXME: lmw should do a total rollback if a DSI occurs
void Interpreter::lmw(UGeckoInstruction _inst)
{
	u32 uAddress = Helper_Get_EA(_inst);
	for (int iReg = _inst.RD; iReg <= 31; iReg++, uAddress += 4)
	{
		u32 TempReg = Memory::Read_U32(uAddress);
		if (PowerPC::ppcState.Exceptions & EXCEPTION_DSI)
		{
			PanicAlert("DSI exception in lmw");
			NOTICE_LOG(POWERPC, "DSI exception in lmw");
			return;
		}
		else
		{
			m_GPR[iReg] = TempReg;
		}
	}
}
Пример #14
0
void Interpreter::lfs(UGeckoInstruction inst)
{
  const u32 address = Helper_Get_EA(inst);

  if ((address & 0b11) != 0)
  {
    GenerateAlignmentException(address);
    return;
  }

  const u32 temp = PowerPC::Read_U32(address);

  if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
  {
    const u64 value = ConvertToDouble(temp);
    riPS0(inst.FD) = value;
    riPS1(inst.FD) = value;
  }
}
Пример #15
0
void Interpreter::stb(UGeckoInstruction inst)
{
  PowerPC::Write_U8((u8)rGPR[inst.RS], Helper_Get_EA(inst));
}
Пример #16
0
void Interpreter::stb(UGeckoInstruction _inst)
{
	Memory::Write_U8((u8)rGPR[_inst.RS], Helper_Get_EA(_inst));
}
Пример #17
0
void Interpreter::stw(UGeckoInstruction _inst)
{
	Memory::Write_U32(m_GPR[_inst.RS], Helper_Get_EA(_inst));
}
Пример #18
0
void Interpreter::stfd(UGeckoInstruction _inst)
{
	Memory::Write_U64(riPS0(_inst.FS), Helper_Get_EA(_inst));
}
void Interpreter::stfs(UGeckoInstruction _inst)
{
	PowerPC::Write_U32(ConvertToSingle(riPS0(_inst.FS)), Helper_Get_EA(_inst));
}
Пример #20
0
void Interpreter::sth(UGeckoInstruction _inst)
{
	Memory::Write_U16((u16)m_GPR[_inst.RS], Helper_Get_EA(_inst));
}
void Interpreter::sth(UGeckoInstruction _inst)
{
	PowerPC::Write_U16((u16)rGPR[_inst.RS], Helper_Get_EA(_inst));
}
Пример #22
0
void Interpreter::lfd(UGeckoInstruction _inst)
{
	u64 temp = Memory::Read_U64(Helper_Get_EA(_inst));
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
		riPS0(_inst.FD) = temp;
}
void Interpreter::stw(UGeckoInstruction _inst)
{
	PowerPC::Write_U32(rGPR[_inst.RS], Helper_Get_EA(_inst));
}