Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion priv/guest_arm_toIR.c
Original file line number Diff line number Diff line change
Expand Up @@ -20387,8 +20387,13 @@ DisResult disInstr_THUMB_WRK (
/* rD = align4(PC) + imm8 * 4 */
UInt rD = INSN0(10,8);
UInt imm8 = INSN0(7,0);
/* EDG says: Per the ARM Docs, PC-rel instructions need a +4 here! */
putIRegT(rD, binop(Iop_Add32,
binop(Iop_And32, getIRegT(15), mkU32(~3U)),
binop(Iop_And32,
binop(Iop_Add32,
getIRegT(15),
mkU32(4U)),
mkU32(~3U)),
mkU32(imm8 * 4)),
condT);
DIP("add r%u, pc, #%u\n", rD, imm8 * 4);
Expand Down