diff options
| author | antoyo <antoyo@users.noreply.github.com> | 2024-10-17 12:39:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-17 12:39:16 -0400 |
| commit | 764770d6a83353cbd2cb4d836ff5bf802d75bb86 (patch) | |
| tree | 888f7ee29f841f4e50e2be82aae4170caed73180 /src | |
| parent | d00f1ec7aaca6c9db9b7379577b9e99133e8b1e0 (diff) | |
| parent | 8cd325d987ec875a9bb09f4c0bbc34f1f07fe308 (diff) | |
| download | rust-764770d6a83353cbd2cb4d836ff5bf802d75bb86.tar.gz rust-764770d6a83353cbd2cb4d836ff5bf802d75bb86.zip | |
Merge pull request #568 from rust-lang/update-gcc
Update GCC version with the removal of supports_128bit_int
Diffstat (limited to 'src')
| -rw-r--r-- | src/base.rs | 3 | ||||
| -rw-r--r-- | src/lib.rs | 18 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/base.rs b/src/base.rs index 2eaab3ed00c..2838aad1afe 100644 --- a/src/base.rs +++ b/src/base.rs @@ -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, diff --git a/src/lib.rs b/src/lib.rs index 7b0d594ddc1..fdbf53e1b1a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -134,11 +134,15 @@ 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 { + match typ { + CType::UInt128t | CType::Int128t => { + if self.supports_128bit_integers.load(Ordering::SeqCst) { + return true; + } + } + _ => (), + } false } } @@ -159,10 +163,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) } |
