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

memo: BitManipulation class #9

Open
ufcpp opened this issue May 10, 2017 · 5 comments
Open

memo: BitManipulation class #9

ufcpp opened this issue May 10, 2017 · 5 comments

Comments

@ufcpp
Copy link
Owner

ufcpp commented May 10, 2017

https://github.com/dotnet/corefx/issues/12425

BEXTR
UBFX

@fanoI
Copy link

fanoI commented May 15, 2017

I see that class (it it will ever implemented) as the "backend" of this BitField class as you can see with the examples I've posted here: dotnet/corefxlab#1085 (comment) it will become really complex when you have to use it for more that one bit!

@ufcpp
Copy link
Owner Author

ufcpp commented May 15, 2017

The most important fact in the corefx#12425 is:

ReadByte/ReadInt16/ReadInt32 => BEXTR (possibly)

I want to use the BEXTR instruction which executes (src >> start) & ((1 << len)-1) in a single instruction.

@fanoI
Copy link

fanoI commented May 15, 2017

Well but the generation of these ASM instruction should be AOT / JIT intrisics that probably that BitManipulation class will generate in future or your idea is to P/Invoke in Assembler in our library already?

@ufcpp
Copy link
Owner Author

ufcpp commented May 16, 2017

This is just a memo. I guess these methods might be done by JIT intrinsics like System.Numerics.Vectors. I will use them if and only if the JIT-intrinsic version is released.

@ufcpp
Copy link
Owner Author

ufcpp commented Nov 6, 2017

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

No branches or pull requests

2 participants