Fix tests

This commit is contained in:
Antoni Boucher 2023-08-13 15:34:21 -04:00
parent 607ec893e7
commit e3deac5c71
21 changed files with 29 additions and 5 deletions

View File

@ -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");
}

View File

@ -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)
}

View File

@ -4,6 +4,7 @@
// status: signal
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -4,6 +4,7 @@
// status: signal
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -8,6 +8,7 @@
// 10
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -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]

View File

@ -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]

View File

@ -6,6 +6,7 @@
// 1
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -4,6 +4,7 @@
// status: 0
#![feature(auto_traits, lang_items, no_core, start)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -4,6 +4,7 @@
// status: 2
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -4,6 +4,7 @@
// status: 1
#![feature(auto_traits, lang_items, no_core, start)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -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]

View File

@ -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]

View File

@ -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]

View File

@ -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]

View File

@ -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]

View File

@ -7,6 +7,7 @@
// 42
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -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]

View File

@ -10,6 +10,7 @@
// 1
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -6,6 +6,7 @@
// 2
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]

View File

@ -5,6 +5,7 @@
// stdout: 3
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
#![allow(internal_features)]
#![no_std]
#![no_core]