forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add vector-vector arithmetic ops * Add operators and integer conversions for masks * Add unary traits * Implement Index and IndexMut * Implement by-ref ops for masks * Document intrinsics * Implement format traits for masks * Add floating point ops tests * Add integer tests * Add mask tests
- Loading branch information
1 parent
fa6bb81
commit 43dabd1
Showing
33 changed files
with
2,233 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//! This module contains the LLVM intrinsics bindings that provide the functionality for this | ||
//! crate. | ||
//! | ||
//! The LLVM assembly language is documented here: https://llvm.org/docs/LangRef.html | ||
/// These intrinsics aren't linked directly from LLVM and are mostly undocumented, however they are | ||
/// simply lowered to the matching LLVM instructions by the compiler. The associated instruction | ||
/// is documented alongside each intrinsic. | ||
extern "platform-intrinsic" { | ||
/// add/fadd | ||
pub(crate) fn simd_add<T>(x: T, y: T) -> T; | ||
|
||
/// sub/fsub | ||
pub(crate) fn simd_sub<T>(x: T, y: T) -> T; | ||
|
||
/// mul/fmul | ||
pub(crate) fn simd_mul<T>(x: T, y: T) -> T; | ||
|
||
/// udiv/sdiv/fdiv | ||
pub(crate) fn simd_div<T>(x: T, y: T) -> T; | ||
|
||
/// urem/srem/frem | ||
pub(crate) fn simd_rem<T>(x: T, y: T) -> T; | ||
|
||
/// shl | ||
pub(crate) fn simd_shl<T>(x: T, y: T) -> T; | ||
|
||
/// lshr/ashr | ||
pub(crate) fn simd_shr<T>(x: T, y: T) -> T; | ||
|
||
/// and | ||
pub(crate) fn simd_and<T>(x: T, y: T) -> T; | ||
|
||
/// or | ||
pub(crate) fn simd_or<T>(x: T, y: T) -> T; | ||
|
||
/// xor | ||
pub(crate) fn simd_xor<T>(x: T, y: T) -> T; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.