2020-03-19 09:47:22 -05:00
|
|
|
// Test LVI ret hardening on generic rust code
|
|
|
|
|
2024-02-22 06:10:29 -06:00
|
|
|
//@ assembly-output: emit-asm
|
|
|
|
//@ compile-flags: --crate-type staticlib
|
|
|
|
//@ only-x86_64-fortanix-unknown-sgx
|
2020-03-19 09:47:22 -05:00
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub extern fn myret() {}
|
|
|
|
// CHECK: myret:
|
|
|
|
// CHECK: popq [[REGISTER:%[a-z]+]]
|
|
|
|
// CHECK-NEXT: lfence
|
|
|
|
// CHECK-NEXT: jmpq *[[REGISTER]]
|