summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2005-01-27 06:01:44 +0000
committermarcel <marcel@FreeBSD.org>2005-01-27 06:01:44 +0000
commitb589eff2c89504476ab7b89b667521162b6285fe (patch)
tree6c72f197d9fc5a7432714aa2055552e6e44955d3 /sys/ia64
parent783f4bf0c2c565c36458d9573a2c27e8958da1ae (diff)
downloadFreeBSD-src-b589eff2c89504476ab7b89b667521162b6285fe.zip
FreeBSD-src-b589eff2c89504476ab7b89b667521162b6285fe.tar.gz
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
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/unaligned.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ia64/ia64/unaligned.c b/sys/ia64/ia64/unaligned.c
index 09c2fc5..2635a96 100644
--- a/sys/ia64/ia64/unaligned.c
+++ b/sys/ia64/ia64/unaligned.c
@@ -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);
OpenPOWER on IntegriCloud