Skip to content

Commit

Permalink
Use tail/mask undisturbed instead of agnostic (for #35)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksco committed Apr 7, 2024
1 parent 39f93cc commit d5ab039
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion generator/insn.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ func (c *combination) initialize() string {
# Generating tests for VL: %d, LMUL: %s, SEW: %s, Mask: %v
# Zero all vector registers
vsetvli t0, x0, e8, m8, ta, ma
vsetvli t0, x0, e8,m8,tu,mu
vmv.v.i v0, 0x0
vmv.v.i v8, 0x0
vmv.v.i v16, 0x0
Expand Down
8 changes: 4 additions & 4 deletions generator/insn_g.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (i *Insn) gLoadDataIntoRegisterGroup(
builder := strings.Builder{}
builder.WriteString(fmt.Sprintf("\n# Load data into v%d register group.\n", group))
builder.WriteString("li t0, -1\n")
builder.WriteString(fmt.Sprintf("vsetvli t1, t0, %s,%s,ta,ma\n", sew.String(), lmul.String()))
builder.WriteString(fmt.Sprintf("vsetvli t1, t0, %s,%s,tu,mu\n", sew.String(), lmul.String()))
builder.WriteString(fmt.Sprintf("vle%d.v v%d, (a0)\n\n", sew, group))
return builder.String()
}
Expand All @@ -131,7 +131,7 @@ func (i *Insn) gStoreRegisterGroupIntoResultData(

builder.WriteString(fmt.Sprintf("\n# Store v%d register group into result data area.\n", group))
builder.WriteString("li t0, -1\n")
builder.WriteString(fmt.Sprintf("vsetvli t1, t0, %s,%s,ta,ma\n",
builder.WriteString(fmt.Sprintf("vsetvli t1, t0, %s,%s,tu,mu\n",
sew.String(), lmul.String()))
builder.WriteString(fmt.Sprintf("vse%d.v v%d, (a0)\n\n", sew, group))
return builder.String()
Expand All @@ -144,7 +144,7 @@ func (i *Insn) gMoveScalarToVector(scalar string, vector int, sew SEW) string {
builder.WriteString(fmt.Sprintf("\n# Move %s to the elem 0 of v%d\n", scalar, vector))

builder.WriteString("li t0, -1\n")
builder.WriteString(fmt.Sprintf("vsetvli t1, t0, %s,m1,ta,ma\n", sew.String()))
builder.WriteString(fmt.Sprintf("vsetvli t1, t0, %s,m1,tu,mu\n", sew.String()))
builder.WriteString(fmt.Sprintf("v%smv.s.%s v%d, %s\n",
iff(float, "f", ""), iff(float, "f", "x"), vector, scalar))

Expand All @@ -169,7 +169,7 @@ func (i *Insn) gMagicInsn(group int) string {

func (i *Insn) gVsetvli(vl int, sew SEW, lmul LMUL) string {
res := fmt.Sprintf("li t0, %d\n", vl)
res += fmt.Sprintf("vsetvli t1, t0, %s,%s,ta,ma\n",
res += fmt.Sprintf("vsetvli t1, t0, %s,%s,tu,mu\n",
sew.String(), lmul.String())
return res
}

0 comments on commit d5ab039

Please sign in to comment.