diff options
| author | Paul Chaignon <paul.chaignon@orange.com> | 2019-10-18 14:45:31 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-10-25 18:16:59 +0200 |
| commit | 713f727d983ec2c0c8307a7dcafc270aeee900dd (patch) | |
| tree | 6f3d539931db47b892b5eecafd8a890a1cb9faf4 /prog/size.go | |
| parent | ced0f73a673b1ab94725fe1710dcf7105015eb74 (diff) | |
prog, pkg/compiler: alignment for integer ranges
Enables the syntax intN[start:end, alignment] for integer ranges. For
instance, int32[0:10, 2] represents even 32-bit numbers between 0 and 10
included. With this change, two NEED tags in syscall descriptions can be
addressed.
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
Diffstat (limited to 'prog/size.go')
| -rw-r--r-- | prog/size.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prog/size.go b/prog/size.go index c465a9171..0f3435bbd 100644 --- a/prog/size.go +++ b/prog/size.go @@ -181,9 +181,9 @@ func (r *randGen) mutateSize(arg *ConstArg, parent []Arg) bool { if r.bin() { // Small adjustment to trigger missed size checks. if arg.Val != 0 && r.bin() { - arg.Val = r.randRangeInt(0, arg.Val-1, arg.Type().TypeBitSize()) + arg.Val = r.randRangeInt(0, arg.Val-1, arg.Type().TypeBitSize(), 0) } else { - arg.Val = r.randRangeInt(arg.Val+1, arg.Val+1000, arg.Type().TypeBitSize()) + arg.Val = r.randRangeInt(arg.Val+1, arg.Val+1000, arg.Type().TypeBitSize(), 0) } return true } |
