diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-07-09 20:47:07 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-07-09 20:47:07 +0200 |
| commit | 710eefe85a976c438da255499fbefd1a6c989ef6 (patch) | |
| tree | 3467ac95a3c574bdf41105e012df2e4c540ed859 /docs | |
| parent | f25e57704183544b0d540ef0035acfa6fb9071d7 (diff) | |
pkg/compiler: support negative integers
Currently we have to use 0xffffffffffffffff to represent -1,
and we can't express e.g. -20:20 int range.
Support negative consts to fix both problems.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/syscall_descriptions_syntax.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/syscall_descriptions_syntax.md b/docs/syscall_descriptions_syntax.md index c5db29864..a3ac4f9c9 100644 --- a/docs/syscall_descriptions_syntax.md +++ b/docs/syscall_descriptions_syntax.md @@ -78,7 +78,8 @@ flagname = "\"" literal "\"" ["," "\"" literal "\""]* ## Ints -`int8`, `int16`, `int32` and `int64` denote an integer of the corresponding size. `intptr` denotes a pointer-sized integer, i.e. C `long` type. +`int8`, `int16`, `int32` and `int64` denote an integer of the corresponding size. +`intptr` denotes a pointer-sized integer, i.e. C `long` type. By appending `be` suffix (e.g. `int16be`) integers become big-endian. @@ -260,7 +261,7 @@ hex literals, as `'`-surrounded char literals, or as symbolic constants extracted from kernel headers or defined by `define` directives. For example: ``` -foo(a const[10]) +foo(a const[10], b const[-10]) foo(a const[0xabcd]) foo(a int8['a':'z']) foo(a const[PATH_MAX]) |
