Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msp430: fix BR instruction behavior and register-indirect @Rn disassembly #65

Merged
merged 2 commits into from
May 6, 2024
Merged
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
4 changes: 2 additions & 2 deletions angr_platforms/msp430/instrs_msp430.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def decorate_reg(self, reg_name, reg_mode, imm):
reg_str = "%d(%s)" % (imm, reg_name)
# Indirect mode; fetch address in register; store is a write there.
elif reg_mode == ArchMSP430.Mode.INDIRECT_REGISTER_MODE:
reg_str = "@%s" % reg_str
reg_str = "@%s" % reg_name
# Indirect Autoincrement mode. Increment the register by the type size, then access it
elif reg_mode == ArchMSP430.Mode.INDIRECT_AUTOINCREMENT_MODE:
reg_str = "@%s+" % reg_name
Expand Down Expand Up @@ -648,7 +648,7 @@ def compute_result(self, src, dst):
self.jump(None, newpc, jumpkind=JumpKind.Ret)
else:
# If we're setting PC, but not from SP+, it's a BR instead
self.jump(None, self.constant(self.addr, REGISTER_TYPE))
self.jump(None, src)
return src

def negative(self, src, dst, ret):
Expand Down