[−][src]Module safe_arch::intel
Types and functions for safe x86
/ x86_64
intrinsic usage.
x86_64
is essentially a superset of x86
, so we just lump it all into
one module.
Naming Conventions
The actual intrinsic names are a flaming dumpster, so we use easier to understand names.
- The general naming scheme is that the operation of the function is followed by the name of the type it operates on:
- If the function affects only the lowest lane then it has
_s
on the end after the type, because that's a "scalar" operation.- eg:
add_m128_s
,sqrt_m128_s
- eg:
- Many functions with a "bool-ish" return values have
_mask
in their name. These are the comparison functions, and the return value is all 0s in a lane for "false" in that lane, and all 1s in a lane for "true" in that lane. Because a float or double point value of all 1s is NaN, the mask making functions aren't generally useful on their own, they're just an intermediate value. convert
functions will round to an approximate numeric value.cast
functions will preserve the bit patterns involved.
Structs
m128 | The data for a 128-bit SSE register of four |
m128d | The data for a 128-bit SSE register of two |
m128i | The data for a 128-bit SSE register of integer data. |
Functions
add_i16_m128i | Lanewise |
add_i32_m128i | Lanewise |
add_i64_m128i | Lanewise |
add_i8_m128i | Lanewise |
add_m128 | Lanewise |
add_m128_s | Low lane |
add_m128d | Lanewise |
add_m128d_s | Lowest lane |
add_saturating_i16_m128i | Lanewise saturating |
add_saturating_i8_m128i | Lanewise saturating |
add_saturating_u16_m128i | Lanewise saturating |
add_saturating_u8_m128i | Lanewise saturating |
and_m128 | Bitwise |
and_m128d | Bitwise |
and_m128i | Bitwise |
andnot_m128 | Bitwise |
andnot_m128d | Bitwise |
andnot_m128i | Bitwise |
average_u16_m128i | Lanewise saturating |
average_u8_m128i | Lanewise saturating |
cast_to_m128_from_m128d | Bit-preserving cast to |
cast_to_m128_from_m128i | Bit-preserving cast to |
cast_to_m128d_from_m128 | Bit-preserving cast to |
cast_to_m128d_from_m128i | Bit-preserving cast to |
cast_to_m128i_from_m128d | Bit-preserving cast to |
cast_to_m128i_from_m128 | Bit-preserving cast to |
cmp_eq_i32_m128_s | Low lane equality. |
cmp_eq_i32_m128d_s | Low lane |
cmp_eq_mask_i16_m128i | Lanewise |
cmp_eq_mask_i32_m128i | Lanewise |
cmp_eq_mask_i8_m128i | Lanewise |
cmp_eq_mask_m128 | Lanewise |
cmp_eq_mask_m128_s | Low lane |
cmp_eq_mask_m128d | Lanewise |
cmp_eq_mask_m128d_s | Low lane |
cmp_ge_i32_m128_s | Low lane greater than or equal to. |
cmp_ge_i32_m128d_s | Low lane |
cmp_ge_mask_m128 | Lanewise |
cmp_ge_mask_m128_s | Low lane |
cmp_ge_mask_m128d | Lanewise |
cmp_ge_mask_m128d_s | Low lane |
cmp_gt_i32_m128_s | Low lane greater than. |
cmp_gt_i32_m128d_s | Low lane |
cmp_gt_mask_i16_m128i | Lanewise |
cmp_gt_mask_i32_m128i | Lanewise |
cmp_gt_mask_i8_m128i | Lanewise |
cmp_gt_mask_m128 | Lanewise |
cmp_gt_mask_m128_s | Low lane |
cmp_gt_mask_m128d | Lanewise |
cmp_gt_mask_m128d_s | Low lane |
cmp_le_i32_m128_s | Low lane less than or equal to. |
cmp_le_i32_m128d_s | Low lane |
cmp_le_mask_m128 | Lanewise |
cmp_le_mask_m128_s | Low lane |
cmp_le_mask_m128d | Lanewise |
cmp_le_mask_m128d_s | Low lane |
cmp_lt_i32_m128_s | Low lane less than. |
cmp_lt_i32_m128d_s | Low lane |
cmp_lt_mask_i16_m128i | Lanewise |
cmp_lt_mask_i32_m128i | Lanewise |
cmp_lt_mask_i8_m128i | Lanewise |
cmp_lt_mask_m128 | Lanewise |
cmp_lt_mask_m128_s | Low lane |
cmp_lt_mask_m128d | Lanewise |
cmp_lt_mask_m128d_s | Low lane |
cmp_neq_i32_m128_s | Low lane not equal to. |
cmp_neq_i32_m128d_s | Low lane |
cmp_neq_mask_m128 | Lanewise |
cmp_neq_mask_m128_s | Low lane |
cmp_neq_mask_m128d | Lanewise |
cmp_neq_mask_m128d_s | Low lane |
cmp_nge_mask_m128 | Lanewise |
cmp_nge_mask_m128_s | Low lane |
cmp_nge_mask_m128d | Lanewise |
cmp_nge_mask_m128d_s | Low lane |
cmp_ngt_mask_m128 | Lanewise |
cmp_ngt_mask_m128_s | Low lane |
cmp_ngt_mask_m128d | Lanewise |
cmp_ngt_mask_m128d_s | Low lane |
cmp_nle_mask_m128 | Lanewise |
cmp_nle_mask_m128_s | Low lane |
cmp_nle_mask_m128d | Lanewise |
cmp_nle_mask_m128d_s | Low lane |
cmp_nlt_mask_m128 | Lanewise |
cmp_nlt_mask_m128_s | Low lane |
cmp_nlt_mask_m128d | Lanewise |
cmp_nlt_mask_m128d_s | Low lane |
cmp_ord_mask_m128 | Lanewise |
cmp_ord_mask_m128_s | Low lane |
cmp_ord_mask_m128d | Lanewise |
cmp_ord_mask_m128d_s | Low lane |
cmp_unord_mask_m128 | Lanewise |
cmp_unord_mask_m128_s | Low lane |
cmp_unord_mask_m128d | Lanewise |
cmp_unord_mask_m128d_s | Low lane |
convert_i32_replace_m128_s | Convert |
convert_i32_replace_m128d_s | Convert |
convert_i64_replace_m128d_s | Convert |
convert_m128_s_replace_m128d_s | Converts the lower |
convert_m128d_s_replace_m128_s | Converts the low |
convert_to_m128_from_m128i | Rounds the four |
convert_to_m128_from_m128d | Rounds the two |
convert_to_m128d_from_m128i | Rounds the lower two |
convert_to_m128d_from_m128 | Rounds the two |
convert_to_m128i_from_m128d | Rounds the two |
convert_to_m128i_from_m128 | Rounds the two |
copy_i64_m128i_s | Copy the low |
copy_replace_low_f64_m128d | Copies the |
div_m128 | Lanewise |
div_m128_s | Low lane |
div_m128d | Lanewise |
div_m128d_s | Lowest lane |
get_f32_from_m128_s | Gets the low lane as an individual |
get_f64_from_m128d_s | Gets the lower lane as an |
get_i32_from_m128_s | Converts the low lane to |
get_i32_from_m128d_s | Converts the lower lane to an |
get_i32_from_m128i_s | Converts the lower lane to an |
get_i64_from_m128d_s | Converts the lower lane to an |
get_i64_from_m128i_s | Converts the lower lane to an |
load_f32_m128_s | Loads the reference into the low lane of the register. |
load_f64_m128d_s | Loads the reference into the low lane of the register. |
load_i64_m128i_s | Loads the low |
load_m128 | Loads the reference into a register. |
load_m128d | Loads the reference into a register. |
load_m128i | Loads the reference into a register. |
load_replace_high_m128d | Loads the reference into a register, replacing the high lane. |
load_replace_low_m128d | Loads the reference into a register, replacing the low lane. |
load_reverse_m128 | Loads the reference into a register with reversed order. |
load_reverse_m128d | Loads the reference into a register with reversed order. |
load_splat_m128 | Loads the reference into all lanes of a register. |
load_splat_m128d | Loads the reference into all lanes of a register. |
load_unaligned_m128 | Loads the reference into a register. |
load_unaligned_m128d | Loads the reference into a register. |
load_unaligned_m128i | Loads the reference into a register. |
max_i16_m128i | Lanewise |
max_m128 | Lanewise |
max_m128_s | Low lane |
max_m128d | Lanewise |
max_m128d_s | Low lane |
max_u8_m128i | Lanewise |
min_i16_m128i | Lanewise |
min_m128 | Lanewise |
min_m128_s | Low lane |
min_m128d | Lanewise |
min_m128d_s | Low lane |
min_u8_m128i | Lanewise |
move_high_low_m128 | Move the high lanes of |
move_low_high_m128 | Move the low lanes of |
move_m128_s | Move the low lane of |
move_mask_i8_m128i | Gathers the |
move_mask_m128 | Gathers the sign bit of each lane. |
move_mask_m128d | Gathers the sign bit of each lane. |
mul_i16_horizontal_add_m128i | Multiply |
mul_i16_keep_high_m128i | Lanewise |
mul_i16_keep_low_m128i | Lanewise |
mul_m128 | Lanewise |
mul_m128_s | Low lane |
mul_m128d | Lanewise |
mul_m128d_s | Lowest lane |
mul_u16_keep_high_m128i | Lanewise |
mul_u64_widen_low_bits_m128i | Multiplies the lower 32 bits (only) of each |
or_m128 | Bitwise |
or_m128d | Bitwise |
or_m128i | Bitwise |
pack_i16_to_i8_m128i | Saturating convert |
pack_i16_to_u8_m128i | Saturating convert |
pack_i32_to_i16_m128i | Saturating convert |
reciprocal_m128 | Lanewise |
reciprocal_m128_s | Low lane |
reciprocal_sqrt_m128 | Lanewise |
reciprocal_sqrt_m128_s | Low lane |
set_i16_m128i | Sets the args into an |
set_i32_m128i_s | Set an |
set_i32_m128i | Sets the args into an |
set_i64_m128i_s | Set an |
set_i64_m128i | Sets the args into an |
set_i8_m128i | Sets the args into an |
set_m128 | Sets the args into an |
set_m128_s | Sets the args into an |
set_m128d | Sets the args into an |
set_m128d_s | Sets the args into the low lane of a |
set_reversed_i16_m128i | Sets the args into an |
set_reversed_i32_m128i | Sets the args into an |
set_reversed_i8_m128i | Sets the args into an |
set_reversed_m128 | Sets the args into an |
set_reversed_m128d | Sets the args into an |
shift_left_i16_m128i | Shift each |
shift_left_i32_m128i | Shift each |
shift_left_i64_m128i | Shift each |
shift_right_i16_m128i | Shift each |
shift_right_i32_m128i | Shift each |
shift_right_u16_m128i | Shift each |
shift_right_u32_m128i | Shift each |
shift_right_u64_m128i | Shift each |
splat_i16_m128i | Splats the |
splat_i32_m128i | Splats the |
splat_i64_m128i | Splats the |
splat_i8_m128i | Splats the |
splat_m128 | Splats the value to all lanes. |
splat_m128d | Splats the args into both lanes of the |
sqrt_m128 | Lanewise |
sqrt_m128_s | Low lane |
sqrt_m128d | Lanewise |
sqrt_m128d_s | Low lane |
store_high_m128d_s | Stores the high lane value to the reference given. |
store_i64_m128i_s | Stores the value to the reference given. |
store_m128 | Stores the value to the reference given. |
store_m128_s | Stores the low lane value to the reference given. |
store_m128d | Stores the value to the reference given. |
store_m128d_s | Stores the low lane value to the reference given. |
store_m128i | Stores the value to the reference given. |
store_reverse_m128 | Stores the value to the reference given in reverse order. |
store_reversed_m128d | Stores the value to the reference given. |
store_splat_m128 | Stores the low lane value to all lanes of the reference given. |
store_splat_m128d | Stores the low lane value to all lanes of the reference given. |
store_unaligned_m128 | Stores the value to the reference given. |
store_unaligned_m128d | Stores the value to the reference given. |
store_unaligned_m128i | Stores the value to the reference given. |
sub_i16_m128i | Lanewise |
sub_i32_m128i | Lanewise |
sub_i64_m128i | Lanewise |
sub_i8_m128i | Lanewise |
sub_m128 | Lanewise |
sub_m128_s | Low lane |
sub_m128d | Lanewise |
sub_m128d_s | Lowest lane |
sub_saturating_i16_m128i | Lanewise saturating |
sub_saturating_i8_m128i | Lanewise saturating |
sub_saturating_u16_m128i | Lanewise saturating |
sub_saturating_u8_m128i | Lanewise saturating |
sum_of_u8_abs_diff_m128i | Compute "sum of |
transpose_four_m128 | Transpose four |
truncate_m128_to_m128i | Truncate the |
truncate_m128d_to_m128i | Truncate the |
truncate_to_i32_m128d_s | Truncate the lower lane into an |
truncate_to_i64_m128d_s | Truncate the lower lane into an |
unpack_high_i16_m128i | Unpack and interleave high |
unpack_high_i32_m128i | Unpack and interleave high |
unpack_high_i64_m128i | Unpack and interleave high |
unpack_high_i8_m128i | Unpack and interleave high |
unpack_high_m128 | Unpack and interleave high lanes of |
unpack_high_m128d | Unpack and interleave high lanes of |
unpack_low_i16_m128i | Unpack and interleave low |
unpack_low_i32_m128i | Unpack and interleave low |
unpack_low_i64_m128i | Unpack and interleave low |
unpack_low_i8_m128i | Unpack and interleave low |
unpack_low_m128 | Unpack and interleave low lanes of |
unpack_low_m128d | Unpack and interleave low lanes of |
xor_m128 | Bitwise |
xor_m128d | Bitwise |
xor_m128i | Bitwise |
zeroed_m128 | All lanes zero. |
zeroed_m128i | All lanes zero. |
zeroed_m128d | Both lanes zero. |