diff options
| author | bors <bors@rust-lang.org> | 2024-09-21 22:09:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-21 22:09:47 +0000 |
| commit | 764e6aec81517cde60214ccd00a709a34eb0c07d (patch) | |
| tree | 098f6fe0dcc9a44cb5280b813bda474854d0a1e5 /compiler/rustc_codegen_llvm/src | |
| parent | 1d68e6dd1deef26c5aeb91aee554edbee8b6d5e2 (diff) | |
| parent | 52f146d363504d25b5e2fe468cadc2f50315da91 (diff) | |
| download | rust-764e6aec81517cde60214ccd00a709a34eb0c07d.tar.gz rust-764e6aec81517cde60214ccd00a709a34eb0c07d.zip | |
Auto merge of #130674 - compiler-errors:rollup-yu105fl, r=compiler-errors
Rollup of 8 pull requests Successful merges: - #127766 (add `extern "C-cmse-nonsecure-entry" fn` ) - #129629 (Implement Return Type Notation (RTN)'s path form in where clauses) - #130408 (Avoid re-validating UTF-8 in `FromUtf8Error::into_utf8_lossy`) - #130651 (Add --enable-profiler to armhf dist) - #130653 (ABI compatibility: mention Result guarantee) - #130666 (Assert that `explicit_super_predicates_of` and `explicit_item_super_predicates` truly only contains bounds for the type itself) - #130667 (compiler: Accept "improper" ctypes in extern "rust-cold" fn) - #130673 (Parser: recover from `:::` to `::`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/abi.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index 26718792f5f..0fa8c9d3f19 100644 --- a/compiler/rustc_codegen_llvm/src/abi.rs +++ b/compiler/rustc_codegen_llvm/src/abi.rs @@ -422,6 +422,9 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { if let Conv::RiscvInterrupt { kind } = self.conv { func_attrs.push(llvm::CreateAttrStringValue(cx.llcx, "interrupt", kind.as_str())); } + if let Conv::CCmseNonSecureEntry = self.conv { + func_attrs.push(llvm::CreateAttrString(cx.llcx, "cmse_nonsecure_entry")) + } attributes::apply_to_llfn(llfn, llvm::AttributePlace::Function, &{ func_attrs }); let mut i = 0; @@ -659,9 +662,11 @@ impl<'tcx> AbiBuilderMethods<'tcx> for Builder<'_, '_, 'tcx> { impl From<Conv> for llvm::CallConv { fn from(conv: Conv) -> Self { match conv { - Conv::C | Conv::Rust | Conv::CCmseNonSecureCall | Conv::RiscvInterrupt { .. } => { - llvm::CCallConv - } + Conv::C + | Conv::Rust + | Conv::CCmseNonSecureCall + | Conv::CCmseNonSecureEntry + | Conv::RiscvInterrupt { .. } => llvm::CCallConv, Conv::Cold => llvm::ColdCallConv, Conv::PreserveMost => llvm::PreserveMost, Conv::PreserveAll => llvm::PreserveAll, diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index 6df63eec513..489259da856 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -483,9 +483,6 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>( let allocated_pointer = AttributeKind::AllocatedPointer.create_attr(cx.llcx); attributes::apply_to_llfn(llfn, AttributePlace::Argument(0), &[allocated_pointer]); } - if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::CMSE_NONSECURE_ENTRY) { - to_add.push(llvm::CreateAttrString(cx.llcx, "cmse_nonsecure_entry")); - } if let Some(align) = codegen_fn_attrs.alignment { llvm::set_alignment(llfn, align); } |
