-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[TriCore] Replace one- and sign-extend with MathExtra.h functions. #2212
Conversation
This fixes incorrect sign extensions and reachable aborts().
Good job, I also found some abort, because I tested it with a fixed address and not 0xffffffff. |
Nice! Would you cherry-pick those commits into your fixing PR? |
Yes. The problem now is that there will obviously be some target addresses that are negative when address=0, and some target addresses > U32_MAX when address=U32_MAX. How to deal with these two cases is reasonable, do you have any comments? |
If the ISA doesn't say anything about those cases, I would do a wrap around. This can be seen more easily. If you have an The alternative cases, rounding to |
I added the fix here, |
I second the wraparound strategy. |
@kabeor Could you take a look at this quickly? Without it TriCore disassembly is pretty much broken. |
@imbillow do you approve this PR in its current state? |
@kabeor, please merge this one. |
Merged. |
The tests break due to capstone-engine/capstone#2212.
The tests broke due to capstone-engine/capstone#2212.
The tests broke due to capstone-engine/capstone#2212.
The tests broke due to capstone-engine/capstone#2212.
This fixes incorrect sign extensions and reachable aborts().
@imbillow So sorry for my sloppy review last time! Please take a look at this.
Also be so kind and run the fuzzing again with this patch:
You can fuzz then with
There are definitely some aborts left.