]> git.lizzy.rs Git - rust.git/commitdiff
skeleton check module level assembly
authorRaoul Strackx <raoul.strackx@fortanix.com>
Fri, 20 Mar 2020 09:51:18 +0000 (10:51 +0100)
committerRaoul Strackx <raoul.strackx@fortanix.com>
Fri, 25 Sep 2020 13:02:14 +0000 (15:02 +0200)
src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-module-level-assembly.rs [new file with mode: 0644]

diff --git a/src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-module-level-assembly.rs b/src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-module-level-assembly.rs
new file mode 100644 (file)
index 0000000..6b7e7b7
--- /dev/null
@@ -0,0 +1,16 @@
+// Test LVI load hardening on SGX module level assembly code
+
+// assembly-output: emit-asm
+// compile-flags: --crate-type staticlib
+// only-x86_64-fortanix-unknown-sgx
+
+#![feature(global_asm)]
+
+global_asm!(".start_module_asm:
+            movq (%rdi), %rax
+            retq
+            .end_module_asm:" );
+
+// CHECK: .start_module_asm
+// TODO add check, when module-level pass is corrected
+// CHECK: .end_module_asm