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

ArchPPC32 has incorrect Counter register number #29

Closed
jeffball55 opened this issue Feb 14, 2016 · 1 comment
Closed

ArchPPC32 has incorrect Counter register number #29

jeffball55 opened this issue Feb 14, 2016 · 1 comment

Comments

@jeffball55
Copy link

Similar to issue #27, the Counter register is represented by the a number rather than register name. See below for the IR instructions decoding a "mtctr r0" instruction in big endian PowerPC. Unlike issue #27 though, this is less problematic as the counter register is architecture specific anyway.

>>> pyvex.IRSB('\x7c\x09\x03\xa6', 0x40000, archinfo.arch_from_id('PPC32')).pp()
IRSB {
   t0:Ity_I32 t1:Ity_I32

   00 | IR-NoOp
   01 | IR-NoOp
   02 | IR-NoOp
   03 | IR-NoOp
   04 | IR-NoOp
   05 | IR-NoOp
   06 | IR-NoOp
   07 | IR-NoOp
   08 | IR-NoOp
   09 | IR-NoOp
   10 | IR-NoOp
   11 | IR-NoOp
   12 | IR-NoOp
   13 | IR-NoOp
   14 | IR-NoOp
   15 | ------ IMark(0x40000, 4, 0) ------
   16 | t0 = GET:I32(r0)
   17 | PUT(1176) = t0
   18 | PUT(pc) = 0x00040004
   19 | t1 = GET:I32(pc)
   NEXT: PUT(pc) = t1; Ijk_Boring
}
@rhelmot
Copy link
Member

rhelmot commented Aug 14, 2016

This is now fixed. I wrote a script to do direct parsing of the vex structs, so hopefully issues of this variety are fixed for good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants