Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
The Miri Conjob Bot committed Feb 16, 2024
1 parent f1abde7 commit 840ca09
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 28 deletions.
15 changes: 3 additions & 12 deletions src/tools/miri/src/shims/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,7 @@ fn bin_op_simd_float_first<'tcx, F: rustc_apfloat::Float>(
this.write_scalar(res0, &this.project_index(&dest, 0)?)?;

for i in 1..dest_len {
this.copy_op(
&this.project_index(&left, i)?,
&this.project_index(&dest, i)?,
)?;
this.copy_op(&this.project_index(&left, i)?, &this.project_index(&dest, i)?)?;
}

Ok(())
Expand Down Expand Up @@ -420,10 +417,7 @@ fn unary_op_ss<'tcx>(
this.write_scalar(res0, &this.project_index(&dest, 0)?)?;

for i in 1..dest_len {
this.copy_op(
&this.project_index(&op, i)?,
&this.project_index(&dest, i)?,
)?;
this.copy_op(&this.project_index(&op, i)?, &this.project_index(&dest, i)?)?;
}

Ok(())
Expand Down Expand Up @@ -479,10 +473,7 @@ fn round_first<'tcx, F: rustc_apfloat::Float>(
)?;

for i in 1..dest_len {
this.copy_op(
&this.project_index(&left, i)?,
&this.project_index(&dest, i)?,
)?;
this.copy_op(&this.project_index(&left, i)?, &this.project_index(&dest, i)?)?;
}

Ok(())
Expand Down
5 changes: 1 addition & 4 deletions src/tools/miri/src/shims/x86/sse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
this.write_immediate(*res0, &dest0)?;

for i in 1..dest_len {
this.copy_op(
&this.project_index(&left, i)?,
&this.project_index(&dest, i)?,
)?;
this.copy_op(&this.project_index(&left, i)?, &this.project_index(&dest, i)?)?;
}
}
_ => return Ok(EmulateForeignItemResult::NotSupported),
Expand Down
10 changes: 2 additions & 8 deletions src/tools/miri/src/shims/x86/sse2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
this.write_scalar(res0, &this.project_index(&dest, 0)?)?;

for i in 1..dest_len {
this.copy_op(
&this.project_index(&op, i)?,
&this.project_index(&dest, i)?,
)?;
this.copy_op(&this.project_index(&op, i)?, &this.project_index(&dest, i)?)?;
}
}
// Used to implement _mm_sqrt_pd functions.
Expand Down Expand Up @@ -580,10 +577,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:

// Copy remianing from `left`
for i in 1..dest_len {
this.copy_op(
&this.project_index(&left, i)?,
&this.project_index(&dest, i)?,
)?;
this.copy_op(&this.project_index(&left, i)?, &this.project_index(&dest, i)?)?;
}
}
// Used to implement the `_mm_pause` function.
Expand Down
5 changes: 1 addition & 4 deletions src/tools/miri/src/shims/x86/sse41.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
this.write_immediate(*src_value, &dest)?;
} else {
// copy from `left`
this.copy_op(
&this.project_index(&left, i)?,
&dest,
)?;
this.copy_op(&this.project_index(&left, i)?, &dest)?;
}
}
}
Expand Down

0 comments on commit 840ca09

Please sign in to comment.