forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Approved in [ACP 491](rust-lang/libs-team#491). Remove the `unsafe` on `core::intrinsics::breakpoint()`, since it's a safe intrinsic to call and has no prerequisites. (Thanks to @zachs18 for figuring out the `bootstrap`/`not(bootstrap)` logic.)
- Loading branch information
1 parent
a522d78
commit a030ffb
Showing
7 changed files
with
63 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//@ revisions: aarch64 x86_64 | ||
//@ assembly-output: emit-asm | ||
//@[aarch64] only-aarch64 | ||
//@[x86_64] only-x86_64 | ||
|
||
#![feature(breakpoint)] | ||
#![crate_type = "lib"] | ||
|
||
// CHECK-LABEL: use_bp | ||
// aarch64: brk #0xf000 | ||
// x86_64: int3 | ||
pub fn use_bp() { | ||
core::arch::breakpoint(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#![feature(intrinsics)] | ||
extern "rust-intrinsic" { | ||
pub static breakpoint : unsafe extern "rust-intrinsic" fn(); | ||
pub static atomic_singlethreadfence_seqcst : unsafe extern "rust-intrinsic" fn(); | ||
//~^ ERROR intrinsic must be a function [E0622] | ||
} | ||
fn main() { unsafe { breakpoint(); } } | ||
fn main() { unsafe { atomic_singlethreadfence_seqcst(); } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters