Comments (4)
I think it's probably best to just remove these intrinsics for portability now that arm based macs are something we will want to support
from sail.
I think the only one I really use is bzhi_u64. I remember the performance boost was nice (but not earth shattering) on my Intel desktop in the Lab, but now I'm using an AMD ryzen on my home computer and I think the bmi instructions are actually slower than the shift and mask version:
bzhi_u64(bits,len) = bits & (UINT64_MAX >> (64 - len))
So it might be worth making it optional anyway
from sail.
I just ran into this, or something similar, on trying to compile sail-riscv
on an Apple M1 computer (ie, AArch64) - the inclusion of x86intrin.h
in sail.c
produced the following (rather strange) error:
In file included from sail.c:10:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/x86intrin.h:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/immintrin.h:14:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/mmintrin.h:50:12: error: invalid conversion between vector type
'__m64' (vector of 1 'long long' value) and integer type 'int' of different size
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and many other similar errors.
On my copy there are instances of _pdep_u64
and _bzhi_u64
in sail.c
, both of which can presumably be stubbed out with less efficient C equivalents on things without x86 BMI2 - I'm not sure if there are any other x86 specific things in sail? Apologies if what I'm trying to do is explicitly unsupported/will cause issues elsewhere.
from sail.
Removed in 55a91e5
from sail.
Related Issues (20)
- Major regression in compile time due to improved error messages HOT 6
- Slightly weird wording in error message HOT 1
- Rename `sail2` branch to `master` HOT 3
- Provide binary download HOT 10
- Finish adding abstract types and global constraints
- `-emacs` mode missing? HOT 4
- Semicolon allowed on last expression in block? HOT 1
- Tranlation of `foreach` from Sail to SystemVerilog failing. HOT 2
- Support class/struct-body output mode for C backend HOT 2
- Line number missing for cannot rewrite error HOT 3
- Failed to prove relatively simple constraint HOT 5
- `dune build` doesn't work due to warnings HOT 3
- Could not prove constraints in type synonym HOT 2
- Use type alias in constraints? HOT 2
- 64-bit system-specific C runtime libraries HOT 2
- Assertions don't change type of vars HOT 1
- Coq: Initial register values are not reflected in the generated coq code HOT 4
- New release? HOT 2
- SMT backend `return` bug? HOT 9
- Simple REPL question. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sail.