summaryrefslogtreecommitdiffstats
path: root/vendor/compiler_builtins/src/int
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/compiler_builtins/src/int')
-rw-r--r--vendor/compiler_builtins/src/int/addsub.rs2
-rw-r--r--vendor/compiler_builtins/src/int/mul.rs2
-rw-r--r--vendor/compiler_builtins/src/int/sdiv.rs2
-rw-r--r--vendor/compiler_builtins/src/int/shift.rs2
-rw-r--r--vendor/compiler_builtins/src/int/specialized_div_rem/binary_long.rs4
-rw-r--r--vendor/compiler_builtins/src/int/specialized_div_rem/mod.rs8
-rw-r--r--vendor/compiler_builtins/src/int/udiv.rs4
7 files changed, 15 insertions, 9 deletions
diff --git a/vendor/compiler_builtins/src/int/addsub.rs b/vendor/compiler_builtins/src/int/addsub.rs
index f4841e90f..f31eff4bd 100644
--- a/vendor/compiler_builtins/src/int/addsub.rs
+++ b/vendor/compiler_builtins/src/int/addsub.rs
@@ -1,4 +1,4 @@
-use int::{DInt, Int};
+use crate::int::{DInt, Int};
trait UAddSub: DInt {
fn uadd(self, other: Self) -> Self {
diff --git a/vendor/compiler_builtins/src/int/mul.rs b/vendor/compiler_builtins/src/int/mul.rs
index 07ce061c9..2538e2f41 100644
--- a/vendor/compiler_builtins/src/int/mul.rs
+++ b/vendor/compiler_builtins/src/int/mul.rs
@@ -1,4 +1,4 @@
-use int::{DInt, HInt, Int};
+use crate::int::{DInt, HInt, Int};
trait Mul: DInt
where
diff --git a/vendor/compiler_builtins/src/int/sdiv.rs b/vendor/compiler_builtins/src/int/sdiv.rs
index f1822f0f8..9d316c76e 100644
--- a/vendor/compiler_builtins/src/int/sdiv.rs
+++ b/vendor/compiler_builtins/src/int/sdiv.rs
@@ -1,4 +1,4 @@
-use int::udiv::*;
+use crate::int::udiv::*;
macro_rules! sdivmod {
(
diff --git a/vendor/compiler_builtins/src/int/shift.rs b/vendor/compiler_builtins/src/int/shift.rs
index c90cf1de3..dbd040187 100644
--- a/vendor/compiler_builtins/src/int/shift.rs
+++ b/vendor/compiler_builtins/src/int/shift.rs
@@ -1,4 +1,4 @@
-use int::{DInt, HInt, Int};
+use crate::int::{DInt, HInt, Int};
trait Ashl: DInt {
/// Returns `a << b`, requires `b < Self::BITS`
diff --git a/vendor/compiler_builtins/src/int/specialized_div_rem/binary_long.rs b/vendor/compiler_builtins/src/int/specialized_div_rem/binary_long.rs
index 0d7822882..2c61a45e0 100644
--- a/vendor/compiler_builtins/src/int/specialized_div_rem/binary_long.rs
+++ b/vendor/compiler_builtins/src/int/specialized_div_rem/binary_long.rs
@@ -13,9 +13,13 @@ macro_rules! impl_binary_long {
$n:tt, // the number of bits in a $iX or $uX
$uX:ident, // unsigned integer type for the inputs and outputs of `$fn`
$iX:ident // signed integer type with same bitwidth as `$uX`
+ $(, $fun_attr:meta)* // attributes for the function
) => {
/// Computes the quotient and remainder of `duo` divided by `div` and returns them as a
/// tuple.
+ $(
+ #[$fun_attr]
+ )*
pub fn $fn(duo: $uX, div: $uX) -> ($uX, $uX) {
let mut duo = duo;
// handle edge cases before calling `$normalization_shift`
diff --git a/vendor/compiler_builtins/src/int/specialized_div_rem/mod.rs b/vendor/compiler_builtins/src/int/specialized_div_rem/mod.rs
index 77034eb54..760f5f5b7 100644
--- a/vendor/compiler_builtins/src/int/specialized_div_rem/mod.rs
+++ b/vendor/compiler_builtins/src/int/specialized_div_rem/mod.rs
@@ -95,8 +95,9 @@ const USE_LZ: bool = {
// LZD or LZCNT on SPARC only exists for the VIS 3 extension and later.
cfg!(target_feature = "vis3")
} else if cfg!(any(target_arch = "riscv32", target_arch = "riscv64")) {
- // The `B` extension on RISC-V determines if a CLZ assembly instruction exists
- cfg!(target_feature = "b")
+ // The 'Zbb' Basic Bit-Manipulation extension on RISC-V
+ // determines if a CLZ assembly instruction exists
+ cfg!(target_feature = "zbb")
} else {
// All other common targets Rust supports should have CLZ instructions
true
@@ -305,5 +306,6 @@ impl_binary_long!(
u32_normalization_shift,
32,
u32,
- i32
+ i32,
+ allow(dead_code)
);
diff --git a/vendor/compiler_builtins/src/int/udiv.rs b/vendor/compiler_builtins/src/int/udiv.rs
index fb09f87d8..c891eede4 100644
--- a/vendor/compiler_builtins/src/int/udiv.rs
+++ b/vendor/compiler_builtins/src/int/udiv.rs
@@ -1,8 +1,8 @@
#[cfg(not(feature = "public-test-deps"))]
-pub(crate) use int::specialized_div_rem::*;
+pub(crate) use crate::int::specialized_div_rem::*;
#[cfg(feature = "public-test-deps")]
-pub use int::specialized_div_rem::*;
+pub use crate::int::specialized_div_rem::*;
intrinsics! {
#[maybe_use_optimized_c_shim]