-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathneed_ns_notify.v
118 lines (114 loc) · 4.86 KB
/
need_ns_notify.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
115
116
117
118
Require Import CodeDeps.
Require Import Ident.
Local Open Scope Z_scope.
Definition _enabled := 1%positive.
Definition _g := 2%positive.
Definition _i := 3%positive.
Definition _idx := 4%positive.
Definition _idx1 := 5%positive.
Definition _idx2 := 6%positive.
Definition _intid := 7%positive.
Definition _mask := 8%positive.
Definition _masked := 9%positive.
Definition _pending := 10%positive.
Definition _rec := 11%positive.
Definition _rec__1 := 12%positive.
Definition _rec_idx := 13%positive.
Definition _rec_rvic_state := 14%positive.
Definition _ret := 15%positive.
Definition _rvic := 16%positive.
Definition _target := 17%positive.
Definition _target_rec := 18%positive.
Definition _t'1 := 19%positive.
Definition _t'2 := 20%positive.
Definition _t'3 := 21%positive.
Definition _t'4 := 22%positive.
Definition _t'5 := 23%positive.
Definition _t'6 := 24%positive.
Definition need_ns_notify_body :=
(Ssequence
(Ssequence
(Scall (Some _t'1)
(Evar _get_rec_rec_idx (Tfunction
(Tcons (tptr Tvoid) Tnil)
tulong cc_default))
((Etempvar _target_rec (tptr Tvoid)) :: nil))
(Sset _idx1 (Etempvar _t'1 tulong)))
(Ssequence
(Ssequence
(Scall (Some _t'2)
(Evar _get_rec_rec_idx (Tfunction
(Tcons (tptr Tvoid) Tnil)
tulong cc_default))
((Etempvar _rec (tptr Tvoid)) :: nil))
(Sset _idx2 (Etempvar _t'2 tulong)))
(Sifthenelse (Ebinop Oeq (Etempvar _idx1 tulong) (Etempvar _idx2 tulong)
tint)
(Sreturn (Some (Econst_int (Int.repr 0) tuint)))
(Ssequence
(Ssequence
(Scall (Some _t'3)
(Evar _get_rec_rvic_enabled (Tfunction
(Tcons (tptr Tvoid)
Tnil) tuint cc_default))
((Etempvar _target_rec (tptr Tvoid)) :: nil))
(Sset _enabled (Etempvar _t'3 tuint)))
(Sifthenelse (Ebinop Oeq (Etempvar _enabled tuint)
(Econst_int (Int.repr 0) tuint) tint)
(Sreturn (Some (Econst_int (Int.repr 0) tuint)))
(Ssequence
(Ssequence
(Scall (Some _t'4)
(Evar _get_rec_rvic (Tfunction
(Tcons (tptr Tvoid)
Tnil)
(tptr Tvoid)
cc_default))
((Etempvar _target_rec (tptr Tvoid)) :: nil))
(Sset _rvic
(Etempvar _t'4 (tptr Tvoid))))
(Ssequence
(Ssequence
(Scall (Some _t'5)
(Evar _rvic_is_pending (Tfunction
(Tcons
(tptr Tvoid)
(Tcons tulong Tnil)) tuint
cc_default))
((Etempvar _rvic (tptr Tvoid)) ::
(Etempvar _intid tulong) :: nil))
(Sset _pending (Etempvar _t'5 tuint)))
(Sifthenelse (Ebinop Oeq (Etempvar _pending tuint)
(Econst_int (Int.repr 0) tuint) tint)
(Sreturn (Some (Econst_int (Int.repr 0) tuint)))
(Ssequence
(Ssequence
(Scall (Some _t'6)
(Evar _rvic_is_masked (Tfunction
(Tcons
(tptr Tvoid)
(Tcons tulong Tnil)) tuint
cc_default))
((Etempvar _rvic (tptr Tvoid)) ::
(Etempvar _intid tulong) :: nil))
(Sset _masked (Etempvar _t'6 tuint)))
(Sifthenelse (Ebinop Oeq (Etempvar _masked tuint)
(Econst_int (Int.repr 1) tuint) tint)
(Sreturn (Some (Econst_int (Int.repr 0) tuint)))
(Sreturn (Some (Econst_int (Int.repr 1) tuint)))))))))))))
.
Definition f_need_ns_notify := {|
fn_return := tuint;
fn_callconv := cc_default;
fn_params := ((_rec, (tptr Tvoid)) ::
(_target_rec, (tptr Tvoid)) ::
(_intid, tulong) :: nil);
fn_vars := nil;
fn_temps := ((_idx1, tulong) :: (_idx2, tulong) :: (_enabled, tuint) ::
(_rvic, (tptr Tvoid)) ::
(_pending, tuint) :: (_masked, tuint) :: (_t'6, tuint) ::
(_t'5, tuint) ::
(_t'4, (tptr Tvoid)) ::
(_t'3, tuint) :: (_t'2, tulong) :: (_t'1, tulong) :: nil);
fn_body := need_ns_notify_body
|}.