Skip to content

Commit

Permalink
Try to fix some things
Browse files Browse the repository at this point in the history
* shift so that no panics are generated (otherwise results in linker error)
* no_std as insurance to not get into issues with errors like "cannot satisfy dependencies so `rustc_i128` only shows up once" (pure guessing here, but it doesn't hurt...)
  • Loading branch information
est31 committed Dec 30, 2016
1 parent 317810d commit 3e20462
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcompiler_builtins/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub mod reimpls {
($a: expr, $b: expr, $ty:ty) => {{
let (a, b) = ($a, $b);
let bits = (::core::mem::size_of::<$ty>() * 8) as $ty;
let half_bits = bits / 2;
let half_bits = bits >> 1;
if b & half_bits != 0 {
<$ty>::from_parts((a.high() >> (b - half_bits)) as <$ty as LargeInt>::LowHalf,
a.high() >> (half_bits - 1))
Expand All @@ -97,7 +97,7 @@ pub mod reimpls {
($a: expr, $b: expr, $ty:ty) => {{
let (a, b) = ($a, $b);
let bits = (::core::mem::size_of::<$ty>() * 8) as $ty;
let half_bits = bits / 2;
let half_bits = bits >> 1;
if b & half_bits != 0 {
<$ty>::from_parts(a.high() >> (b - half_bits), 0)
} else if b == 0 {
Expand Down
1 change: 1 addition & 0 deletions src/librustc_i128/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.
#![allow(non_camel_case_types)]
#![cfg_attr(not(stage0), feature(i128_type))]
#![no_std]
#![crate_type="rlib"]
#![crate_name="rustc_i128"]

Expand Down

0 comments on commit 3e20462

Please sign in to comment.