summaryrefslogtreecommitdiffstats
path: root/vendor/compiler_builtins/src/int
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /vendor/compiler_builtins/src/int
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/compiler_builtins/src/int')
-rw-r--r--vendor/compiler_builtins/src/int/shift.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/vendor/compiler_builtins/src/int/shift.rs b/vendor/compiler_builtins/src/int/shift.rs
index 2d2c081a6..c90cf1de3 100644
--- a/vendor/compiler_builtins/src/int/shift.rs
+++ b/vendor/compiler_builtins/src/int/shift.rs
@@ -12,7 +12,7 @@ trait Ashl: DInt {
} else {
Self::from_lo_hi(
self.lo().wrapping_shl(shl),
- self.lo().logical_shr(n_h - shl) | self.hi().wrapping_shl(shl),
+ self.lo().logical_shr(n_h.wrapping_sub(shl)) | self.hi().wrapping_shl(shl),
)
}
}
@@ -36,7 +36,7 @@ trait Ashr: DInt {
self
} else {
Self::from_lo_hi(
- self.lo().logical_shr(shr) | self.hi().wrapping_shl(n_h - shr),
+ self.lo().logical_shr(shr) | self.hi().wrapping_shl(n_h.wrapping_sub(shr)),
self.hi().wrapping_shr(shr),
)
}
@@ -57,7 +57,7 @@ trait Lshr: DInt {
self
} else {
Self::from_lo_hi(
- self.lo().logical_shr(shr) | self.hi().wrapping_shl(n_h - shr),
+ self.lo().logical_shr(shr) | self.hi().wrapping_shl(n_h.wrapping_sub(shr)),
self.hi().logical_shr(shr),
)
}
@@ -78,8 +78,8 @@ intrinsics! {
#[avr_skip]
#[maybe_use_optimized_c_shim]
#[arm_aeabi_alias = __aeabi_llsl]
- pub extern "C" fn __ashldi3(a: u64, b: u32) -> u64 {
- a.ashl(b)
+ pub extern "C" fn __ashldi3(a: u64, b: core::ffi::c_uint) -> u64 {
+ a.ashl(b as u32)
}
#[avr_skip]
@@ -96,8 +96,8 @@ intrinsics! {
#[avr_skip]
#[maybe_use_optimized_c_shim]
#[arm_aeabi_alias = __aeabi_lasr]
- pub extern "C" fn __ashrdi3(a: i64, b: u32) -> i64 {
- a.ashr(b)
+ pub extern "C" fn __ashrdi3(a: i64, b: core::ffi::c_uint) -> i64 {
+ a.ashr(b as u32)
}
#[avr_skip]
@@ -114,8 +114,8 @@ intrinsics! {
#[avr_skip]
#[maybe_use_optimized_c_shim]
#[arm_aeabi_alias = __aeabi_llsr]
- pub extern "C" fn __lshrdi3(a: u64, b: u32) -> u64 {
- a.lshr(b)
+ pub extern "C" fn __lshrdi3(a: u64, b: core::ffi::c_uint) -> u64 {
+ a.lshr(b as u32)
}
#[avr_skip]