-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 1be35f1
Showing
6 changed files
with
60 additions
and
6 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
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