x mod 1 is always 0. Perhaps you meant addr % 4 == 2 as a quick check in case the caller forgot to specify the thumb argument (which would catch a mistake half the time). If that is the case, I think a warning would be in order. Code is here.
thumb = int(thumb)
if isinstance(arch, ArchARM):
if addr % 1 == 1:
thumb = 1
if thumb:
addr &= ~1
I could be completely wrong. I have zero arm experience, which is why I did not submit a PR.
x mod 1
is always 0. Perhaps you meantaddr % 4 == 2
as a quick check in case the caller forgot to specify the thumb argument (which would catch a mistake half the time). If that is the case, I think a warning would be in order. Code is here.I could be completely wrong. I have zero arm experience, which is why I did not submit a PR.