Skip to content

Commit ed89a17

Browse files
committed
Make them all pub
1 parent 665f268 commit ed89a17

File tree

6 files changed

+24
-48
lines changed

6 files changed

+24
-48
lines changed

src/int/add.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,21 @@ impl Addo for i128 {}
4646
impl Addo for u128 {}
4747

4848
#[cfg_attr(not(stage0), lang = "i128_add")]
49-
#[allow(dead_code)]
50-
fn rust_i128_add(a: i128, b: i128) -> i128 {
49+
pub fn rust_i128_add(a: i128, b: i128) -> i128 {
5150
rust_u128_add(a as _, b as _) as _
5251
}
5352
#[cfg_attr(not(stage0), lang = "i128_addo")]
54-
#[allow(dead_code)]
55-
fn rust_i128_addo(a: i128, b: i128) -> (i128, bool) {
53+
pub fn rust_i128_addo(a: i128, b: i128) -> (i128, bool) {
5654
let mut oflow = 0;
5755
let r = a.addo(b, &mut oflow);
5856
(r, oflow != 0)
5957
}
6058
#[cfg_attr(not(stage0), lang = "u128_add")]
61-
#[allow(dead_code)]
62-
fn rust_u128_add(a: u128, b: u128) -> u128 {
59+
pub fn rust_u128_add(a: u128, b: u128) -> u128 {
6360
a.add(b)
6461
}
6562
#[cfg_attr(not(stage0), lang = "u128_addo")]
66-
#[allow(dead_code)]
67-
fn rust_u128_addo(a: u128, b: u128) -> (u128, bool) {
63+
pub fn rust_u128_addo(a: u128, b: u128) -> (u128, bool) {
6864
let mut oflow = 0;
6965
let r = a.addo(b, &mut oflow);
7066
(r, oflow != 0)

src/int/mul.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -109,25 +109,21 @@ intrinsics! {
109109
}
110110

111111
#[cfg_attr(not(stage0), lang = "i128_mul")]
112-
#[allow(dead_code)]
113-
fn rust_i128_mul(a: i128, b: i128) -> i128 {
112+
pub fn rust_i128_mul(a: i128, b: i128) -> i128 {
114113
__multi3(a, b)
115114
}
116115
#[cfg_attr(not(stage0), lang = "i128_mulo")]
117-
#[allow(dead_code)]
118-
fn rust_i128_mulo(a: i128, b: i128) -> (i128, bool) {
116+
pub fn rust_i128_mulo(a: i128, b: i128) -> (i128, bool) {
119117
let mut oflow = 0;
120118
let r = __muloti4(a, b, &mut oflow);
121119
(r, oflow != 0)
122120
}
123121
#[cfg_attr(not(stage0), lang = "u128_mul")]
124-
#[allow(dead_code)]
125-
fn rust_u128_mul(a: u128, b: u128) -> u128 {
122+
pub fn rust_u128_mul(a: u128, b: u128) -> u128 {
126123
__multi3(a as _, b as _) as _
127124
}
128125
#[cfg_attr(not(stage0), lang = "u128_mulo")]
129-
#[allow(dead_code)]
130-
fn rust_u128_mulo(a: u128, b: u128) -> (u128, bool) {
126+
pub fn rust_u128_mulo(a: u128, b: u128) -> (u128, bool) {
131127
let mut oflow = 0;
132128
let r = a.mulo(b, &mut oflow);
133129
(r, oflow != 0)

src/int/sdiv.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,10 @@ intrinsics! {
9999
}
100100

101101
#[cfg_attr(not(stage0), lang = "i128_div")]
102-
#[allow(dead_code)]
103-
fn rust_i128_div(a: i128, b: i128) -> i128 {
102+
pub fn rust_i128_div(a: i128, b: i128) -> i128 {
104103
__divti3(a, b)
105104
}
106105
#[cfg_attr(not(stage0), lang = "i128_rem")]
107-
#[allow(dead_code)]
108-
fn rust_i128_rem(a: i128, b: i128) -> i128 {
106+
pub fn rust_i128_rem(a: i128, b: i128) -> i128 {
109107
__modti3(a, b)
110108
}

src/int/shift.rs

+8-16
Original file line numberDiff line numberDiff line change
@@ -97,43 +97,35 @@ intrinsics! {
9797
}
9898

9999
#[cfg_attr(not(stage0), lang = "i128_shl")]
100-
#[allow(dead_code)]
101-
fn rust_i128_shl(a: i128, b: u32) -> i128 {
100+
pub fn rust_i128_shl(a: i128, b: u32) -> i128 {
102101
__ashlti3(a as _, b) as _
103102
}
104103
#[cfg_attr(not(stage0), lang = "i128_shlo")]
105-
#[allow(dead_code)]
106-
fn rust_i128_shlo(a: i128, b: u128) -> (i128, bool) {
104+
pub fn rust_i128_shlo(a: i128, b: u128) -> (i128, bool) {
107105
(rust_i128_shl(a, b as _), b >= 128)
108106
}
109107
#[cfg_attr(not(stage0), lang = "u128_shl")]
110-
#[allow(dead_code)]
111-
fn rust_u128_shl(a: u128, b: u32) -> u128 {
108+
pub fn rust_u128_shl(a: u128, b: u32) -> u128 {
112109
__ashlti3(a, b)
113110
}
114111
#[cfg_attr(not(stage0), lang = "u128_shlo")]
115-
#[allow(dead_code)]
116-
fn rust_u128_shlo(a: u128, b: u128) -> (u128, bool) {
112+
pub fn rust_u128_shlo(a: u128, b: u128) -> (u128, bool) {
117113
(rust_u128_shl(a, b as _), b >= 128)
118114
}
119115

120116
#[cfg_attr(not(stage0), lang = "i128_shr")]
121-
#[allow(dead_code)]
122-
fn rust_i128_shr(a: i128, b: u32) -> i128 {
117+
pub fn rust_i128_shr(a: i128, b: u32) -> i128 {
123118
__ashrti3(a, b)
124119
}
125120
#[cfg_attr(not(stage0), lang = "i128_shro")]
126-
#[allow(dead_code)]
127-
fn rust_i128_shro(a: i128, b: u128) -> (i128, bool) {
121+
pub fn rust_i128_shro(a: i128, b: u128) -> (i128, bool) {
128122
(rust_i128_shr(a, b as _), b >= 128)
129123
}
130124
#[cfg_attr(not(stage0), lang = "u128_shr")]
131-
#[allow(dead_code)]
132-
fn rust_u128_shr(a: u128, b: u32) -> u128 {
125+
pub fn rust_u128_shr(a: u128, b: u32) -> u128 {
133126
__lshrti3(a, b)
134127
}
135128
#[cfg_attr(not(stage0), lang = "u128_shro")]
136-
#[allow(dead_code)]
137-
fn rust_u128_shro(a: u128, b: u128) -> (u128, bool) {
129+
pub fn rust_u128_shro(a: u128, b: u128) -> (u128, bool) {
138130
(rust_u128_shr(a, b as _), b >= 128)
139131
}

src/int/sub.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,21 @@ impl Subo for i128 {}
3131
impl Subo for u128 {}
3232

3333
#[cfg_attr(not(stage0), lang = "i128_sub")]
34-
#[allow(dead_code)]
35-
fn rust_i128_sub(a: i128, b: i128) -> i128 {
34+
pub fn rust_i128_sub(a: i128, b: i128) -> i128 {
3635
rust_u128_sub(a as _, b as _) as _
3736
}
3837
#[cfg_attr(not(stage0), lang = "i128_subo")]
39-
#[allow(dead_code)]
40-
fn rust_i128_subo(a: i128, b: i128) -> (i128, bool) {
38+
pub fn rust_i128_subo(a: i128, b: i128) -> (i128, bool) {
4139
let mut oflow = 0;
4240
let r = a.subo(b, &mut oflow);
4341
(r, oflow != 0)
4442
}
4543
#[cfg_attr(not(stage0), lang = "u128_sub")]
46-
#[allow(dead_code)]
47-
fn rust_u128_sub(a: u128, b: u128) -> u128 {
44+
pub fn rust_u128_sub(a: u128, b: u128) -> u128 {
4845
a.sub(b)
4946
}
5047
#[cfg_attr(not(stage0), lang = "u128_subo")]
51-
#[allow(dead_code)]
52-
fn rust_u128_subo(a: u128, b: u128) -> (u128, bool) {
48+
pub fn rust_u128_subo(a: u128, b: u128) -> (u128, bool) {
5349
let mut oflow = 0;
5450
let r = a.subo(b, &mut oflow);
5551
(r, oflow != 0)

src/int/udiv.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,10 @@ intrinsics! {
271271
}
272272

273273
#[cfg_attr(not(stage0), lang = "u128_div")]
274-
#[allow(dead_code)]
275-
fn rust_u128_div(a: u128, b: u128) -> u128 {
274+
pub fn rust_u128_div(a: u128, b: u128) -> u128 {
276275
__udivti3(a, b)
277276
}
278277
#[cfg_attr(not(stage0), lang = "u128_rem")]
279-
#[allow(dead_code)]
280-
fn rust_u128_rem(a: u128, b: u128) -> u128 {
278+
pub fn rust_u128_rem(a: u128, b: u128) -> u128 {
281279
__umodti3(a, b)
282280
}

0 commit comments

Comments
 (0)