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

Add atomic add opcodes #695

Merged
merged 2 commits into from
Oct 12, 2022
Merged

Add atomic add opcodes #695

merged 2 commits into from
Oct 12, 2022

Conversation

Trass3r
Copy link
Contributor

@Trass3r Trass3r commented Oct 12, 2022

@Trass3r
Copy link
Contributor Author

Trass3r commented Oct 12, 2022

I put up the code here rather than as a diff for ease of use.
But as I said I was just shooting in the dark basing the code on the other case 0xFF and on dynarec_arm_66:
https://github.com/ptitSeb/box86/blob/master/src/dynarec/dynarec_arm_66.c#L418-L433

STREXB(x3, x1, wback);
CMPS_IMM8(x3, 0);
B_MARK(cNE);
STR_IMM9(x1, wback, 0); // put the whole value
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2-bytes write with STRH_IMM8(x1, wback, 0);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Btw these kind of comments are easier to write and also apply if you use the +/- suggestion button above.

Copy link
Owner

@ptitSeb ptitSeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to change all the access: there are 4-bytes ones, while it needs to be 2-bytes (so with H, like Half-word in ARM vocabulary)

@Trass3r Trass3r changed the title Add atomic increment opcodes Add atomic add opcodes Oct 12, 2022
@ptitSeb ptitSeb merged commit ae590d8 into ptitSeb:master Oct 12, 2022
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

Successfully merging this pull request may close these issues.

2 participants