Implement `@depositBits` and `@extractBits`
Implements @depositBits and @extractBits, corresponding to pdep and pext from BMI2. The builtins are supported in the LLVM backend for any integer width, are supported in the x86 backend for integer widths below and including 64 bits, and are evaluated at compile-time when possible (also at any integer width). The functionality remains unimplemented in all other backends, and is out of the scope of this PR.
Apologies for how long it has taken me to find the time to get this merge-ready, but I'm happy for it to be merged now, and any further enhancements to be split out into further issues.
Continuation of #15285 Closes #14995
All checks passed, happy for this to be merged if approved :)
Rebased onto master.
Converted to draft as there are a couple of changes I'm part-way through making to this PR. Should be ready for review in a week or two.
Emulation on unsupported targets and large int types has been moved to compiler-rt. Yet to implement calls to this from other backends, but x86 backend should now pass behaviour tests. Before ready for review, I'll look at implementing testing of the various implementations of this against each other to each other with random integers, as we have 4 of them: the two compiler-rt methods (generic and bigint), the comptime bigint, and the native instruction call, so any latent bugs I could have missed should be detected. This is kind of building off of @matu3ba's suggestions: https://github.com/ziglang/zig/pull/15285#discussion_r1167245563
Disabled the failing behaviour tests caused by the bug in the x86 backend. My rationale here is that it's not within the scope of this PR to work around, as a user needing to use this functionality could simply just not use the x86 backend.