1
Fork 0

Stabilize asm_goto

This commit is contained in:
Gary Guo 2024-12-02 21:20:12 +00:00
parent 9bad8ac498
commit 292c622507
15 changed files with 36 additions and 80 deletions

View file

@ -2,7 +2,7 @@
//@ only-x86_64
#![crate_type = "rlib"]
#![feature(asm_goto, asm_goto_with_outputs)]
#![feature(asm_goto_with_outputs)]
use std::arch::asm;

View file

@ -1,6 +1,6 @@
//@ only-x86_64
#![feature(asm_unwind, asm_goto)]
#![feature(asm_unwind)]
use std::arch::{asm, global_asm};

View file

@ -2,7 +2,6 @@
//@ needs-asm-support
#![deny(unreachable_code)]
#![feature(asm_goto)]
use std::arch::asm;

View file

@ -1,5 +1,5 @@
error[E0133]: call to unsafe function `unreachable_unchecked` is unsafe and requires unsafe function or block
--> $DIR/goto-block-safe.rs:14:17
--> $DIR/goto-block-safe.rs:13:17
|
LL | unsafe {
| ------ items do not inherit unsafety from separate enclosing items

View file

@ -3,7 +3,7 @@
//@ needs-asm-support
#![deny(unreachable_code)]
#![feature(asm_goto, asm_goto_with_outputs)]
#![feature(asm_goto_with_outputs)]
use std::arch::asm;

View file

@ -1,10 +0,0 @@
//@ only-x86_64
use std::arch::asm;
fn main() {
unsafe {
asm!("jmp {}", label {});
//~^ ERROR label operands for inline assembly are unstable
}
}

View file

@ -1,13 +0,0 @@
error[E0658]: label operands for inline assembly are unstable
--> $DIR/feature-gate-asm_goto.rs:7:24
|
LL | asm!("jmp {}", label {});
| ^^^^^^^^
|
= note: see issue #119364 <https://github.com/rust-lang/rust/issues/119364> for more information
= help: add `#![feature(asm_goto)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.

View file

@ -1,7 +1,5 @@
//@ only-x86_64
#![feature(asm_goto)]
use std::arch::asm;
fn main() {

View file

@ -1,5 +1,5 @@
error[E0658]: using both label and output operands for inline assembly is unstable
--> $DIR/feature-gate-asm_goto_with_outputs.rs:10:52
--> $DIR/feature-gate-asm_goto_with_outputs.rs:8:52
|
LL | asm!("mov {}, 1", "jmp {}", out(reg) _out, label {});
| ^^^^^^^^