bmi Questions

8

Solved

I want to create a wrapper around the x86 instructions PDEP (Parallel Bit Deposit) and PEXT (Parallel Bit Extract). On architectures where these aren't available (and the corresponding intrinsics a...
Boxer asked 17/1, 2024 at 16:54

2

Solved

From here, I learned that the support of AVX doesn't imply the support of BMI1. So how about AVX2: Do all CPUs that support AVX2 also support BMI2? Further, does the support of AVX2 imply the suppo...
Palermo asked 8/6, 2023 at 1:33

1

Solved

I am looking for compiler flags of GCC/CLANG to generate BEXTR instruction. template <auto uSTART, auto uLENGTH, typename Tunsigned> constexpr Tunsigned bit_extract(Tunsigned uInput) { retur...
Dominations asked 22/12, 2023 at 18:46

4

I watched a youtube video on the Top 10 Craziest Assembly Language Instructions and some of these instructions have no obvious application to me. What's the point of something like PEXT, which take...
Indophenol asked 14/11, 2021 at 19:20

3

Solved

The documentation for the parallel deposit instruction (PDEP) in Intel's Bit Manipulation Instruction Set 2 (BMI2) describes the following serial implementation for the instruction (C-like pseudoco...
Subcontraoctave asked 14/8, 2016 at 3:39

2

Solved

The Haswell architectures comes up with several new instructions. One of them is PEXT (parallel bits extract) whose functionality is explained by this image (source here): It takes a value r2 an...
Levin asked 15/1, 2014 at 17:27

1

Solved

It it safe to assume that x64 builds can use TZCNT without checking its support through cpu flags?
Turbot asked 25/4, 2020 at 8:18

2

Solved

I was inspired by this link https://www.sigarch.org/simd-instructions-considered-harmful/ to look into how AVX512 performs. My idea was that the clean up loop after the loop could be removed using ...
Pellitory asked 21/2, 2019 at 14:15

2

Solved

In one of my applications, I need to efficiently de-interleave bits in a long stream of data. Ideally, I would like to use the BMI2 pext_u32() and/or pext_u64() x86_64 intrinsic instructions when a...
Chyle asked 1/4, 2018 at 21:22

1

I have some code that relies on AVX. In the same code base I also use TZCNT. The latter is part of BMI1. I know I can test for this instruction using CPUID, but I'm lazy so I did not actually imple...
Sequin asked 29/6, 2017 at 14:7

2

Solved

I'm a bit confused about both instructions. First let's discard the special case when the scanned value is 0 and the undefined/bsr or bitsize/lzcnt result - this difference is clear and not part of...
Migration asked 5/9, 2014 at 10:21

2

Solved

I was searching on the web to find a proper solution, without much success. So I hope one of you know something about it: Is there any way to detect the "Intel Bit Manipulation Instruction Sets 2" ...
Ideologist asked 25/8, 2015 at 22:3

1

Solved

The mulx instruction was introduced with the BMI2 instruction set starting with the Haswell processor. According to Intel's documentation there should be an intrinsic for mulx unsigned __int64 um...
Bedevil asked 23/3, 2015 at 9:38
1

© 2022 - 2025 — McMap. All rights reserved.