Skip to content

Commit

Permalink
Update GCC version with the removal of supports_128bit_int
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Oct 17, 2024
1 parent d00f1ec commit 03d9481
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion libgccjit.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c16f53a752ed2b679fafe88d4ec795fe54a245ac
29901846ff610daab8a80436cfe36e93b4b5aa1e
3 changes: 2 additions & 1 deletion src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,13 @@ pub fn compile_codegen_unit(
let f32_type_supported = target_info.supports_target_dependent_type(CType::Float32);
let f64_type_supported = target_info.supports_target_dependent_type(CType::Float64);
let f128_type_supported = target_info.supports_target_dependent_type(CType::Float128);
let u128_type_supported = target_info.supports_target_dependent_type(CType::UInt128t);
// TODO: improve this to avoid passing that many arguments.
let cx = CodegenCx::new(
&context,
cgu,
tcx,
target_info.supports_128bit_int(),
u128_type_supported,
f16_type_supported,
f32_type_supported,
f64_type_supported,
Expand Down
13 changes: 4 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,10 @@ impl TargetInfo {
false
}

fn supports_128bit_int(&self) -> bool {
self.supports_128bit_integers.load(Ordering::SeqCst)
}

fn supports_target_dependent_type(&self, _typ: CType) -> bool {
fn supports_target_dependent_type(&self, typ: CType) -> bool {
if (typ == CType::UInt128t || typ == CType::Int128t) && self.supports_128bit_integers.load(Ordering::SeqCst) {
return true;
}
false
}
}
Expand All @@ -159,10 +158,6 @@ impl LockedTargetInfo {
self.info.lock().expect("lock").cpu_supports(feature)
}

fn supports_128bit_int(&self) -> bool {
self.info.lock().expect("lock").supports_128bit_int()
}

fn supports_target_dependent_type(&self, typ: CType) -> bool {
self.info.lock().expect("lock").supports_target_dependent_type(typ)
}
Expand Down

0 comments on commit 03d9481

Please sign in to comment.