mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
Fix _mm_sm3rnds2_epi32
This commit is contained in:
@@ -45,9 +45,6 @@ _mm_set1_pch
|
||||
_tpause
|
||||
_umwait
|
||||
|
||||
# IMM8 must be an even number in the range `0..=62`
|
||||
_mm_sm3rnds2_epi32
|
||||
|
||||
# SDE ERROR: Cannot execute XGETBV with ECX != 0
|
||||
_xgetbv
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
use crate::common::constraint::Constraint;
|
||||
|
||||
pub fn map_constraints(imm_type: &String, imm_width: u32) -> Option<Constraint> {
|
||||
pub fn map_constraints(fn_name: &str, imm_type: &String, imm_width: u32) -> Option<Constraint> {
|
||||
if imm_width > 0 {
|
||||
if fn_name == "_mm_sm3rnds2_epi32" {
|
||||
return Some(Constraint::Set((0..64).step_by(2).collect()));
|
||||
}
|
||||
let max: i64 = 2i64.pow(imm_width);
|
||||
return Some(Constraint::Range(0..max));
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ fn xml_to_intrinsic(
|
||||
} else {
|
||||
param.imm_width
|
||||
};
|
||||
let constraint = map_constraints(¶m.imm_type, effective_imm_width);
|
||||
let constraint = map_constraints(&name, ¶m.imm_type, effective_imm_width);
|
||||
let arg = Argument::<X86IntrinsicType>::new(
|
||||
i,
|
||||
param.var_name.clone(),
|
||||
|
||||
Reference in New Issue
Block a user