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

implement imul_r16_rm16 #55

Merged
merged 2 commits into from
Oct 6, 2024
Merged

implement imul_r16_rm16 #55

merged 2 commits into from
Oct 6, 2024

Conversation

LinusU
Copy link
Contributor

@LinusU LinusU commented Sep 15, 2024

This probably needs some extra scrutiny because I have no idea what I'm doing here 😅

Fixes #57

@LinusU LinusU mentioned this pull request Sep 15, 2024
27 tasks
x86/src/ops/math.rs Outdated Show resolved Hide resolved
@LinusU
Copy link
Contributor Author

LinusU commented Oct 4, 2024

I've updated this to use generic functions, and to also set flags correctly (so closing #57)

Some more info here: #57 (comment)

tl;dr this compiles down to a single imul call: godbolt link 🤩

Copy link
Owner

@evmar evmar left a comment

Choose a reason for hiding this comment

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

It never even occurred to me to check if godbolt produces the same x86 code, that is such a great idea!

x86/src/ops/math.rs Outdated Show resolved Hide resolved
x86/src/ops/math.rs Outdated Show resolved Hide resolved
@LinusU
Copy link
Contributor Author

LinusU commented Oct 6, 2024

@evmar should be much simpler now 🙏

still compiles down to a single imul call

@evmar evmar merged commit 3b66104 into evmar:main Oct 6, 2024
3 checks passed
@LinusU LinusU deleted the imul_r16_rm16 branch October 7, 2024 19:50
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.

Set flags in imul
2 participants