mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
Fix handling of post increment: Either the first or second operand
is the register with the memory address, and it's that register's value we need to increment or decrement. MFC after: 3 days
This commit is contained in:
parent
29bf6af890
commit
b71bca0f84
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140891
@ -240,7 +240,10 @@ fixup(struct asm_inst *i, mcontext_t *mc, uint64_t va)
|
||||
postinc = (i->i_oper[3].o_type == ASM_OPER_IMM)
|
||||
? i->i_oper[3].o_value : 0;
|
||||
if (postinc != 0) {
|
||||
reg = greg_ptr(mc, (int)i->i_oper[3].o_value);
|
||||
if (i->i_oper[1].o_type == ASM_OPER_MEM)
|
||||
reg = greg_ptr(mc, (int)i->i_oper[1].o_value);
|
||||
else
|
||||
reg = greg_ptr(mc, (int)i->i_oper[2].o_value);
|
||||
if (reg == NULL)
|
||||
return (EINVAL);
|
||||
postinc += rdreg(reg);
|
||||
|
Loading…
Reference in New Issue
Block a user