mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
get_x64_reg_value fix
This commit is contained in:
parent
152feb898e
commit
f9eb3f8476
@ -562,6 +562,24 @@ bool get_x64_reg_value(x64_context* context, x64_reg_t reg, size_t d_size, size_
|
|||||||
out_value = (u8)(*X64REG(context, reg - X64R_AH) >> 8);
|
out_value = (u8)(*X64REG(context, reg - X64R_AH) >> 8);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (reg == X64_IMM8)
|
||||||
|
{
|
||||||
|
const s8 imm_value = *(s8*)(RIP(context) + i_size - 1);
|
||||||
|
|
||||||
|
switch (d_size)
|
||||||
|
{
|
||||||
|
case 1: out_value = (u8)imm_value; return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (reg == X64_IMM16)
|
||||||
|
{
|
||||||
|
const s16 imm_value = *(s16*)(RIP(context) + i_size - 2);
|
||||||
|
|
||||||
|
switch (d_size)
|
||||||
|
{
|
||||||
|
case 2: out_value = (u16)imm_value; return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (reg == X64_IMM32)
|
else if (reg == X64_IMM32)
|
||||||
{
|
{
|
||||||
// load the immediate value (assuming it's at the end of the instruction)
|
// load the immediate value (assuming it's at the end of the instruction)
|
||||||
|
Loading…
Reference in New Issue
Block a user