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

Improve BMI2 MultiplyNoFlags APIs #14

Open
elbruno opened this issue Feb 22, 2019 · 0 comments
Open

Improve BMI2 MultiplyNoFlags APIs #14

elbruno opened this issue Feb 22, 2019 · 0 comments

Comments

@elbruno
Copy link
Owner

elbruno commented Feb 22, 2019

Improve BMI2 MultiplyNoFlags APIs
The current Bmi2.MultiplyNoFlags API follows the C/C++ intrinsic design that returns lower half of the result and stores the higher half in memory via a pointer of out argument. According to feedback dotnet/coreclr#18712 (comment), the API returning higher half is more useful for developers and simpler to implement and optimize for compiler writers. So, we suggest changing the API to:

public static unsafe uint MultiplyNoFlags(uint left, uint right);
public static unsafe uint MultiplyNoFlags(uint left, uint right, uint* lower);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant