Skip to content

Commit 434e272

Browse files
committed
Update GCC version with the removal of supports_128bit_int
1 parent d00f1ec commit 434e272

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

libgccjit.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c16f53a752ed2b679fafe88d4ec795fe54a245ac
1+
29901846ff610daab8a80436cfe36e93b4b5aa1e

src/base.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,13 @@ pub fn compile_codegen_unit(
199199
let f32_type_supported = target_info.supports_target_dependent_type(CType::Float32);
200200
let f64_type_supported = target_info.supports_target_dependent_type(CType::Float64);
201201
let f128_type_supported = target_info.supports_target_dependent_type(CType::Float128);
202+
let u128_type_supported = target_info.supports_target_dependent_type(CType::UInt128t);
202203
// TODO: improve this to avoid passing that many arguments.
203204
let cx = CodegenCx::new(
204205
&context,
205206
cgu,
206207
tcx,
207-
target_info.supports_128bit_int(),
208+
u128_type_supported,
208209
f16_type_supported,
209210
f32_type_supported,
210211
f64_type_supported,

src/lib.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,10 @@ impl TargetInfo {
134134
false
135135
}
136136

137-
fn supports_128bit_int(&self) -> bool {
138-
self.supports_128bit_integers.load(Ordering::SeqCst)
139-
}
140-
141-
fn supports_target_dependent_type(&self, _typ: CType) -> bool {
137+
fn supports_target_dependent_type(&self, typ: CType) -> bool {
138+
if (typ == CType::UInt128t || typ == CType::Int128t) && self.supports_128bit_integers.load(Ordering::SeqCst) {
139+
return true;
140+
}
142141
false
143142
}
144143
}
@@ -159,10 +158,6 @@ impl LockedTargetInfo {
159158
self.info.lock().expect("lock").cpu_supports(feature)
160159
}
161160

162-
fn supports_128bit_int(&self) -> bool {
163-
self.info.lock().expect("lock").supports_128bit_int()
164-
}
165-
166161
fn supports_target_dependent_type(&self, typ: CType) -> bool {
167162
self.info.lock().expect("lock").supports_target_dependent_type(typ)
168163
}

0 commit comments

Comments
 (0)