Add x86 encoding for SIMD icmp eq
Also adds a predicate for matching the `eq` IntCC code (TODO this should be replaced by something more general)
This commit is contained in:
@@ -628,6 +628,9 @@ pub enum FormatPredicateKind {
|
||||
|
||||
/// Is the referenced data object colocated?
|
||||
IsColocatedData,
|
||||
|
||||
/// Does the operation have a specific condition code?
|
||||
HasConditionCode(&'static str),
|
||||
}
|
||||
|
||||
#[derive(Clone, Hash, PartialEq, Eq)]
|
||||
@@ -714,6 +717,10 @@ impl FormatPredicateNode {
|
||||
FormatPredicateKind::IsColocatedData => {
|
||||
format!("predicates::is_colocated_data({}, func)", self.member_name)
|
||||
}
|
||||
FormatPredicateKind::HasConditionCode(code) => format!(
|
||||
"predicates::match_condition_code_to_str({}, \"{}\")",
|
||||
self.member_name, code
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -997,6 +1004,18 @@ impl InstructionPredicate {
|
||||
))
|
||||
}
|
||||
|
||||
pub fn new_has_condition_code(
|
||||
format: &InstructionFormat,
|
||||
condition_code: &'static str,
|
||||
field_name: &'static str,
|
||||
) -> InstructionPredicateNode {
|
||||
InstructionPredicateNode::FormatPredicate(FormatPredicateNode::new(
|
||||
format,
|
||||
field_name,
|
||||
FormatPredicateKind::HasConditionCode(condition_code),
|
||||
))
|
||||
}
|
||||
|
||||
pub fn and(mut self, new_node: InstructionPredicateNode) -> Self {
|
||||
let node = self.node;
|
||||
let mut and_nodes = match node {
|
||||
|
||||
Reference in New Issue
Block a user