Make them all `pub`
This commit is contained in:
parent
665f268872
commit
ed89a17f25
|
@ -46,25 +46,21 @@ impl Addo for i128 {}
|
|||
impl Addo for u128 {}
|
||||
|
||||
#[cfg_attr(not(stage0), lang = "i128_add")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_add(a: i128, b: i128) -> i128 {
|
||||
pub fn rust_i128_add(a: i128, b: i128) -> i128 {
|
||||
rust_u128_add(a as _, b as _) as _
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "i128_addo")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_addo(a: i128, b: i128) -> (i128, bool) {
|
||||
pub fn rust_i128_addo(a: i128, b: i128) -> (i128, bool) {
|
||||
let mut oflow = 0;
|
||||
let r = a.addo(b, &mut oflow);
|
||||
(r, oflow != 0)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_add")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_add(a: u128, b: u128) -> u128 {
|
||||
pub fn rust_u128_add(a: u128, b: u128) -> u128 {
|
||||
a.add(b)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_addo")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_addo(a: u128, b: u128) -> (u128, bool) {
|
||||
pub fn rust_u128_addo(a: u128, b: u128) -> (u128, bool) {
|
||||
let mut oflow = 0;
|
||||
let r = a.addo(b, &mut oflow);
|
||||
(r, oflow != 0)
|
||||
|
|
|
@ -109,25 +109,21 @@ intrinsics! {
|
|||
}
|
||||
|
||||
#[cfg_attr(not(stage0), lang = "i128_mul")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_mul(a: i128, b: i128) -> i128 {
|
||||
pub fn rust_i128_mul(a: i128, b: i128) -> i128 {
|
||||
__multi3(a, b)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "i128_mulo")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_mulo(a: i128, b: i128) -> (i128, bool) {
|
||||
pub fn rust_i128_mulo(a: i128, b: i128) -> (i128, bool) {
|
||||
let mut oflow = 0;
|
||||
let r = __muloti4(a, b, &mut oflow);
|
||||
(r, oflow != 0)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_mul")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_mul(a: u128, b: u128) -> u128 {
|
||||
pub fn rust_u128_mul(a: u128, b: u128) -> u128 {
|
||||
__multi3(a as _, b as _) as _
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_mulo")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_mulo(a: u128, b: u128) -> (u128, bool) {
|
||||
pub fn rust_u128_mulo(a: u128, b: u128) -> (u128, bool) {
|
||||
let mut oflow = 0;
|
||||
let r = a.mulo(b, &mut oflow);
|
||||
(r, oflow != 0)
|
||||
|
|
|
@ -99,12 +99,10 @@ intrinsics! {
|
|||
}
|
||||
|
||||
#[cfg_attr(not(stage0), lang = "i128_div")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_div(a: i128, b: i128) -> i128 {
|
||||
pub fn rust_i128_div(a: i128, b: i128) -> i128 {
|
||||
__divti3(a, b)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "i128_rem")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_rem(a: i128, b: i128) -> i128 {
|
||||
pub fn rust_i128_rem(a: i128, b: i128) -> i128 {
|
||||
__modti3(a, b)
|
||||
}
|
||||
|
|
|
@ -97,43 +97,35 @@ intrinsics! {
|
|||
}
|
||||
|
||||
#[cfg_attr(not(stage0), lang = "i128_shl")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_shl(a: i128, b: u32) -> i128 {
|
||||
pub fn rust_i128_shl(a: i128, b: u32) -> i128 {
|
||||
__ashlti3(a as _, b) as _
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "i128_shlo")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_shlo(a: i128, b: u128) -> (i128, bool) {
|
||||
pub fn rust_i128_shlo(a: i128, b: u128) -> (i128, bool) {
|
||||
(rust_i128_shl(a, b as _), b >= 128)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_shl")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_shl(a: u128, b: u32) -> u128 {
|
||||
pub fn rust_u128_shl(a: u128, b: u32) -> u128 {
|
||||
__ashlti3(a, b)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_shlo")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_shlo(a: u128, b: u128) -> (u128, bool) {
|
||||
pub fn rust_u128_shlo(a: u128, b: u128) -> (u128, bool) {
|
||||
(rust_u128_shl(a, b as _), b >= 128)
|
||||
}
|
||||
|
||||
#[cfg_attr(not(stage0), lang = "i128_shr")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_shr(a: i128, b: u32) -> i128 {
|
||||
pub fn rust_i128_shr(a: i128, b: u32) -> i128 {
|
||||
__ashrti3(a, b)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "i128_shro")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_shro(a: i128, b: u128) -> (i128, bool) {
|
||||
pub fn rust_i128_shro(a: i128, b: u128) -> (i128, bool) {
|
||||
(rust_i128_shr(a, b as _), b >= 128)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_shr")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_shr(a: u128, b: u32) -> u128 {
|
||||
pub fn rust_u128_shr(a: u128, b: u32) -> u128 {
|
||||
__lshrti3(a, b)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_shro")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_shro(a: u128, b: u128) -> (u128, bool) {
|
||||
pub fn rust_u128_shro(a: u128, b: u128) -> (u128, bool) {
|
||||
(rust_u128_shr(a, b as _), b >= 128)
|
||||
}
|
||||
|
|
|
@ -31,25 +31,21 @@ impl Subo for i128 {}
|
|||
impl Subo for u128 {}
|
||||
|
||||
#[cfg_attr(not(stage0), lang = "i128_sub")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_sub(a: i128, b: i128) -> i128 {
|
||||
pub fn rust_i128_sub(a: i128, b: i128) -> i128 {
|
||||
rust_u128_sub(a as _, b as _) as _
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "i128_subo")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_i128_subo(a: i128, b: i128) -> (i128, bool) {
|
||||
pub fn rust_i128_subo(a: i128, b: i128) -> (i128, bool) {
|
||||
let mut oflow = 0;
|
||||
let r = a.subo(b, &mut oflow);
|
||||
(r, oflow != 0)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_sub")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_sub(a: u128, b: u128) -> u128 {
|
||||
pub fn rust_u128_sub(a: u128, b: u128) -> u128 {
|
||||
a.sub(b)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_subo")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_subo(a: u128, b: u128) -> (u128, bool) {
|
||||
pub fn rust_u128_subo(a: u128, b: u128) -> (u128, bool) {
|
||||
let mut oflow = 0;
|
||||
let r = a.subo(b, &mut oflow);
|
||||
(r, oflow != 0)
|
||||
|
|
|
@ -271,12 +271,10 @@ intrinsics! {
|
|||
}
|
||||
|
||||
#[cfg_attr(not(stage0), lang = "u128_div")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_div(a: u128, b: u128) -> u128 {
|
||||
pub fn rust_u128_div(a: u128, b: u128) -> u128 {
|
||||
__udivti3(a, b)
|
||||
}
|
||||
#[cfg_attr(not(stage0), lang = "u128_rem")]
|
||||
#[allow(dead_code)]
|
||||
fn rust_u128_rem(a: u128, b: u128) -> u128 {
|
||||
pub fn rust_u128_rem(a: u128, b: u128) -> u128 {
|
||||
__umodti3(a, b)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue