celox-backend-x86 0.8.2

Celox x86-64 machine-code backend
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! x86-specific instruction-selection policy.

use crate::native::mir::MFunction;

pub(super) struct TargetIselPolicy {
    pub(super) select_packed_bit_stores: bool,
    pub(super) select_packed_field_compares: bool,
}

impl TargetIselPolicy {
    pub(super) fn for_function(function: &MFunction, four_state: bool) -> Self {
        let bmi2 = !four_state && function.target_features.bmi2();
        Self {
            select_packed_bit_stores: bmi2,
            select_packed_field_compares: bmi2,
        }
    }
}