Skip to content

Commit 4bd389c

Browse files
committed
remove some SSE/SSE2 intrinsics that are no longer used by stdarch
1 parent b0dd0a8 commit 4bd389c

File tree

2 files changed

+2
-46
lines changed

2 files changed

+2
-46
lines changed

src/shims/x86/sse.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,14 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
2929
// performed only on the first element, copying the remaining elements from the input
3030
// vector (for binary operations, from the left-hand side).
3131
match unprefixed_name {
32-
// Used to implement _mm_{add,sub,mul,div,min,max}_ss functions.
32+
// Used to implement _mm_{min,max}_ss functions.
3333
// Performs the operations on the first component of `left` and
3434
// `right` and copies the remaining components from `left`.
35-
"add.ss" | "sub.ss" | "mul.ss" | "div.ss" | "min.ss" | "max.ss" => {
35+
"min.ss" | "max.ss" => {
3636
let [left, right] =
3737
this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
3838

3939
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),
4440
"min.ss" => FloatBinOp::Min,
4541
"max.ss" => FloatBinOp::Max,
4642
_ => unreachable!(),

src/shims/x86/sse2.rs

-40
Original file line numberDiff line numberDiff line change
@@ -227,46 +227,6 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
227227

228228
bin_op_simd_float_all::<Double>(this, which, left, right, dest)?;
229229
}
230-
// Used to implement _mm_sqrt_sd functions.
231-
// Performs the operations on the first component of `op` and
232-
// copies the remaining components from `op`.
233-
"sqrt.sd" => {
234-
let [op] = this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
235-
236-
let (op, op_len) = this.operand_to_simd(op)?;
237-
let (dest, dest_len) = this.mplace_to_simd(dest)?;
238-
239-
assert_eq!(dest_len, op_len);
240-
241-
let op0 = this.read_scalar(&this.project_index(&op, 0)?)?.to_u64()?;
242-
// FIXME using host floats
243-
let res0 = Scalar::from_u64(f64::from_bits(op0).sqrt().to_bits());
244-
this.write_scalar(res0, &this.project_index(&dest, 0)?)?;
245-
246-
for i in 1..dest_len {
247-
this.copy_op(&this.project_index(&op, i)?, &this.project_index(&dest, i)?)?;
248-
}
249-
}
250-
// Used to implement _mm_sqrt_pd functions.
251-
// Performs the operations on all components of `op`.
252-
"sqrt.pd" => {
253-
let [op] = this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
254-
255-
let (op, op_len) = this.operand_to_simd(op)?;
256-
let (dest, dest_len) = this.mplace_to_simd(dest)?;
257-
258-
assert_eq!(dest_len, op_len);
259-
260-
for i in 0..dest_len {
261-
let op = this.read_scalar(&this.project_index(&op, i)?)?.to_u64()?;
262-
let dest = this.project_index(&dest, i)?;
263-
264-
// FIXME using host floats
265-
let res = Scalar::from_u64(f64::from_bits(op).sqrt().to_bits());
266-
267-
this.write_scalar(res, &dest)?;
268-
}
269-
}
270230
// Used to implement the _mm_cmp*_sd functions.
271231
// Performs a comparison operation on the first component of `left`
272232
// and `right`, returning 0 if false or `u64::MAX` if true. The remaining

0 commit comments

Comments
 (0)