mirror of https://github.com/geohot/qira
fixed pc relative offsets in arm. dang, even stackoverflow was wrong about this
This commit is contained in:
parent
89af06cb9a
commit
27f5e53f50
|
@ -480,8 +480,12 @@ class CsInsn(object):
|
|||
raise IgnoredRegister(exp)
|
||||
|
||||
if exp in reginfo: #it's a register
|
||||
if exp == "pc": #arm is so annoying sometimes
|
||||
return reginfo[exp] + self.size()
|
||||
#http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABJJAAA.html
|
||||
if exp == "pc": #arm is *so* annoying sometimes
|
||||
val = reginfo[exp] + 4
|
||||
if val & 2:
|
||||
val -= 2
|
||||
return val
|
||||
return reginfo[exp]
|
||||
|
||||
#no exception here, ARM is explicit about constants
|
||||
|
|
Loading…
Reference in New Issue