Skip to content

Conversation

@kinke
Copy link
Contributor

@kinke kinke commented Mar 24, 2025

Main change: extract the nested udivmod128_64 helper function as new udivmod overload, and optimize that one via inline asm on x86_64. Handy e.g. here: dlang/phobos#10688 (comment)

kinke added 2 commits March 24, 2025 01:16
… 128

This enables using (LLVM/gcc) intrinsics for shifts, for which such
inputs are undefined behavior, as for builtin types.
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#21071"

@ibuclaw
Copy link
Member

ibuclaw commented Mar 24, 2025

Need tests? Even though the existing 128bit ones already tickle all code paths.

@thewilsonator thewilsonator merged commit 6b7bbdd into dlang:master Mar 24, 2025
52 of 55 checks passed
@kinke kinke deleted the int128 branch March 24, 2025 12:09
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.

4 participants