various fixes for naked_asm!
implementation
- fix for divergence - fix error message - fix another cranelift test - fix some cranelift things - don't set the NORETURN option for naked asm - fix use of naked_asm! in doc comment - fix use of naked_asm! in run-make test - use `span_bug` in unreachable branch
This commit is contained in:
parent
10fa482906
commit
5fc60d1e52
29 changed files with 116 additions and 73 deletions
|
@ -726,6 +726,12 @@ pub macro global_asm() {
|
|||
/* compiler built-in */
|
||||
}
|
||||
|
||||
#[rustc_builtin_macro]
|
||||
#[rustc_macro_transparency = "semitransparent"]
|
||||
pub macro naked_asm() {
|
||||
/* compiler built-in */
|
||||
}
|
||||
|
||||
pub static A_STATIC: u8 = 42;
|
||||
|
||||
#[lang = "panic_location"]
|
||||
|
|
|
@ -390,7 +390,7 @@ global_asm! {
|
|||
#[naked]
|
||||
extern "C" fn naked_test() {
|
||||
unsafe {
|
||||
asm!("ret", options(noreturn));
|
||||
naked_asm!("ret");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue