Skip to content

Commit

Permalink
Add more cases for vl
Browse files Browse the repository at this point in the history
  • Loading branch information
ksco committed Jan 30, 2024
1 parent 01c2ca1 commit c3b739e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generator/insn.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"log"
"math"
"math/rand"
"strings"

"github.com/pelletier/go-toml/v2"
Expand Down Expand Up @@ -475,7 +476,8 @@ func (i *Insn) combinations(lmuls []LMUL, sews []SEW, masks []bool, vxrms []VXRM
lmul1 := LMUL(math.Max(float64(lmul), 1))
for _, mask := range masks {
vlmax1 := int((float64(i.Option.VLEN) / float64(sew)) * float64(lmul1))
for _, vl := range []int{0, vlmax1 / 2, vlmax1, vlmax1 + 1} {
rand.Seed(int64(vlmax1))
for _, vl := range []int{0, vlmax1/2 - 1, vlmax1 / 2, vlmax1, vlmax1 - 1, vlmax1 + 1, rand.Intn(vlmax1), rand.Intn(vlmax1), rand.Intn(vlmax1)} {
for _, vxrm := range vxrms {
res = append(res, combination{
SEW: sew,
Expand Down

0 comments on commit c3b739e

Please sign in to comment.