11use rustc_apfloat:: ieee:: Single ;
2- use rustc_middle:: mir;
32use rustc_span:: Symbol ;
43use rustc_target:: spec:: abi:: Abi ;
54
@@ -29,18 +28,14 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
2928 // performed only on the first element, copying the remaining elements from the input
3029 // vector (for binary operations, from the left-hand side).
3130 match unprefixed_name {
32- // Used to implement _mm_{add,sub,mul,div, min,max}_ss functions.
31+ // Used to implement _mm_{min,max}_ss functions.
3332 // Performs the operations on the first component of `left` and
3433 // `right` and copies the remaining components from `left`.
35- "add.ss" | "sub.ss" | "mul.ss" | "div.ss" | " min.ss" | "max.ss" => {
34+ "min.ss" | "max.ss" => {
3635 let [ left, right] =
3736 this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
3837
3938 let which = match unprefixed_name {
40- "add.ss" => FloatBinOp :: Arith ( mir:: BinOp :: Add ) ,
41- "sub.ss" => FloatBinOp :: Arith ( mir:: BinOp :: Sub ) ,
42- "mul.ss" => FloatBinOp :: Arith ( mir:: BinOp :: Mul ) ,
43- "div.ss" => FloatBinOp :: Arith ( mir:: BinOp :: Div ) ,
4439 "min.ss" => FloatBinOp :: Min ,
4540 "max.ss" => FloatBinOp :: Max ,
4641 _ => unreachable ! ( ) ,
@@ -65,14 +60,13 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
6560
6661 bin_op_simd_float_all :: < Single > ( this, which, left, right, dest) ?;
6762 }
68- // Used to implement _mm_{sqrt, rcp,rsqrt}_ss functions.
63+ // Used to implement _mm_{rcp,rsqrt}_ss functions.
6964 // Performs the operations on the first component of `op` and
7065 // copies the remaining components from `op`.
71- "sqrt.ss" | " rcp.ss" | "rsqrt.ss" => {
66+ "rcp.ss" | "rsqrt.ss" => {
7267 let [ op] = this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
7368
7469 let which = match unprefixed_name {
75- "sqrt.ss" => FloatUnaryOp :: Sqrt ,
7670 "rcp.ss" => FloatUnaryOp :: Rcp ,
7771 "rsqrt.ss" => FloatUnaryOp :: Rsqrt ,
7872 _ => unreachable ! ( ) ,
@@ -82,11 +76,10 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
8276 }
8377 // Used to implement _mm_{sqrt,rcp,rsqrt}_ps functions.
8478 // Performs the operations on all components of `op`.
85- "sqrt.ps" | " rcp.ps" | "rsqrt.ps" => {
79+ "rcp.ps" | "rsqrt.ps" => {
8680 let [ op] = this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
8781
8882 let which = match unprefixed_name {
89- "sqrt.ps" => FloatUnaryOp :: Sqrt ,
9083 "rcp.ps" => FloatUnaryOp :: Rcp ,
9184 "rsqrt.ps" => FloatUnaryOp :: Rsqrt ,
9285 _ => unreachable ! ( ) ,
0 commit comments