vince Le 31/01/2018 à 11:18 Bon, encore 12h pour se souhaiter la bonne année, après c'est fini (je viens de faire la même remarque à un collègue qui l'avait mis dans sa signature mail)
namespace std
{
ostream& operator << (ostream& strm, const cpu::instruction& instr)
{
std::stringstream str;
str << setfill(' ') << setw(11) << left << xed_iclass_enum_t2str(instr.get_mnemonic()) << right;
for (int32_t i = 0; i < instr.get_operand_count(); ++i)
{
auto op = xed_inst_operand(instr._xi, i);
auto op_vis = xed_operand_operand_visibility(op);
if (op_vis != XED_OPVIS_EXPLICIT)
continue;
xed_operand_enum_t op_name = xed_operand_name(op);
switch (op_name)
{
case XED_OPERAND_MEM0:
case XED_OPERAND_MEM1:
case XED_OPERAND_AGEN:
{
uint32_t reg_key = (op_name == XED_OPERAND_AGEN) ? 0 : (op_name - XED_OPERAND_MEM0);
xed_reg_enum_t seg_reg = xed_decoded_inst_get_seg_reg(instr._dxi, reg_key);
xed_reg_enum_t base_reg = xed_decoded_inst_get_base_reg(instr._dxi, reg_key);
xed_reg_enum_t index_reg = xed_decoded_inst_get_index_reg(instr._dxi, reg_key);
int64_t displ = 0;
if (xed_operand_values_has_memory_displacement(instr._dxi))
displ = xed_decoded_inst_get_memory_displacement(instr._dxi, reg_key);
uint32_t memop_bytes = xed_decoded_inst_get_memory_operand_length(instr._dxi, reg_key);
switch (memop_bytes)
{
case 1: str << "byte ptr "; break;
case 2: str << "word ptr "; break;
case 4: str << "dword ptr "; break;
case 8: str << "qword ptr "; break;
}
str << xed_reg_enum_t2str(seg_reg) << ":[" << xed_reg_enum_t2str(base_reg);
if (displ < 0)
str << " - 0x" << hex << setfill('0') << setw(memop_bytes) << uppercase << -displ;
else
str << " + 0x" << hex << setfill('0') << setw(memop_bytes) << uppercase << displ;
str << "]";
break;
}
case XED_OPERAND_REG0:
case XED_OPERAND_REG1:
case XED_OPERAND_REG2:
case XED_OPERAND_REG3:
case XED_OPERAND_REG4:
case XED_OPERAND_REG5:
case XED_OPERAND_REG6:
case XED_OPERAND_REG7:
case XED_OPERAND_REG8:
case XED_OPERAND_BASE0:
case XED_OPERAND_BASE1:
{
auto reg_enum_name = xed_decoded_inst_get_reg(instr._dxi, op_name);
str << xed_reg_enum_t2str(reg_enum_name);
break;
}
case XED_OPERAND_IMM0:
{
uint32_t bits = xed_decoded_inst_get_immediate_width_bits(instr._dxi);
if (xed_decoded_inst_get_immediate_is_signed(instr._dxi))
str << "0x" << hex << setw(bits / 4) << setfill('0') << uppercase << xed_decoded_inst_get_signed_immediate(instr._dxi);
else
str << "0x" << hex << setw(bits / 4) << setfill('0') << uppercase << xed_decoded_inst_get_unsigned_immediate(instr._dxi);
break;
}
case XED_OPERAND_IMM1:
str << "0x" << hex << setw(2) << setfill('0') << uppercase << (int)xed_decoded_inst_get_second_immediate(instr._dxi);
break;
case XED_OPERAND_PTR:
case XED_OPERAND_RELBR:
{
uint32_t disp_bits = xed_decoded_inst_get_branch_displacement_width(instr._dxi);
if (disp_bits > 0)
{
int64_t branch_displ = xed_decoded_inst_get_branch_displacement(instr._dxi);
branch_displ = instr._offset + branch_displ + instr.get_byte_length();
str << "short 0x" << hex << setfill('0') << setw(disp_bits * 8) << uppercase << branch_displ;
}
break;
}
default:
str << "{unknown operand " << xed_operand_enum_t2str(op_name) << "}";
break;
}
if (i + 1 < instr.get_operand_count())
{
auto next_op(xed_inst_operand(instr._xi, i + 1));
if (next_op != nullptr && xed_operand_operand_visibility(next_op) == XED_OPVIS_EXPLICIT)
str << ", ";
}
}
strm << boost::algorithm::to_lower_copy(str.str());
return strm;
}
}
****************************************************************
La liquidation de tout ses compte en banque, rien d'important
Proud to be CAKE©®™
GCC4TI importe qui a problème en Autriche, pour l'UE plus et une encore de correspours nucléaire, ce n'est pas ytre d'instérier. L'état très même contraire, toujours reconstruire un pouvoir une choyer d'aucrée de compris le plus mite de genre, ce n'est pas moins)
Stalin est l'élection de la langie.
Membre depuis le 24/04/2009, 2587 messages
- Player* pCurrChar = new Player(this);
- // for send server info and strings (config)
- ChatHandler chH = ChatHandler(pCurrChar->GetSession());
+ Player* pCurrChar = _player;
+ ChatHandler chH(this);
- // "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools)
- if (!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder))
+ if (_player == nullptr)
{
- SetPlayer(NULL);
- KickPlayer("Can't load player from DB"); // disconnect client, player no set to session and it will not deleted or saved at kick
- delete pCurrChar; // delete it manually
- delete holder; // delete all unprocessed queries
- m_playerLoading = false;
- return;
+ pCurrChar = _player = new Player(this);
+
+ // "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools)
+ if (!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder))
+ {
+ SetPlayer(NULL);
+ KickPlayer("Can't load player from DB"); // disconnect client, player no set to session and it will not deleted or saved at kick
+ delete pCurrChar; // delete it manually
+ delete holder; // delete all unprocessed queries
+ m_playerLoading = false;
+ return;
+ }
+
+ pCurrChar->GetMotionMaster()->Initialize();
}
+ else // Rebind the session now
The spacecraft shall survive to the following acoustic environment:
Que cache le pays des Dieux ? -
Forum Ghibli -
Forum LittéraireLa fin d'un monde souillé est venue. L'oiseau blanc plane dans le ciel annonçant le début d'une longue ère de purification. Détachons-nous à jamais de notre vie dans ce monde de souffrance. Ô toi l'oiseau blanc, l'être vêtu de bleu, guide nous vers ce monde de pureté. - Sutra originel dork.
-p SampleParticlesIntegration -r D3D11
HURRRR !