当前位置: 首页>>代码示例>>C++>>正文


C++ riPS0函数代码示例

本文整理汇总了C++中riPS0函数的典型用法代码示例。如果您正苦于以下问题:C++ riPS0函数的具体用法?C++ riPS0怎么用?C++ riPS0使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了riPS0函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Helper_Get_EA

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));
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:7,代码来源:Interpreter_LoadStore.cpp

示例2: switch

wxString CRegTable::GetValue(int row, int col)
{
	if (row < 32)
	{
		switch (col)
		{
		case 0: return StrToWxStr(GetGPRName(row));
		case 1: return wxString::Format("%08x", GPR(row));
		case 2: return StrToWxStr(GetFPRName(row));
		case 3: return wxString::Format("%016llx", riPS0(row));
		case 4: return wxString::Format("%016llx", riPS1(row));
		default: return wxEmptyString;
		}
	}
	else
	{
		if (row - 32 < NUM_SPECIALS)
		{
			switch (col)
			{
			case 0: return StrToWxStr(special_reg_names[row - 32]);
			case 1: return wxString::Format("%08x", GetSpecialRegValue(row - 32));
			default: return wxEmptyString;
			}
		}
	}
	return wxEmptyString;
}
开发者ID:Catnips,项目名称:dolphin,代码行数:28,代码来源:RegisterView.cpp

示例3: Helper_Get_EA_UX

void Interpreter::stfsux(UGeckoInstruction _inst)
{	
	u32 uAddress = Helper_Get_EA_UX(_inst);	
	Memory::Write_U32(ConvertToSingle(riPS0(_inst.FS)), uAddress);
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
	{
		m_GPR[_inst.RA] = uAddress;
	}
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:9,代码来源:Interpreter_LoadStore.cpp

示例4: GPR

void CRegTable::UpdateCachedRegs()
{
	for (int i = 0; i < 32; ++i)
	{
		m_CachedRegHasChanged[i] = (m_CachedRegs[i] != GPR(i));
		m_CachedRegs[i] = GPR(i);

		m_CachedFRegHasChanged[i][0] = (m_CachedFRegs[i][0] != riPS0(i));
		m_CachedFRegs[i][0] = riPS0(i);
		m_CachedFRegHasChanged[i][1] = (m_CachedFRegs[i][1] != riPS1(i));
		m_CachedFRegs[i][1] = riPS1(i);
	}
	for (int i = 0; i < NUM_SPECIALS; ++i)
	{
		m_CachedSpecialRegHasChanged[i] = (m_CachedSpecialRegs[i] != GetSpecialRegValue(i));
		m_CachedSpecialRegs[i] = GetSpecialRegValue(i);
	}
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:18,代码来源:RegisterView.cpp

示例5: Helper_Get_EA_U

void Interpreter::stfdu(UGeckoInstruction _inst)
{
	u32 uAddress = Helper_Get_EA_U(_inst);
	Memory::Write_U64(riPS0(_inst.FS), uAddress);
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
	{
		m_GPR[_inst.RA] = uAddress;
	}
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:9,代码来源:Interpreter_LoadStore.cpp

示例6: ConvertToDouble

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;
	}
}
开发者ID:BananaMuffinFrenzy,项目名称:dolphin,代码行数:10,代码来源:Interpreter_LoadStore.cpp

示例7: Helper_Get_EA_UX

void Interpreter::lfsux(UGeckoInstruction _inst)
{
	u32 uAddress = Helper_Get_EA_UX(_inst);
	u32 uTemp = PowerPC::Read_U32(uAddress);
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
	{
		u64 value = ConvertToDouble(uTemp);
		riPS0(_inst.FD) = value;
		riPS1(_inst.FD) = value;
		rGPR[_inst.RA] = uAddress;
	}
}
开发者ID:BananaMuffinFrenzy,项目名称:dolphin,代码行数:12,代码来源:Interpreter_LoadStore.cpp

示例8: Helper_Get_EA_X

void Interpreter::stfsx(UGeckoInstruction inst)
{
  const u32 address = Helper_Get_EA_X(inst);

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

  PowerPC::Write_U32(ConvertToSingle(riPS0(inst.FS)), address);
}
开发者ID:TurboK234,项目名称:dolphin,代码行数:12,代码来源:Interpreter_LoadStore.cpp

示例9: gdb_write_register

static void gdb_write_register()
{
  u32 id;

  u8* bufptr = cmd_bfr + 3;

  id = hex2char(cmd_bfr[1]);
  if (cmd_bfr[2] != '=')
  {
    ++bufptr;
    id <<= 4;
    id |= hex2char(cmd_bfr[2]);
  }

  switch (id)
  {
  case 0 ... 31:
    GPR(id) = re32hex(bufptr);
    break;
  case 32 ... 63:
    riPS0(id - 32) = re64hex(bufptr);
    break;
  case 64:
    PC = re32hex(bufptr);
    break;
  case 65:
    MSR.Hex = re32hex(bufptr);
    break;
  case 66:
    PowerPC::SetCR(re32hex(bufptr));
    break;
  case 67:
    LR = re32hex(bufptr);
    break;
  case 68:
    CTR = re32hex(bufptr);
    break;
  case 69:
    PowerPC::ppcState.spr[SPR_XER] = re32hex(bufptr);
    break;
  case 70:
    // do nothing, we dont have MQ
    break;
  case 71:
    FPSCR.Hex = re32hex(bufptr);
    break;
  default:
    return gdb_reply("E01");
    break;
  }

  gdb_reply("OK");
}
开发者ID:MerryMage,项目名称:dolphin,代码行数:53,代码来源:GDBStub.cpp

示例10: Helper_Get_EA

void Interpreter::stfd(UGeckoInstruction inst)
{
  const u32 address = Helper_Get_EA(inst);

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

  PowerPC::Write_U64(riPS0(inst.FS), address);
}
开发者ID:TurboK234,项目名称:dolphin,代码行数:12,代码来源:Interpreter_LoadStore.cpp

示例11: gdb_read_register

static void gdb_read_register()
{
  static u8 reply[64];
  u32 id;

  memset(reply, 0, sizeof reply);
  id = hex2char(cmd_bfr[1]);
  if (cmd_bfr[2] != '\0')
  {
    id <<= 4;
    id |= hex2char(cmd_bfr[2]);
  }

  switch (id)
  {
  case 0 ... 31:
    wbe32hex(reply, GPR(id));
    break;
  case 32 ... 63:
    wbe64hex(reply, riPS0(id - 32));
    break;
  case 64:
    wbe32hex(reply, PC);
    break;
  case 65:
    wbe32hex(reply, MSR.Hex);
    break;
  case 66:
    wbe32hex(reply, PowerPC::GetCR());
    break;
  case 67:
    wbe32hex(reply, LR);
    break;
  case 68:
    wbe32hex(reply, CTR);
    break;
  case 69:
    wbe32hex(reply, PowerPC::ppcState.spr[SPR_XER]);
    break;
  case 70:
    wbe32hex(reply, 0x0BADC0DE);
    break;
  case 71:
    wbe32hex(reply, FPSCR.Hex);
    break;
  default:
    return gdb_reply("E01");
    break;
  }

  gdb_reply((char*)reply);
}
开发者ID:MerryMage,项目名称:dolphin,代码行数:52,代码来源:GDBStub.cpp

示例12: Helper_Get_EA_UX

void Interpreter::stfsux(UGeckoInstruction inst)
{
  const u32 address = Helper_Get_EA_UX(inst);

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

  PowerPC::Write_U32(ConvertToSingle(riPS0(inst.FS)), address);
  if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
  {
    rGPR[inst.RA] = address;
  }
}
开发者ID:TurboK234,项目名称:dolphin,代码行数:16,代码来源:Interpreter_LoadStore.cpp

示例13: riPS0

void Interpreter::lfd(UGeckoInstruction _inst)
{
	u64 temp = Memory::Read_U64(Helper_Get_EA(_inst));
	if (!(PowerPC::ppcState.Exceptions & EXCEPTION_DSI))
		riPS0(_inst.FD) = temp;
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:6,代码来源:Interpreter_LoadStore.cpp

示例14: Helper_Get_EA_X

void Interpreter::stfsx(UGeckoInstruction _inst)
{	
	Memory::Write_U32(ConvertToSingle(riPS0(_inst.FS)), Helper_Get_EA_X(_inst));
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:4,代码来源:Interpreter_LoadStore.cpp

示例15: AddRegister

void RegisterWidget::PopulateTable()
{
  for (int i = 0; i < 32; i++)
  {
    // General purpose registers (int)
    AddRegister(i, 0, RegisterType::gpr, "r" + std::to_string(i), [i] { return GPR(i); },
                [i](u64 value) { GPR(i) = value; });

    // Floating point registers (double)
    AddRegister(i, 2, RegisterType::fpr, "f" + std::to_string(i), [i] { return riPS0(i); },
                [i](u64 value) { riPS0(i) = value; });

    AddRegister(i, 4, RegisterType::fpr, "", [i] { return riPS1(i); },
                [i](u64 value) { riPS1(i) = value; });
  }

  for (int i = 0; i < 8; i++)
  {
    // IBAT registers
    AddRegister(i, 5, RegisterType::ibat, "IBAT" + std::to_string(i),
                [i] {
                  return (static_cast<u64>(PowerPC::ppcState.spr[SPR_IBAT0U + i * 2]) << 32) +
                         PowerPC::ppcState.spr[SPR_IBAT0L + i * 2];
                },
                nullptr);
    // DBAT registers
    AddRegister(i + 8, 5, RegisterType::dbat, "DBAT" + std::to_string(i),
                [i] {
                  return (static_cast<u64>(PowerPC::ppcState.spr[SPR_DBAT0U + i * 2]) << 32) +
                         PowerPC::ppcState.spr[SPR_DBAT0L + i * 2];
                },
                nullptr);
    // Graphics quantization registers
    AddRegister(i + 16, 7, RegisterType::gqr, "GQR" + std::to_string(i),
                [i] { return PowerPC::ppcState.spr[SPR_GQR0 + i]; }, nullptr);
  }

  for (int i = 0; i < 16; i++)
  {
    // SR registers
    AddRegister(i, 7, RegisterType::sr, "SR" + std::to_string(i),
                [i] { return PowerPC::ppcState.sr[i]; },
                [i](u64 value) { PowerPC::ppcState.sr[i] = value; });
  }

  // Special registers
  // TB
  AddRegister(16, 5, RegisterType::tb, "TB",
              [] {
                return static_cast<u64>(PowerPC::ppcState.spr[SPR_TU]) << 32 |
                       PowerPC::ppcState.spr[SPR_TL];
              },
              nullptr);

  // PC
  AddRegister(17, 5, RegisterType::pc, "PC", [] { return PowerPC::ppcState.pc; },
              [](u64 value) { PowerPC::ppcState.pc = value; });

  // LR
  AddRegister(18, 5, RegisterType::lr, "LR", [] { return PowerPC::ppcState.spr[SPR_LR]; },
              [](u64 value) { PowerPC::ppcState.spr[SPR_LR] = value; });

  // CTR
  AddRegister(19, 5, RegisterType::ctr, "CTR", [] { return PowerPC::ppcState.spr[SPR_CTR]; },
              [](u64 value) { PowerPC::ppcState.spr[SPR_CTR] = value; });

  // CR
  AddRegister(20, 5, RegisterType::cr, "CR", [] { return GetCR(); },
              [](u64 value) { SetCR(value); });

  // XER
  AddRegister(21, 5, RegisterType::xer, "XER", [] { return GetXER().Hex; },
              [](u64 value) { SetXER(UReg_XER(value)); });

  // FPSCR
  AddRegister(22, 5, RegisterType::fpscr, "FPSCR", [] { return PowerPC::ppcState.fpscr; },
              [](u64 value) { PowerPC::ppcState.fpscr = value; });

  // MSR
  AddRegister(23, 5, RegisterType::msr, "MSR", [] { return PowerPC::ppcState.msr; },
              [](u64 value) { PowerPC::ppcState.msr = value; });

  // SRR 0-1
  AddRegister(24, 5, RegisterType::srr, "SRR0", [] { return PowerPC::ppcState.spr[SPR_SRR0]; },
              [](u64 value) { PowerPC::ppcState.spr[SPR_SRR0] = value; });
  AddRegister(25, 5, RegisterType::srr, "SRR1", [] { return PowerPC::ppcState.spr[SPR_SRR1]; },
              [](u64 value) { PowerPC::ppcState.spr[SPR_SRR1] = value; });

  // Exceptions
  AddRegister(26, 5, RegisterType::exceptions, "Exceptions",
              [] { return PowerPC::ppcState.Exceptions; },
              [](u64 value) { PowerPC::ppcState.Exceptions = value; });

  // Int Mask
  AddRegister(27, 5, RegisterType::int_mask, "Int Mask",
              [] { return ProcessorInterface::GetMask(); }, nullptr);

  // Int Cause
  AddRegister(28, 5, RegisterType::int_cause, "Int Cause",
              [] { return ProcessorInterface::GetCause(); }, nullptr);
//.........这里部分代码省略.........
开发者ID:t27duck,项目名称:dolphin,代码行数:101,代码来源:RegisterWidget.cpp


注:本文中的riPS0函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。