diff options
| author | bors <bors@rust-lang.org> | 2021-02-03 06:00:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-02-03 06:00:43 +0000 |
| commit | b593389edbaa9ea0c90f0ed419283842f534e50a (patch) | |
| tree | 7933062bda8c1c2d47f2f70e7bc20c4675bb3de8 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | e6a0f3cdf3801394a53ffa42683385d94b02c772 (diff) | |
| parent | ce9818f2b7beaed0039f42605e2f547e9e461430 (diff) | |
| download | rust-b593389edbaa9ea0c90f0ed419283842f534e50a.tar.gz rust-b593389edbaa9ea0c90f0ed419283842f534e50a.zip | |
Auto merge of #81346 - hug-dev:nonsecure-call-abi, r=jonas-schievink
Add a new ABI to support cmse_nonsecure_call This adds support for the `cmse_nonsecure_call` feature to be able to perform non-secure function call. See the discussion on Zulip [here](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Support.20for.20callsite.20attributes/near/223054928). This is a followup to #75810 which added `cmse_nonsecure_entry`. As for that PR, I assume that the changes are small enough to not have to go through a RFC but I don't mind doing one if needed 😃 I did not yet create a tracking issue, but if most of it is fine, I can create one and update the various files accordingly (they refer to the other tracking issue now). On the Zulip chat, I believe `@jonas-schievink` volunteered to be a reviewer 💯
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 1d89fc80496..4118e930745 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -216,6 +216,14 @@ extern "C" void LLVMRustAddCallSiteAttribute(LLVMValueRef Instr, unsigned Index, Call->addAttribute(Index, Attr); } +extern "C" void LLVMRustAddCallSiteAttrString(LLVMValueRef Instr, unsigned Index, + const char *Name) { + CallBase *Call = unwrap<CallBase>(Instr); + Attribute Attr = Attribute::get(Call->getContext(), Name); + Call->addAttribute(Index, Attr); +} + + extern "C" void LLVMRustAddAlignmentCallSiteAttr(LLVMValueRef Instr, unsigned Index, uint32_t Bytes) { |
