rust/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
309 B
Rust
Raw Normal View History

2020-03-19 14:47:22 +00:00
// 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]
2024-05-29 03:57:23 +00:00
pub extern "C" fn myret() {}
2020-03-19 14:47:22 +00:00
// CHECK: myret:
// CHECK: popq [[REGISTER:%[a-z]+]]
// CHECK-NEXT: lfence
// CHECK-NEXT: jmpq *[[REGISTER]]