summaryrefslogtreecommitdiffstats
path: root/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs
blob: a21ef6b75894e441a60c2f965d030be0d486d99c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// 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 fn myret() {}
// CHECK: myret:
// CHECK: popq [[REGISTER:%[a-z]+]]
// CHECK-NEXT: lfence
// CHECK-NEXT: jmpq *[[REGISTER]]