Fix compilation on nightly.
This commit is contained in:
parent
7c4417e54f
commit
8816fcbab4
|
@ -4,7 +4,7 @@ homepage = "http://parity.io"
|
||||||
repository = "https://github.com/ethcore/bigint"
|
repository = "https://github.com/ethcore/bigint"
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
name = "bigint"
|
name = "bigint"
|
||||||
version = "2.0.0"
|
version = "2.0.1"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
|
|
12
src/uint.rs
12
src/uint.rs
|
@ -86,7 +86,7 @@ macro_rules! uint_overflowing_add_reg {
|
||||||
#[cfg(all(asm_available, target_arch="x86_64"))]
|
#[cfg(all(asm_available, target_arch="x86_64"))]
|
||||||
macro_rules! uint_overflowing_add {
|
macro_rules! uint_overflowing_add {
|
||||||
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
||||||
let mut result: [u64; $n_words] = unsafe { mem::uninitialized() };
|
let mut result: [u64; $n_words] = unsafe { ::std::mem::uninitialized() };
|
||||||
let self_t: &[u64; $n_words] = &$self_expr.0;
|
let self_t: &[u64; $n_words] = &$self_expr.0;
|
||||||
let other_t: &[u64; $n_words] = &$other.0;
|
let other_t: &[u64; $n_words] = &$other.0;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ macro_rules! uint_overflowing_add {
|
||||||
(U256(result), overflow != 0)
|
(U256(result), overflow != 0)
|
||||||
});
|
});
|
||||||
(U512, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
(U512, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
||||||
let mut result: [u64; $n_words] = unsafe { mem::uninitialized() };
|
let mut result: [u64; $n_words] = unsafe { ::std::mem::uninitialized() };
|
||||||
let self_t: &[u64; $n_words] = &$self_expr.0;
|
let self_t: &[u64; $n_words] = &$self_expr.0;
|
||||||
let other_t: &[u64; $n_words] = &$other.0;
|
let other_t: &[u64; $n_words] = &$other.0;
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ macro_rules! uint_overflowing_sub_reg {
|
||||||
#[cfg(all(asm_available, target_arch="x86_64"))]
|
#[cfg(all(asm_available, target_arch="x86_64"))]
|
||||||
macro_rules! uint_overflowing_sub {
|
macro_rules! uint_overflowing_sub {
|
||||||
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
||||||
let mut result: [u64; $n_words] = unsafe { mem::uninitialized() };
|
let mut result: [u64; $n_words] = unsafe { ::std::mem::uninitialized() };
|
||||||
let self_t: &[u64; $n_words] = &$self_expr.0;
|
let self_t: &[u64; $n_words] = &$self_expr.0;
|
||||||
let other_t: &[u64; $n_words] = &$other.0;
|
let other_t: &[u64; $n_words] = &$other.0;
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ macro_rules! uint_overflowing_sub {
|
||||||
(U256(result), overflow != 0)
|
(U256(result), overflow != 0)
|
||||||
});
|
});
|
||||||
(U512, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
(U512, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
||||||
let mut result: [u64; $n_words] = unsafe { mem::uninitialized() };
|
let mut result: [u64; $n_words] = unsafe { ::std::mem::uninitialized() };
|
||||||
let self_t: &[u64; $n_words] = &$self_expr.0;
|
let self_t: &[u64; $n_words] = &$self_expr.0;
|
||||||
let other_t: &[u64; $n_words] = &$other.0;
|
let other_t: &[u64; $n_words] = &$other.0;
|
||||||
|
|
||||||
|
@ -264,7 +264,7 @@ macro_rules! uint_overflowing_sub {
|
||||||
#[cfg(all(asm_available, target_arch="x86_64"))]
|
#[cfg(all(asm_available, target_arch="x86_64"))]
|
||||||
macro_rules! uint_overflowing_mul {
|
macro_rules! uint_overflowing_mul {
|
||||||
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
|
||||||
let mut result: [u64; $n_words] = unsafe { mem::uninitialized() };
|
let mut result: [u64; $n_words] = unsafe { ::std::mem::uninitialized() };
|
||||||
let self_t: &[u64; $n_words] = &$self_expr.0;
|
let self_t: &[u64; $n_words] = &$self_expr.0;
|
||||||
let other_t: &[u64; $n_words] = &$other.0;
|
let other_t: &[u64; $n_words] = &$other.0;
|
||||||
|
|
||||||
|
@ -1106,7 +1106,7 @@ impl U256 {
|
||||||
pub fn full_mul(self, other: U256) -> U512 {
|
pub fn full_mul(self, other: U256) -> U512 {
|
||||||
let self_t: &[u64; 4] = &self.0;
|
let self_t: &[u64; 4] = &self.0;
|
||||||
let other_t: &[u64; 4] = &other.0;
|
let other_t: &[u64; 4] = &other.0;
|
||||||
let mut result: [u64; 8] = unsafe { mem::uninitialized() };
|
let mut result: [u64; 8] = unsafe { ::std::mem::uninitialized() };
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!("
|
asm!("
|
||||||
mov $8, %rax
|
mov $8, %rax
|
||||||
|
|
Loading…
Reference in New Issue