aboutsummaryrefslogtreecommitdiffstats
path: root/sysgen
diff options
context:
space:
mode:
Diffstat (limited to 'sysgen')
-rw-r--r--sysgen/sysgen.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysgen/sysgen.go b/sysgen/sysgen.go
index b0b5f6f52..5bda2ed2b 100644
--- a/sysgen/sysgen.go
+++ b/sysgen/sysgen.go
@@ -561,7 +561,8 @@ func generateArg(
if valuesStartInt >= (1 << (size * 8)) {
failf("values starting from '%v' overflow desired type of size '%v'", valuesStartInt, size)
}
- if valuesStartInt+32*valuesPerProcInt >= (1 << (size * 8)) {
+ const maxPids = 32 // executor knows about this constant (MAX_PIDS)
+ if valuesStartInt+maxPids*valuesPerProcInt >= (1 << (size * 8)) {
failf("not enough values starting from '%v' with step '%v' and type size '%v' for 32 procs", valuesStartInt, valuesPerProcInt, size)
}
fmt.Fprintf(out, "&ProcType{%v, TypeSize: %v, BigEndian: %v, ValuesStart: %v, ValuesPerProc: %v}", common(), size, bigEndian, valuesStartInt, valuesPerProcInt)