| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
ex. f3 field has logic or operator in if condition:
conditional_struct {
mask int32
f1 field1 (if[value[mask] & FIELD_FLAG1])
f2 int64 (if[value[mask] & FIELD_FLAG2])
f3 int64 (if[value[mask] == FIELD_FLAG1 || value[mask] == FIELD_FLAG2])
} [packed]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far they have the following grammar:
OP = "==", "!=", "&"
value-expr = value-expr OP value-expr
| factor
factor = "(" and-expr ")"
| integer
| identifier
| string
Operators are left associative, e.g. A & B & C is the same as
(A & B) & C.
Further restrictions will be imposed in pkg/compiler.
This will help implement conditionally included fields.
|
| |
|
|
|
|
|
|
|
|
|
| |
A subsequent commit will allow string flags to refer to other string
flags (nested definitions). For that to happen, the parser must accept
idents as part of the string flags definitions, as follows.
strflags0 = "foo", strflags1
strflags1 = "bar"
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a bunch of hacks in syz-extract, syz-sysgen and syz-check
with respect to description files unsupported on some arches,
or that must not be part of make extract.
Add 2 meta attribtues to files:
meta noextract
Tells `make extract` to not extract constants for this file.
Though, `syz-extract` can still be invoked manually on this file.
meta arches["arch1", "arch2"]
Restricts this file only to the given set of architectures.
`make extract` and ``make generate` will not use it on other architectures.
Later we can potentially use meta attributes to specify git tree/commit
that must be used for extraction. Maybe something else.
Fixes #2754
|
| | |
|
|
|
Test more functions that we currently don't test.
|