Update Cranelift

Fixes bootstrapping of rustc using cg_clif

Fixes #1097
This commit is contained in:
bjorn3 2020-11-01 09:50:33 +01:00
parent 6b1902a0fa
commit f4e8af268b
3 changed files with 42 additions and 10 deletions

20
Cargo.lock generated
View File

@ -44,7 +44,7 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cranelift-bforest"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
dependencies = [
"cranelift-entity",
]
@ -52,7 +52,7 @@ dependencies = [
[[package]]
name = "cranelift-codegen"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
dependencies = [
"byteorder",
"cranelift-bforest",
@ -70,7 +70,7 @@ dependencies = [
[[package]]
name = "cranelift-codegen-meta"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
@ -79,17 +79,17 @@ dependencies = [
[[package]]
name = "cranelift-codegen-shared"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
[[package]]
name = "cranelift-entity"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
[[package]]
name = "cranelift-frontend"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
dependencies = [
"cranelift-codegen",
"log",
@ -100,7 +100,7 @@ dependencies = [
[[package]]
name = "cranelift-module"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
dependencies = [
"anyhow",
"cranelift-codegen",
@ -112,7 +112,7 @@ dependencies = [
[[package]]
name = "cranelift-native"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
dependencies = [
"cranelift-codegen",
"raw-cpuid",
@ -122,7 +122,7 @@ dependencies = [
[[package]]
name = "cranelift-object"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
dependencies = [
"anyhow",
"cranelift-codegen",
@ -135,7 +135,7 @@ dependencies = [
[[package]]
name = "cranelift-simplejit"
version = "0.67.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#53f044715b99cd97ccd24e54b25c72a8646b9a72"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#44cbdecea03c360ea82e6482f0cf6c614effef21"
dependencies = [
"cranelift-codegen",
"cranelift-entity",

View File

@ -48,6 +48,7 @@ unsafe impl Copy for u8 {}
unsafe impl Copy for u16 {}
unsafe impl Copy for u32 {}
unsafe impl Copy for u64 {}
unsafe impl Copy for u128 {}
unsafe impl Copy for usize {}
unsafe impl Copy for i8 {}
unsafe impl Copy for i16 {}
@ -283,6 +284,15 @@ impl PartialEq for u64 {
}
}
impl PartialEq for u128 {
fn eq(&self, other: &u128) -> bool {
(*self) == (*other)
}
fn ne(&self, other: &u128) -> bool {
(*self) != (*other)
}
}
impl PartialEq for usize {
fn eq(&self, other: &usize) -> bool {
(*self) == (*other)

View File

@ -287,6 +287,8 @@ fn main() {
assert_eq!(repeat[0], Some(42));
assert_eq!(repeat[1], Some(42));
from_decimal_string();
#[cfg(not(jit))]
test_tls();
@ -446,3 +448,23 @@ fn check_niche_behavior () {
intrinsics::abort();
}
}
fn from_decimal_string() {
loop {
let multiplier = 1;
take_multiplier_ref(&multiplier);
if multiplier == 1 {
break;
}
unreachable();
}
}
fn take_multiplier_ref(_multiplier: &u128) {}
fn unreachable() -> ! {
panic("unreachable")
}