Skip to content

Commit

Permalink
Fix incorrect syscall arg regs for X86 (#224) (#228)
Browse files Browse the repository at this point in the history
i386 and amd64 had their register sets reversed. This fixes that.
  • Loading branch information
Tim Deeb-Swihart authored and yan committed May 3, 2017
1 parent af26764 commit 538dfea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manticore/models/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -1812,9 +1812,9 @@ def _arch_specific_init(self, cpu, arch):
self._arch_reg_init(cpu, arch)

if arch == 'i386':
self.syscall_arg_regs = ['RDI', 'RSI', 'RDX', 'R10', 'R8', 'R9']
elif arch == 'amd64':
self.syscall_arg_regs = ['EBX', 'ECX', 'EDX', 'ESI', 'EDI', 'EBP']
elif arch == 'amd64':
self.syscall_arg_regs = ['RDI', 'RSI', 'RDX', 'R10', 'R8', 'R9']
elif arch == 'armv7':
self.syscall_arg_regs = ['R0', 'R1', 'R2', 'R3', 'R4', 'R5', 'R6']
self._init_arm_kernel_helpers(cpu)
Expand Down

0 comments on commit 538dfea

Please sign in to comment.