summaryrefslogtreecommitdiffstats
path: root/vendor/packed_simd_2/src/codegen/pointer_sized_int.rs
blob: 55cbc297aaf52d2bd0f3a761ecd771f7c903e839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! Provides `isize` and `usize`

use cfg_if::cfg_if;

cfg_if! {
    if #[cfg(target_pointer_width = "8")] {
        pub(crate) type isize_ = i8;
        pub(crate) type usize_ = u8;
    } else if #[cfg(target_pointer_width = "16")] {
        pub(crate) type isize_ = i16;
        pub(crate) type usize_ = u16;
    } else if #[cfg(target_pointer_width = "32")] {
        pub(crate) type isize_ = i32;
        pub(crate) type usize_ = u32;

    } else if #[cfg(target_pointer_width = "64")] {
        pub(crate) type isize_ = i64;
        pub(crate) type usize_ = u64;
    } else if #[cfg(target_pointer_width = "64")] {
        pub(crate) type isize_ = i64;
        pub(crate) type usize_ = u64;
    } else if #[cfg(target_pointer_width = "128")] {
        pub(crate) type isize_ = i128;
        pub(crate) type usize_ = u128;
    } else {
        compile_error!("unsupported target_pointer_width");
    }
}