We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a13239d commit cd31f40Copy full SHA for cd31f40
src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-load.rs
@@ -0,0 +1,18 @@
1
+// Test LVI load hardening on SGX enclave code
2
+
3
+// assembly-output: emit-asm
4
+// compile-flags: --crate-type staticlib
5
+// only-x86_64-fortanix-unknown-sgx
6
7
+#[no_mangle]
8
+pub extern fn plus_one(r: &mut u64) {
9
+ *r = *r + 1;
10
+}
11
12
+// CHECK: plus_one
13
+// CHECK: lfence
14
+// CHECK-NEXT: addq
15
+// CHECK: popq [[REGISTER:%[a-z]+]]
16
+// CHECK-NEXT: lfence
17
+// CHECK-NEXT: jmpq *[[REGISTER]]
18
0 commit comments