File tree 5 files changed +39
-0
lines changed
intTests/test_llvm_x86_07
5 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ section .bss
2
+ section .text
3
+ global precondtest
4
+ precondtest:
5
+ mov rax , rdi
6
+ ret
7
+ global _start
8
+ _start:
9
+ mov rax , 60
10
+ syscall
Original file line number Diff line number Diff line change
1
+ #include <stdint.h>
2
+ #include <stdio.h>
3
+
4
+ extern uint64_t precondtest (uint64_t x );
5
+
6
+ void test () {
7
+ precondtest (1 );
8
+ };
Original file line number Diff line number Diff line change
1
+ enable_experimental;
2
+
3
+ m <- llvm_load_module "test.bc";
4
+
5
+ let precondtest_setup = do {
6
+ x <- crucible_fresh_var "x" (llvm_int 64);
7
+ crucible_precond {{ x < 10 }};
8
+ llvm_execute_func [crucible_term x];
9
+ x' <- crucible_fresh_var "x'" (llvm_int 64);
10
+ crucible_return (crucible_term x');
11
+ crucible_postcond {{ x' < 10 }};
12
+ };
13
+
14
+ llvm_verify_x86 m "./test" "precondtest" [] false precondtest_setup w4;
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ set -e
3
+
4
+ # yasm -felf64 test.S
5
+ # ld test.o -o test
6
+ clang -c -emit-llvm test.c
7
+ $SAW test.saw
You can’t perform that action at this time.
0 commit comments