-
Notifications
You must be signed in to change notification settings - Fork 115
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
Incorrect MIPS 32 Intermediate Representation #26
Comments
That's really weird; it happens for me as well... @rhelmot, have you ever seen this issue? I have some sort of half-memory of running into something like this before, and I think you were there. |
A coworker of mine figured it out. This is due to the MIPS branch delay slot. When given another instruction in the branch delay slot, it acts as expected. So I'd say this isn't really a bug, but the correct behavior.
|
Ah, awesome! Sorry we didn't get to it; we've been pushing super hard toward a conference deadline. It's interesting that vex doesn't except out when it's not given a jump delay slot, but I guess they never considered a situation where that would be the case. It'll be interesting if it's possible to craft a basic block that is just at the edge of Valgrind's block size limit so that the branch delay slot isn't included, trigger this bug, and detect Valgrind. There are plenty of other ways to do that, of course, but it'd be cool. |
I'm attempting to obtain the Intermediate Representation for the MIPS32 architecture (little endian), but it appears that I'm getting incorrect results. For instance, for the instruction "jr $ra" doesn't set the pc register to $ra. The output is shown below. It appears to be missing a "PUT(pc) = t0" statement.
I'm running python 2.7.10 on Ubuntu 15.10 and installed pyvex using the recommended "pip install pyvex".
The text was updated successfully, but these errors were encountered: