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]] [[package]]
name = "cranelift-bforest" name = "cranelift-bforest"
version = "0.67.0" 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 = [ dependencies = [
"cranelift-entity", "cranelift-entity",
] ]
@ -52,7 +52,7 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen" name = "cranelift-codegen"
version = "0.67.0" 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 = [ dependencies = [
"byteorder", "byteorder",
"cranelift-bforest", "cranelift-bforest",
@ -70,7 +70,7 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen-meta" name = "cranelift-codegen-meta"
version = "0.67.0" 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 = [ dependencies = [
"cranelift-codegen-shared", "cranelift-codegen-shared",
"cranelift-entity", "cranelift-entity",
@ -79,17 +79,17 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen-shared" name = "cranelift-codegen-shared"
version = "0.67.0" 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]] [[package]]
name = "cranelift-entity" name = "cranelift-entity"
version = "0.67.0" 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]] [[package]]
name = "cranelift-frontend" name = "cranelift-frontend"
version = "0.67.0" 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 = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"log", "log",
@ -100,7 +100,7 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-module" name = "cranelift-module"
version = "0.67.0" 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 = [ dependencies = [
"anyhow", "anyhow",
"cranelift-codegen", "cranelift-codegen",
@ -112,7 +112,7 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-native" name = "cranelift-native"
version = "0.67.0" 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 = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"raw-cpuid", "raw-cpuid",
@ -122,7 +122,7 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-object" name = "cranelift-object"
version = "0.67.0" 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 = [ dependencies = [
"anyhow", "anyhow",
"cranelift-codegen", "cranelift-codegen",
@ -135,7 +135,7 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-simplejit" name = "cranelift-simplejit"
version = "0.67.0" 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 = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"cranelift-entity", "cranelift-entity",

View File

@ -48,6 +48,7 @@ unsafe impl Copy for u8 {}
unsafe impl Copy for u16 {} unsafe impl Copy for u16 {}
unsafe impl Copy for u32 {} unsafe impl Copy for u32 {}
unsafe impl Copy for u64 {} unsafe impl Copy for u64 {}
unsafe impl Copy for u128 {}
unsafe impl Copy for usize {} unsafe impl Copy for usize {}
unsafe impl Copy for i8 {} unsafe impl Copy for i8 {}
unsafe impl Copy for i16 {} 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 { impl PartialEq for usize {
fn eq(&self, other: &usize) -> bool { fn eq(&self, other: &usize) -> bool {
(*self) == (*other) (*self) == (*other)

View File

@ -287,6 +287,8 @@ fn main() {
assert_eq!(repeat[0], Some(42)); assert_eq!(repeat[0], Some(42));
assert_eq!(repeat[1], Some(42)); assert_eq!(repeat[1], Some(42));
from_decimal_string();
#[cfg(not(jit))] #[cfg(not(jit))]
test_tls(); test_tls();
@ -446,3 +448,23 @@ fn check_niche_behavior () {
intrinsics::abort(); 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")
}