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
29
30
31
32
33
34
35
36
pub(crate) struct ValidateConstRound<const IMM: i32>;
impl<const IMM: i32> ValidateConstRound<IMM> {
    pub(crate) const VALID: () = {
        assert!(
            IMM == 4 || IMM == 8 || IMM == 9 || IMM == 10 || IMM == 11,
            "Invalid IMM value"
        );
    };
}
#[allow(unused)]
macro_rules! static_assert_rounding {
    ($imm:ident) => {
        let _ = $crate::core_arch::x86_64::macros::ValidateConstRound::<$imm>::VALID;
    };
}
pub(crate) struct ValidateConstSae<const IMM: i32>;
impl<const IMM: i32> ValidateConstSae<IMM> {
    pub(crate) const VALID: () = {
        assert!(IMM == 4 || IMM == 8, "Invalid IMM value");
    };
}
#[allow(unused)]
macro_rules! static_assert_sae {
    ($imm:ident) => {
        let _ = $crate::core_arch::x86_64::macros::ValidateConstSae::<$imm>::VALID;
    };
}