mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
13 lines
309 B
Rust
13 lines
309 B
Rust
// Test LVI ret hardening on generic rust code
|
|
|
|
//@ assembly-output: emit-asm
|
|
//@ compile-flags: --crate-type staticlib
|
|
//@ only-x86_64-fortanix-unknown-sgx
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn myret() {}
|
|
// CHECK: myret:
|
|
// CHECK: popq [[REGISTER:%[a-z]+]]
|
|
// CHECK-NEXT: lfence
|
|
// CHECK-NEXT: jmpq *[[REGISTER]]
|