Skip to content

Commit 32d6c0f

Browse files
committed
Big update
1 parent 4a69a34 commit 32d6c0f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/int/big.rs

-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ macro_rules! impl_common {
194194
impl_common!(i256);
195195
impl_common!(u256);
196196

197-
198197
macro_rules! word {
199198
(1, $val:expr) => {
200199
(($val >> (32 * 3)) & Self::from(WORD_LO_MASK)) as u64

src/int/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ pub mod sdiv;
1010
pub mod shift;
1111
pub mod udiv;
1212

13-
pub use self::leading_zeros::__clzsi2;
13+
pub use leading_zeros::__clzsi2;
14+
pub use big::{i256, u256};
1415

1516
public_test_dep! {
1617
/// Minimal integer implementations needed on all integer types, including wide integers.

testcrate/tests/big.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use compiler_builtins::int::{i256, u256, HInt};
2+
3+
#[test]
4+
fn widen() {
5+
assert_eq!(u128::MAX.widen(), u256([u64::MAX, u64::MAX, 0, 0]));
6+
assert_eq!(
7+
0xaaaaaaaaaaaaaaaaffffffffffffffff_u128.widen(),
8+
u256([u64::MAX, 0xaaaaaaaaaaaaaaaa, 0, 0])
9+
);
10+
}

0 commit comments

Comments
 (0)