-
Notifications
You must be signed in to change notification settings - Fork 13.9k
naked_asm: emit a label starting with func_end
#146793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The `cargo asm` tool pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient
Some changes occurred in compiler/rustc_codegen_ssa |
This is fine but I want to be clear that this is not something that we guarantee, and we reserve the right to change it in the future. It might be better for cargo asm to match on the |
Absolutely, I totally agree.
Only elf emits |
@bors r+ |
naked_asm: emit a label starting with `func_end` The `cargo asm` tool (`cargo install cargo-show-asm`) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient. https://github.com/pacak/cargo-show-asm/blob/be45f67454ad8b634246a7fc69b3c6a963ee93f1/src/asm/statements.rs#L897-L901 To make the label name unique it's suffixed with the name of the current symbol. r? `@Amanieu`
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry |
…manieu naked_asm: emit a label starting with `func_end` The `cargo asm` tool (`cargo install cargo-show-asm`) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient. https://github.com/pacak/cargo-show-asm/blob/be45f67454ad8b634246a7fc69b3c6a963ee93f1/src/asm/statements.rs#L897-L901 To make the label name unique it's suffixed with the name of the current symbol. r? `@Amanieu`
…manieu naked_asm: emit a label starting with `func_end` The `cargo asm` tool (`cargo install cargo-show-asm`) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient. https://github.com/pacak/cargo-show-asm/blob/be45f67454ad8b634246a7fc69b3c6a963ee93f1/src/asm/statements.rs#L897-L901 To make the label name unique it's suffixed with the name of the current symbol. r? ``@Amanieu``
Rollup of 6 pull requests Successful merges: - #140983 (Improve doc of some methods that take ranges) - #144091 (Stabilize `new_zeroed_alloc`) - #145664 (Stabilize `std::panic::Location::file_as_c_str`) - #146744 (Deref related cleanups in ref_prop) - #146793 (naked_asm: emit a label starting with `func_end`) - #146822 (Fix old typo in lang_start_internal comment) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - #140983 (Improve doc of some methods that take ranges) - #144091 (Stabilize `new_zeroed_alloc`) - #145664 (Stabilize `std::panic::Location::file_as_c_str`) - #146744 (Deref related cleanups in ref_prop) - #146793 (naked_asm: emit a label starting with `func_end`) - #146822 (Fix old typo in lang_start_internal comment) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #140983 (Improve doc of some methods that take ranges) - #144091 (Stabilize `new_zeroed_alloc`) - #145664 (Stabilize `std::panic::Location::file_as_c_str`) - #146551 (fix issue with `cmse-nonsecure-entry` ABI being both async and c-variadic) - #146744 (Deref related cleanups in ref_prop) - #146793 (naked_asm: emit a label starting with `func_end`) - #146820 (Add unstable attribute to BTreeMap-related allocator generics) - #146822 (Fix old typo in lang_start_internal comment) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146793 - folkertdev:naked-asm-func-end, r=Amanieu naked_asm: emit a label starting with `func_end` The `cargo asm` tool (`cargo install cargo-show-asm`) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient. https://github.com/pacak/cargo-show-asm/blob/be45f67454ad8b634246a7fc69b3c6a963ee93f1/src/asm/statements.rs#L897-L901 To make the label name unique it's suffixed with the name of the current symbol. r? ```@Amanieu```
…manieu naked_asm: emit a label starting with `func_end` The `cargo asm` tool (`cargo install cargo-show-asm`) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient. https://github.com/pacak/cargo-show-asm/blob/be45f67454ad8b634246a7fc69b3c6a963ee93f1/src/asm/statements.rs#L897-L901 To make the label name unique it's suffixed with the name of the current symbol. r? ```@Amanieu```
Rollup of 8 pull requests Successful merges: - rust-lang#140983 (Improve doc of some methods that take ranges) - rust-lang#144091 (Stabilize `new_zeroed_alloc`) - rust-lang#145664 (Stabilize `std::panic::Location::file_as_c_str`) - rust-lang#146551 (fix issue with `cmse-nonsecure-entry` ABI being both async and c-variadic) - rust-lang#146744 (Deref related cleanups in ref_prop) - rust-lang#146793 (naked_asm: emit a label starting with `func_end`) - rust-lang#146820 (Add unstable attribute to BTreeMap-related allocator generics) - rust-lang#146822 (Fix old typo in lang_start_internal comment) r? `@ghost` `@rustbot` modify labels: rollup
The
cargo asm
tool (cargo install cargo-show-asm
) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but havingcargo asm
work is convenient.https://github.com/pacak/cargo-show-asm/blob/be45f67454ad8b634246a7fc69b3c6a963ee93f1/src/asm/statements.rs#L897-L901
To make the label name unique it's suffixed with the name of the current symbol.
r? @Amanieu