Skip to content

Commit b02188d

Browse files
committed
Skip asm under miri
1 parent ecec8c4 commit b02188d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/biguint/division.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub(super) const FAST_DIV_WIDE: bool = cfg!(any(target_arch = "x86", target_arch
1818
/// This is _not_ true for an arbitrary numerator/denominator.
1919
///
2020
/// (This function also matches what the x86 divide instruction does).
21-
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
21+
#[cfg(any(miri, not(any(target_arch = "x86", target_arch = "x86_64"))))]
2222
#[inline]
2323
fn div_wide(hi: BigDigit, lo: BigDigit, divisor: BigDigit) -> (BigDigit, BigDigit) {
2424
debug_assert!(hi < divisor);
@@ -29,7 +29,7 @@ fn div_wide(hi: BigDigit, lo: BigDigit, divisor: BigDigit) -> (BigDigit, BigDigi
2929
}
3030

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

0 commit comments

Comments
 (0)