Skip to content

Commit

Permalink
Skip asm under miri
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed May 5, 2024
1 parent ecec8c4 commit b02188d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/biguint/division.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub(super) const FAST_DIV_WIDE: bool = cfg!(any(target_arch = "x86", target_arch
/// This is _not_ true for an arbitrary numerator/denominator.
///
/// (This function also matches what the x86 divide instruction does).
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
#[cfg(any(miri, not(any(target_arch = "x86", target_arch = "x86_64"))))]
#[inline]
fn div_wide(hi: BigDigit, lo: BigDigit, divisor: BigDigit) -> (BigDigit, BigDigit) {
debug_assert!(hi < divisor);
Expand All @@ -29,7 +29,7 @@ fn div_wide(hi: BigDigit, lo: BigDigit, divisor: BigDigit) -> (BigDigit, BigDigi
}

/// x86 and x86_64 can use a real `div` instruction.
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[cfg(all(not(miri), any(target_arch = "x86", target_arch = "x86_64")))]
#[inline]
fn div_wide(hi: BigDigit, lo: BigDigit, divisor: BigDigit) -> (BigDigit, BigDigit) {
// This debug assertion covers the potential #DE for divisor==0 or a quotient too large for one
Expand Down

0 comments on commit b02188d

Please sign in to comment.