Basic i128 support

This commit is contained in:
bjorn3
2019-06-12 19:24:47 +02:00
committed by Dan Gohman
parent 3b0e244316
commit c9a25abbc4
7 changed files with 26 additions and 9 deletions

View File

@@ -219,8 +219,9 @@ impl LaneType {
LaneType::IntType(shared_types::Int::I16) => 6,
LaneType::IntType(shared_types::Int::I32) => 7,
LaneType::IntType(shared_types::Int::I64) => 8,
LaneType::FloatType(shared_types::Float::F32) => 9,
LaneType::FloatType(shared_types::Float::F64) => 10,
LaneType::IntType(shared_types::Int::I128) => 9,
LaneType::FloatType(shared_types::Float::F32) => 10,
LaneType::FloatType(shared_types::Float::F64) => 11,
}
}
@@ -241,6 +242,7 @@ impl LaneType {
16 => shared_types::Int::I16,
32 => shared_types::Int::I32,
64 => shared_types::Int::I64,
128 => shared_types::Int::I128,
_ => unreachable!("unxpected num bits for int"),
})
}

View File

@@ -9,7 +9,7 @@ use std::rc::Rc;
use crate::cdsl::types::{BVType, LaneType, ReferenceType, SpecialType, ValueType};
const MAX_LANES: u16 = 256;
const MAX_BITS: u16 = 64;
const MAX_BITS: u16 = 128;
const MAX_BITVEC: u16 = MAX_BITS * MAX_LANES;
/// Type variables can be used in place of concrete types when defining