Skip to content

Commit

Permalink
Fix rip register usage in AT&T assembly (Maratyszcza#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskwiatkowski authored May 6, 2021
1 parent 84e60a5 commit 906d578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peachpy/x86_64/operand.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def format(self, assembly_format):
return text
elif assembly_format == "gas":
if isinstance(self.address, RIPRelativeOffset):
return str(self.address.offset) + "(%%rip)"
return str(self.address.offset) + "(%rip)"
else:
base = self.address.base
if self.address.index is None:
Expand Down Expand Up @@ -434,7 +434,7 @@ def __str__(self):

def format(self, assembly_format):
if assembly_format == "gas":
return "%d(%%rip)" % self.offset
return "%d(%rip)" % self.offset
elif assembly_format == "go":
return "%d(IP)" % self.offset
else:
Expand Down

0 comments on commit 906d578

Please sign in to comment.