blob: c04c274c30115b0cef572a65a9aa2f68868ed002 (
plain)
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
|
# Copyright 2017 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
meta automatic
meta noextract
meta arches["foo", "bar", "386"]
incdir <some/path>
strflags0 = "foo", strflags1
strflags1 = "bar"
expressions {
f0 int8 (if[value[X] & Y])
f1 int8 (if[X & Y == Z])
f2 int8 (if[X & Y & Z == value[X] & A])
f3 int8 (if[X & (A == B) & Z != C])
f5 int8 (if[value[X] == A || value[X] == B])
}
intflags = 1, 2, 3, 4
condFields {
mask int8
flags flags[intflags, int8]
# Simple expressions work.
f0 int16 (if[val[mask] == SOME_CONST])
# Conditions and other attributes work together.
f1 int16 (out, if[val[mask] == SOME_CONST])
# Test some more complex expressions.
f2 int16 (out, if[val[mask] & SOME_CONST == OTHER_CONST])
f3 int16 (out, if[val[mask] & SOME_CONST & OTHER_CONST == val[mask] & CONST_X])
f4 int16 (out, if[val[flags] & SOME_CONST])
f5 int16 (out, if[val[flags] == SOME_CONST || val[flags] == OTHER_CONST])
f6 int16 (out, if[val[flags] == SOME_CONST || val[flags] & OTHER_CONST])
}
|