| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds builtin:
type bool8 int8[0:1]
type bool16 int16[0:1]
type bool32 int32[0:1]
type bool64 int64[0:1]
type boolptr intptr[0:1]
We used to use just int's for bools.
But bool types provide several advantages:
- make true/false probability equal
- improve description expressiveness
- reduce search space (we will take advantage of this later)
|
| |
|
|
|
|
|
| |
We don't need compiler support for such things anymore,
now we simply can do:
type signalno int32[0:65]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Complex types that are often repeated can be given short type aliases using the
following syntax:
```
type identifier underlying_type
```
For example:
```
type signalno int32[0:65]
type net_port proc[20000, 4, int16be]
```
Then, type alias can be used instead of the underlying type in any contexts.
Underlying type needs to be described as if it's a struct field, that is,
with the base type if it's required. However, type alias can be used as syscall
arguments as well. Underlying types are currently restricted to integer types,
`ptr`, `ptr64`, `const`, `flags` and `proc` types.
|
| | |
|
| |
|
|
| |
This is need for few crypto/xfrm descriptions.
|
| | |
|
| |
|
|
|
| |
This [almost] always means a bug in descriptions.
Fix all bugs identified by the check.
|
| | |
|
| |
|
|
| |
For now we just make Go part build for freebsd.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
We used to generate them only because manager had no idea
what arch it is testing. So syscalls numbers had to match
between all arches.
This is not needed anymore.
Also don't generate unreferenced structs/resources.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Large overhaul moves syscalls and arg types from sys to prog.
Sys package now depends on prog and contains only generated
descriptions of syscalls.
Introduce prog.Target type that encapsulates all targer properties,
like syscall list, ptr/page size, etc. Also moves OS-dependent pieces
like mmap call generation from prog to sys.
Update #191
|
| |
|
|
|
| |
In preparation for moving sys types to prog
to avoid confusion between sys.Call and prog.Call.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
That's the condition we always want.
Currently we always check:
t.BitfieldOffset() == 0 || t.BitfieldLast()
now can check just:
!t.BitfieldMiddle()
|
| | |
|
| |
|
|
| |
This makes types constant during execution, everything is precomputed.
|
| |
|
|
| |
This is pointless and the only case that can yield 0 static type size.
|
| |
|
|
|
| |
They don't work the way C bitfields work.
So this will lead to confusion at least.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Use explicit size for vma.
This is the last use of hardcoded ptrSize in sys package.
|
| | |
|
| |
|
|
| |
Fixes #217
|
| |
|
|
| |
Update #217
|
| | |
|
| |
|
|
| |
Update #217
|
| |
|
|
| |
This is required to support ptr64 type.
|
| |
|
|
|
|
| |
ptr64 is like ptr, but always takes 8 bytes of space.
Needed for some APIs. Unfortunately, most of these APIs
use buffer type, so we can't use ptr64 immidiately.
|
| |
|
|
|
|
| |
Unfortunately this is sitll needed, see the added comment.
Update #191
|
| |
|
|
|
|
| |
Move most of the logic from sysgen to pkg/compiler.
Update #217
|
| |
|
|
|
| |
The previous commit removes errors on unsupported structs/resources,
but their usages still error. Fix that.
|
| |
|
|
|
|
| |
Currently unsupported consts in structs and resources break build.
However, that can well happen for arch-specific devices (e.g. Android).
Make this non-fatal as it used to be.
|
| |
|
|
| |
Update #217
|
| | |
|
| |
|
|
| |
Now pkg/compiler deals with consts.
|
| |
|