diff --git a/src/base.rs b/src/base.rs index ac17d23555d..17a08a636ea 100644 --- a/src/base.rs +++ b/src/base.rs @@ -144,6 +144,9 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol, target_info: Arc< if env::var("CG_GCCJIT_DUMP_RTL").as_deref() == Ok("1") { context.add_command_line_option("-fdump-rtl-vregs"); } + if env::var("CG_GCCJIT_DUMP_RTL_ALL").as_deref() == Ok("1") { + context.add_command_line_option("-fdump-rtl-all"); + } if env::var("CG_GCCJIT_DUMP_TREE_ALL").as_deref() == Ok("1") { context.add_command_line_option("-fdump-tree-all"); } diff --git a/src/int.rs b/src/int.rs index 0cf1204791d..2a6b1d17a3e 100644 --- a/src/int.rs +++ b/src/int.rs @@ -546,7 +546,12 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { } pub fn gcc_uint(&self, typ: Type<'gcc>, int: u64) -> RValue<'gcc> { - if self.is_native_int_type_or_bool(typ) { + if typ.is_u128(self) { + // FIXME(antoyo): libgccjit cannot create 128-bit values yet. + let num = self.context.new_rvalue_from_long(self.u64_type, int as i64); + self.gcc_int_cast(num, typ) + } + else if self.is_native_int_type_or_bool(typ) { self.context.new_rvalue_from_long(typ, u64::try_from(int).expect("u64::try_from") as i64) } else { @@ -572,6 +577,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> { } } else if typ.is_i128(self) { + // FIXME(antoyo): libgccjit cannot create 128-bit values yet. let num = self.context.new_rvalue_from_long(self.u64_type, num as u64 as i64); self.gcc_int_cast(num, typ) } diff --git a/tests/run/abort1.rs b/tests/run/abort1.rs index 25041d93e74..6cb3dd90203 100644 --- a/tests/run/abort1.rs +++ b/tests/run/abort1.rs @@ -4,6 +4,7 @@ // status: signal #![feature(auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/abort2.rs b/tests/run/abort2.rs index e7443c8dbe5..b7a928166b8 100644 --- a/tests/run/abort2.rs +++ b/tests/run/abort2.rs @@ -4,6 +4,7 @@ // status: signal #![feature(auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/array.rs b/tests/run/array.rs index 49b28d98f2f..d2d60b75e63 100644 --- a/tests/run/array.rs +++ b/tests/run/array.rs @@ -8,6 +8,7 @@ // 10 #![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/assign.rs b/tests/run/assign.rs index 427c1a25033..241acea5e49 100644 --- a/tests/run/assign.rs +++ b/tests/run/assign.rs @@ -5,7 +5,7 @@ // 7 8 // 10 -#![allow(unused_attributes)] +#![allow(internal_features, unused_attributes)] #![feature(auto_traits, lang_items, no_core, start, intrinsics, track_caller)] #![no_std] diff --git a/tests/run/closure.rs b/tests/run/closure.rs index 8daa681abf7..764c5b34426 100644 --- a/tests/run/closure.rs +++ b/tests/run/closure.rs @@ -10,6 +10,7 @@ #![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics, unboxed_closures)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/condition.rs b/tests/run/condition.rs index b7a13081dea..ed17c19409e 100644 --- a/tests/run/condition.rs +++ b/tests/run/condition.rs @@ -6,6 +6,7 @@ // 1 #![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/empty_main.rs b/tests/run/empty_main.rs index c02cfd2a85f..2d78ef12aa7 100644 --- a/tests/run/empty_main.rs +++ b/tests/run/empty_main.rs @@ -4,6 +4,7 @@ // status: 0 #![feature(auto_traits, lang_items, no_core, start)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/exit.rs b/tests/run/exit.rs index 956e53dd4aa..bf1cbeef302 100644 --- a/tests/run/exit.rs +++ b/tests/run/exit.rs @@ -4,6 +4,7 @@ // status: 2 #![feature(auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/exit_code.rs b/tests/run/exit_code.rs index eeab3520951..be7a233efda 100644 --- a/tests/run/exit_code.rs +++ b/tests/run/exit_code.rs @@ -4,6 +4,7 @@ // status: 1 #![feature(auto_traits, lang_items, no_core, start)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/fun_ptr.rs b/tests/run/fun_ptr.rs index 8a196f774c8..e0c30cada6b 100644 --- a/tests/run/fun_ptr.rs +++ b/tests/run/fun_ptr.rs @@ -5,6 +5,7 @@ // stdout: 1 #![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/int_overflow.rs b/tests/run/int_overflow.rs index c3fcb3c0a2a..badcc0f7699 100644 --- a/tests/run/int_overflow.rs +++ b/tests/run/int_overflow.rs @@ -4,7 +4,7 @@ // stdout: Success // status: signal -#![allow(unused_attributes)] +#![allow(internal_features, unused_attributes)] #![feature(auto_traits, lang_items, no_core, start, intrinsics)] #![no_std] diff --git a/tests/run/mut_ref.rs b/tests/run/mut_ref.rs index 2a2ea8b8bf0..e843e298537 100644 --- a/tests/run/mut_ref.rs +++ b/tests/run/mut_ref.rs @@ -7,7 +7,7 @@ // 6 // 11 -#![allow(unused_attributes)] +#![allow(internal_features, unused_attributes)] #![feature(auto_traits, lang_items, no_core, start, intrinsics, track_caller)] #![no_std] diff --git a/tests/run/operations.rs b/tests/run/operations.rs index 67b9f241dbb..cac6fdfca4a 100644 --- a/tests/run/operations.rs +++ b/tests/run/operations.rs @@ -5,7 +5,7 @@ // 39 // 10 -#![allow(unused_attributes)] +#![allow(internal_features, unused_attributes)] #![feature(auto_traits, lang_items, no_core, start, intrinsics, arbitrary_self_types)] #![no_std] diff --git a/tests/run/ptr_cast.rs b/tests/run/ptr_cast.rs index da8a8295d56..41866179828 100644 --- a/tests/run/ptr_cast.rs +++ b/tests/run/ptr_cast.rs @@ -5,6 +5,7 @@ // stdout: 1 #![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/return-tuple.rs b/tests/run/return-tuple.rs index 6fa10dca06f..8d40deb8c85 100644 --- a/tests/run/return-tuple.rs +++ b/tests/run/return-tuple.rs @@ -7,6 +7,7 @@ // 42 #![feature(auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/slice.rs b/tests/run/slice.rs index 96f1c4792e5..25ff72549d4 100644 --- a/tests/run/slice.rs +++ b/tests/run/slice.rs @@ -5,6 +5,7 @@ // stdout: 5 #![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/static.rs b/tests/run/static.rs index 19201f1df26..2457bb1f443 100644 --- a/tests/run/static.rs +++ b/tests/run/static.rs @@ -10,6 +10,7 @@ // 1 #![feature(auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/structs.rs b/tests/run/structs.rs index 6c8884855ac..d6455667400 100644 --- a/tests/run/structs.rs +++ b/tests/run/structs.rs @@ -6,6 +6,7 @@ // 2 #![feature(auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core] diff --git a/tests/run/tuple.rs b/tests/run/tuple.rs index 0b670bf2674..8a7d85ae867 100644 --- a/tests/run/tuple.rs +++ b/tests/run/tuple.rs @@ -5,6 +5,7 @@ // stdout: 3 #![feature(auto_traits, lang_items, no_core, start, intrinsics)] +#![allow(internal_features)] #![no_std] #![no_core]