Adding checks for assembly files in libunwind
This commit is contained in:
parent
4d1d0c6bd7
commit
947d7238e0
|
@ -0,0 +1,17 @@
|
||||||
|
-include ../../run-make-fulldeps/tools.mk
|
||||||
|
|
||||||
|
#only-x86_64-fortanix-unknown-sgx
|
||||||
|
|
||||||
|
OBJDUMP="${S}/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-objdump"
|
||||||
|
FILECHECK="${S}/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck"
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(RUSTC) --target ${TARGET} enclave.rs
|
||||||
|
|
||||||
|
#TODO: re-enable check when newly compiled libunwind is used
|
||||||
|
#${OBJDUMP} --disassemble-symbols=unw_getcontext --demangle $(TMPDIR)/enclave > $(TMPDIR)/unw_getcontext.asm
|
||||||
|
#${FILECHECK} --input-file $(TMPDIR)/unw_getcontext.asm unw_getcontext.checks
|
||||||
|
|
||||||
|
#TODO: re-enable check when newly compiled libunwind is used
|
||||||
|
${OBJDUMP} --disassemble-symbols="libunwind::Registers_x86_64::jumpto()" --demangle $(TMPDIR)/enclave > $(TMPDIR)/jumpto.asm
|
||||||
|
${FILECHECK} --input-file $(TMPDIR)/jumpto.asm jumpto.checks
|
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
pub fn main() {
|
||||||
|
println!("Hello, World!");
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
CHECK: libunwind::Registers_x86_64::jumpto
|
||||||
|
CHECK: lfence
|
||||||
|
CHECK: lfence
|
||||||
|
CHECK: lfence
|
||||||
|
CHECK: lfence
|
||||||
|
CHECK: shlq $0, (%rsp)
|
||||||
|
CHECK-NEXT: lfence
|
||||||
|
CHECK-NEXT: retq
|
|
@ -0,0 +1,7 @@
|
||||||
|
CHECK: unw_getcontext
|
||||||
|
CHECK: lfence
|
||||||
|
CHECK: lfence
|
||||||
|
CHECK: notq (%rsp)
|
||||||
|
CHECK-NEXT: notq (%rsp)
|
||||||
|
CHECK-NEXT: lfence
|
||||||
|
CHECK-NEXT: retq
|
Loading…
Reference in New Issue