Skip to content

Conversation

Rot127
Copy link
Collaborator

@Rot127 Rot127 commented May 26, 2025

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

The CS_OPT_UNSIGNED flag could be set but was ignored by SStream. Since most refactored architecture modules use the SStream API they effectively ignored the CS_OPT_UNSIGNED flag as well.

Here we check it in the SStream and redirect to the corresponding unsigned function if set.

Test plan

Added

Closing issues

closes #2722

@github-actions github-actions bot added the CS-core-files auto-sync label May 26, 2025
The CS_OPT_UNSIGNED flag could be set but was ignored by SStream.
Since most refactored architecture modules use the SStream API
they effectively ignored the CS_OPT_UNSIGNED flag as well.

Here we check it in the SStream and redirect to the corresponding
unsigned function if set.
@Rot127
Copy link
Collaborator Author

Rot127 commented May 26, 2025

cc @jiegec

@jiegec
Copy link
Collaborator

jiegec commented May 26, 2025

Great, that is an elegant way to accomplish this. I was thinking about adding the logic to all archs manually, which is tedious.

@Rot127
Copy link
Collaborator Author

Rot127 commented May 26, 2025

I was thinking about adding the logic to all archs manually, which is tedious.

Yeah, I think this was also the old way. But SStream is very well tested now and can be used reliably and it certainly is in its sphere of responsibility.

@Rot127 Rot127 merged commit fe6bdc6 into capstone-engine:next Jun 6, 2025
20 checks passed
@Rot127 Rot127 deleted the opt-unsigned branch June 6, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CS-core-files auto-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CS_OPT_UNSIGNED ignored in AArch64

3 participants