SIMD detection is non-portable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
liberasurecode |
New
|
Undecided
|
Unassigned |
Bug Description
I am running on an arm64 CPU with the "asimd" (arm advanced simd) flag. I would like to take advantage of the features of my hardware.
However, when I try to configure liberasurecode on this platform, I see the following output:
```
<stdin>: In function 'main':
<stdin>:68:3: error: impossible constraint in 'asm'
configure: WARNING: Could not compile the CPUID detection program
Generating with SIMD flags:
```
I looked around the code a little more, and the simd feature detection seems very x86-specific. It also looks like it assumes the build machine and the target machine will be the same. It is detecting CPU features locally, rather than allowing the builder to specify the target on the configure command line.
On arm64, I think the `xor_bufs_
Is it possible to handle SIMD in a more portable way? What's the right way to do this?
In commit f3a99e81e997cf0 d8db47056b36ca2 c2e3beee8f the use of an autoconf macro -- https:/ /www.gnu. org/software/ autoconf- archive/ ax_ext. html -- was deleted and replaced with an in-house solution.