Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ dependencies = [

[[package]]
name = "object"
version = "0.37.1"
version = "0.39.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03fd943161069e1768b4b3d050890ba48730e590f57e56d4aa04e7e090e61b4a"
checksum = "2e5a6c098c7a3b6547378093f5cc30bc54fd361ce711e05293a5cc589562739b"
dependencies = [
"memchr",
]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ master = ["gccjit/master"]
default = ["master"]

[dependencies]
object = { version = "0.37.0", default-features = false, features = ["std", "read"] }
object = { version = "0.39.0", default-features = false, features = ["std", "read"] }
tempfile = "3.20"
gccjit = { version = "6.0.0", features = ["dlopen"] }
#gccjit = { git = "https://github.com/rust-lang/gccjit.rs", branch = "error-dlopen", features = ["dlopen"] }
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2026-08-04"
channel = "nightly-2026-08-21"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
11 changes: 9 additions & 2 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
AtomicOrdering::AcqRel | AtomicOrdering::Release => AtomicOrdering::Acquire,
_ => order,
};
let previous_value =
self.atomic_load(dst.get_type(), dst, load_ordering, Size::from_bytes(size));
let previous_value = self.atomic_load(
dst.get_type(),
dst,
load_ordering,
/* volatile */ false,
Size::from_bytes(size),
);
let previous_var =
func.new_local(self.location, previous_value.get_type(), "previous_value");
let return_value = self.new_temp(func, self.location, previous_value.get_type());
Expand Down Expand Up @@ -1060,6 +1065,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
_ty: Type<'gcc>,
ptr: RValue<'gcc>,
order: AtomicOrdering,
_volatile: bool, // FIXME we are always making the load volatile
size: Size,
) -> RValue<'gcc> {
// FIXME(antoyo): use ty.
Expand Down Expand Up @@ -1229,6 +1235,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
value: RValue<'gcc>,
ptr: RValue<'gcc>,
order: AtomicOrdering,
_volatile: bool, // FIXME we are always making the store volatile
size: Size,
) {
// FIXME(antoyo): handle alignment.
Expand Down
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ use rustc_codegen_ssa::back::write::{
CodegenContext, FatLtoInput, ModuleConfig, SharedEmitter, TargetMachineFactoryFn, ThinLtoInput,
};
use rustc_codegen_ssa::base::codegen_crate;
use rustc_codegen_ssa::target_features::cfg_target_feature;
use rustc_codegen_ssa::target_features::internal_target_features;
use rustc_codegen_ssa::traits::{CodegenBackend, ExtraBackendMethods, WriteBackendMethods};
use rustc_codegen_ssa::{CompiledModule, CompiledModules, CrateInfo, ModuleCodegen, TargetConfig};
use rustc_data_structures::profiling::SelfProfilerRef;
Expand All @@ -94,8 +94,8 @@ use rustc_errors::{DiagCtxt, DiagCtxtHandle};
use rustc_middle::dep_graph::{WorkProduct, WorkProductMap};
use rustc_middle::ty::TyCtxt;
use rustc_middle::util::Providers;
use rustc_session::Session;
use rustc_session::config::{OptLevel, OutputFilenames};
use rustc_session::{IncrCompSession, Session};
use rustc_span::{Symbol, sym};
use rustc_target::spec::{RelocModel, TargetTuple};
use tempfile::TempDir;
Expand Down Expand Up @@ -306,13 +306,14 @@ impl CodegenBackend for GccCodegenBackend {
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
incr_comp_session: Option<&IncrCompSession>,
_outputs: &OutputFilenames,
crate_info: &CrateInfo,
) -> (CompiledModules, WorkProductMap) {
ongoing_codegen
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<GccCodegenBackend>>()
.expect("Expected GccCodegenBackend's OngoingCodegen, found Box<Any>")
.join(sess, crate_info)
.join(sess, incr_comp_session, crate_info)
}

fn target_config(&self, sess: &Session) -> TargetConfig {
Expand Down Expand Up @@ -519,7 +520,7 @@ fn to_gcc_opt_level(optlevel: Option<OptLevel>) -> OptimizationLevel {

/// Returns the features that should be set in `cfg(target_feature)`.
fn target_config(sess: &Session, target_info: &LockedTargetInfo) -> TargetConfig {
let (unstable_target_features, target_features) = cfg_target_feature(
let internal_target_features = internal_target_features(
sess,
|feature| to_gcc_features(sess, feature),
|feature| {
Expand All @@ -543,8 +544,7 @@ fn target_config(sess: &Session, target_info: &LockedTargetInfo) -> TargetConfig
let has_reliable_f128 = target_info.supports_target_dependent_type(CType::Float128);

TargetConfig {
target_features,
unstable_target_features,
internal_target_features,
// There are no known bugs with GCC support for f16 or f128
has_reliable_f16,
has_reliable_f16_math: has_reliable_f16,
Expand Down
Loading