diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-30 17:27:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-30 17:27:57 +0200 |
| commit | 283e2cf80b5899344d7fc63a2a49eaf045f3a567 (patch) | |
| tree | f88a3170ec64247fad6012d64a0ebe49a4b59b3a | |
| parent | d62fe1e043dae471e6f29648eaddcac876b4e962 (diff) | |
| parent | 25df5d021de5f109a71ad6a3a41f24aa9303d98d (diff) | |
| download | rust-283e2cf80b5899344d7fc63a2a49eaf045f3a567.tar.gz rust-283e2cf80b5899344d7fc63a2a49eaf045f3a567.zip | |
Rollup merge of #134232 - bjorn3:naked_asm_improvements, r=wesleywiser
Share the naked asm impl between cg_ssa and cg_clif This was introduced in https://github.com/rust-lang/rust/pull/128004.
| -rw-r--r-- | src/asm.rs | 2 | ||||
| -rw-r--r-- | src/base.rs | 6 | ||||
| -rw-r--r-- | src/builder.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/asm.rs b/src/asm.rs index 396c6d57950..c35337ae7ce 100644 --- a/src/asm.rs +++ b/src/asm.rs @@ -829,7 +829,7 @@ fn dummy_output_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, reg: InlineAsmRegCl impl<'gcc, 'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { fn codegen_global_asm( - &self, + &mut self, template: &[InlineAsmTemplatePiece], operands: &[GlobalAsmOperandRef<'tcx>], options: InlineAsmOptions, diff --git a/src/base.rs b/src/base.rs index 9b495174a3f..a9d7808c833 100644 --- a/src/base.rs +++ b/src/base.rs @@ -206,7 +206,7 @@ pub fn compile_codegen_unit( 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( + let mut cx = CodegenCx::new( &context, cgu, tcx, @@ -223,8 +223,8 @@ pub fn compile_codegen_unit( } // ... and now that we have everything pre-defined, fill out those definitions. - for &(mono_item, _) in &mono_items { - mono_item.define::<Builder<'_, '_, '_>>(&cx); + for &(mono_item, item_data) in &mono_items { + mono_item.define::<Builder<'_, '_, '_>>(&mut cx, item_data); } // If this codegen unit contains the main function, also create the diff --git a/src/builder.rs b/src/builder.rs index 5c70f4a7df9..6720f6186d1 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -45,7 +45,7 @@ enum ExtremumOperation { Min, } -pub struct Builder<'a: 'gcc, 'gcc, 'tcx> { +pub struct Builder<'a, 'gcc, 'tcx> { pub cx: &'a CodegenCx<'gcc, 'tcx>, pub block: Block<'gcc>, pub location: Option<Location<'gcc>>, |
