1
1
use rustc_apfloat:: ieee:: Single ;
2
- use rustc_middle:: mir;
3
2
use rustc_span:: Symbol ;
4
3
use rustc_target:: spec:: abi:: Abi ;
5
4
@@ -29,18 +28,14 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
29
28
// performed only on the first element, copying the remaining elements from the input
30
29
// vector (for binary operations, from the left-hand side).
31
30
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.
33
32
// Performs the operations on the first component of `left` and
34
33
// `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" => {
36
35
let [ left, right] =
37
36
this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
38
37
39
38
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 ) ,
44
39
"min.ss" => FloatBinOp :: Min ,
45
40
"max.ss" => FloatBinOp :: Max ,
46
41
_ => unreachable ! ( ) ,
@@ -65,14 +60,13 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
65
60
66
61
bin_op_simd_float_all :: < Single > ( this, which, left, right, dest) ?;
67
62
}
68
- // Used to implement _mm_{sqrt, rcp,rsqrt}_ss functions.
63
+ // Used to implement _mm_{rcp,rsqrt}_ss functions.
69
64
// Performs the operations on the first component of `op` and
70
65
// copies the remaining components from `op`.
71
- "sqrt.ss" | " rcp.ss" | "rsqrt.ss" => {
66
+ "rcp.ss" | "rsqrt.ss" => {
72
67
let [ op] = this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
73
68
74
69
let which = match unprefixed_name {
75
- "sqrt.ss" => FloatUnaryOp :: Sqrt ,
76
70
"rcp.ss" => FloatUnaryOp :: Rcp ,
77
71
"rsqrt.ss" => FloatUnaryOp :: Rsqrt ,
78
72
_ => unreachable ! ( ) ,
@@ -82,11 +76,10 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
82
76
}
83
77
// Used to implement _mm_{sqrt,rcp,rsqrt}_ps functions.
84
78
// Performs the operations on all components of `op`.
85
- "sqrt.ps" | " rcp.ps" | "rsqrt.ps" => {
79
+ "rcp.ps" | "rsqrt.ps" => {
86
80
let [ op] = this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
87
81
88
82
let which = match unprefixed_name {
89
- "sqrt.ps" => FloatUnaryOp :: Sqrt ,
90
83
"rcp.ps" => FloatUnaryOp :: Rcp ,
91
84
"rsqrt.ps" => FloatUnaryOp :: Rsqrt ,
92
85
_ => unreachable ! ( ) ,
0 commit comments