Skip to content

Commit 764770d

Browse files
authored
Merge pull request #568 from rust-lang/update-gcc
Update GCC version with the removal of supports_128bit_int
2 parents d00f1ec + 8cd325d commit 764770d

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ master = ["gccjit/master"]
2222
default = ["master"]
2323

2424
[dependencies]
25-
gccjit = "2.2"
25+
gccjit = "2.3"
2626
#gccjit = { git = "https://github.com/rust-lang/gccjit.rs" }
2727

2828
# Local copy.

libgccjit.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c16f53a752ed2b679fafe88d4ec795fe54a245ac
1+
29901846ff610daab8a80436cfe36e93b4b5aa1e

src/base.rs

+2-1
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

+9-9
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,15 @@ 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+
match typ {
139+
CType::UInt128t | CType::Int128t => {
140+
if self.supports_128bit_integers.load(Ordering::SeqCst) {
141+
return true;
142+
}
143+
}
144+
_ => (),
145+
}
142146
false
143147
}
144148
}
@@ -159,10 +163,6 @@ impl LockedTargetInfo {
159163
self.info.lock().expect("lock").cpu_supports(feature)
160164
}
161165

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

0 commit comments

Comments
 (0)