-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrealm_destroy_ops.v
114 lines (110 loc) · 4.65 KB
/
realm_destroy_ops.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Require Import CodeDeps.
Require Import Ident.
Local Open Scope Z_scope.
Definition _g := 1%positive.
Definition _g_rd := 2%positive.
Definition _g_rec := 3%positive.
Definition _g_rec_list := 4%positive.
Definition _g_rtt := 5%positive.
Definition _granule := 6%positive.
Definition _i := 7%positive.
Definition _lock := 8%positive.
Definition _rd := 9%positive.
Definition _rec := 10%positive.
Definition _rec_list := 11%positive.
Definition _ret := 12%positive.
Definition _rt := 13%positive.
Definition _state := 14%positive.
Definition _t'1 := 15%positive.
Definition realm_destroy_ops_body :=
(Ssequence
(Scall None
(Evar _granule_lock (Tfunction
(Tcons (tptr Tvoid) Tnil) tvoid
cc_default))
((Etempvar _g_rec_list (tptr Tvoid)) :: nil))
(Ssequence
(Ssequence
(Scall (Some _t'1)
(Evar _null_ptr (Tfunction Tnil (tptr Tvoid) cc_default)) nil)
(Scall None
(Evar _set_g_rtt_rd (Tfunction
(Tcons (tptr Tvoid)
(Tcons (tptr Tvoid) Tnil))
tvoid cc_default))
((Etempvar _g_rtt (tptr Tvoid)) ::
(Etempvar _t'1 (tptr Tvoid)) :: nil)))
(Ssequence
(Scall None
(Evar _granule_memzero (Tfunction
(Tcons (tptr Tvoid)
(Tcons tuint Tnil)) tvoid cc_default))
((Etempvar _g_rtt (tptr Tvoid)) ::
(Econst_int (Int.repr 5) tuint) :: nil))
(Ssequence
(Scall None
(Evar _granule_set_state (Tfunction
(Tcons (tptr Tvoid)
(Tcons tuint Tnil)) tvoid cc_default))
((Etempvar _g_rtt (tptr Tvoid)) ::
(Econst_int (Int.repr 1) tuint) :: nil))
(Ssequence
(Scall None
(Evar _granule_unlock (Tfunction
(Tcons (tptr Tvoid)
Tnil) tvoid cc_default))
((Etempvar _g_rtt (tptr Tvoid)) :: nil))
(Ssequence
(Scall None
(Evar _granule_memzero (Tfunction
(Tcons
(tptr Tvoid)
(Tcons tuint Tnil)) tvoid
cc_default))
((Etempvar _g_rec_list (tptr Tvoid)) ::
(Econst_int (Int.repr 6) tuint) :: nil))
(Ssequence
(Scall None
(Evar _granule_set_state (Tfunction
(Tcons
(tptr Tvoid)
(Tcons tuint Tnil)) tvoid
cc_default))
((Etempvar _g_rec_list (tptr Tvoid)) ::
(Econst_int (Int.repr 1) tuint) :: nil))
(Ssequence
(Scall None
(Evar _granule_memzero (Tfunction
(Tcons
(tptr Tvoid)
(Tcons tuint Tnil)) tvoid
cc_default))
((Etempvar _g_rd (tptr Tvoid)) ::
(Econst_int (Int.repr 2) tuint) :: nil))
(Ssequence
(Scall None
(Evar _granule_set_state (Tfunction
(Tcons
(tptr Tvoid)
(Tcons tuint Tnil)) tvoid
cc_default))
((Etempvar _g_rd (tptr Tvoid)) ::
(Econst_int (Int.repr 1) tuint) :: nil))
(Scall None
(Evar _granule_unlock (Tfunction
(Tcons
(tptr Tvoid)
Tnil) tvoid cc_default))
((Etempvar _g_rec_list (tptr Tvoid)) ::
nil)))))))))))
.
Definition f_realm_destroy_ops := {|
fn_return := tvoid;
fn_callconv := cc_default;
fn_params := ((_g_rtt, (tptr Tvoid)) ::
(_g_rec_list, (tptr Tvoid)) ::
(_g_rd, (tptr Tvoid)) :: nil);
fn_vars := nil;
fn_temps := ((_t'1, (tptr Tvoid)) :: nil);
fn_body := realm_destroy_ops_body
|}.