diff --git a/generator/insn_rdvs2vm.go b/generator/insn_rdvs2vm.go index 0ab47f3..9498e77 100644 --- a/generator/insn_rdvs2vm.go +++ b/generator/insn_rdvs2vm.go @@ -18,10 +18,12 @@ func (i *Insn) genCodeRdVs2Vm(pos int) []string { builder.WriteString(i.gWriteRandomData(LMUL(3))) builder.WriteString(i.gLoadDataIntoRegisterGroup(0, c.LMUL1, SEW(8))) - builder.WriteString(fmt.Sprintf("addi a0, a0, %d\n", 1*i.vlenb())) + builder.WriteString(fmt.Sprintf("li t1, %d\n", 1*i.vlenb())) + builder.WriteString(fmt.Sprintf("add a0, a0, t1\n")) builder.WriteString(i.gLoadDataIntoRegisterGroup(vd, c.LMUL1, SEW(8))) - builder.WriteString(fmt.Sprintf("addi a0, a0, %d\n", 1*i.vlenb())) + builder.WriteString(fmt.Sprintf("li t1, %d\n", 1*i.vlenb())) + builder.WriteString(fmt.Sprintf("add a0, a0, t1\n")) builder.WriteString(i.gLoadDataIntoRegisterGroup(vs2, c.LMUL1, SEW(8))) builder.WriteString("# -------------- TEST BEGIN --------------\n") diff --git a/generator/insn_vdvs2.go b/generator/insn_vdvs2.go index 8fa57c6..5792370 100644 --- a/generator/insn_vdvs2.go +++ b/generator/insn_vdvs2.go @@ -27,7 +27,8 @@ func (i *Insn) genCodeVdVs2(pos int) []string { builder.WriteString(i.gWriteRandomData(c.LMUL * 2)) builder.WriteString(i.gLoadDataIntoRegisterGroup(vd, c.LMUL, c.SEW)) - builder.WriteString(fmt.Sprintf("addi a0, a0, %d\n", int(c.LMUL)*i.vlenb())) + builder.WriteString(fmt.Sprintf("li t1, %d\n", int(c.LMUL)*i.vlenb())) + builder.WriteString(fmt.Sprintf("add a0, a0, t1\n")) builder.WriteString(i.gLoadDataIntoRegisterGroup(vs2, c.LMUL, c.SEW)) builder.WriteString("# -------------- TEST BEGIN --------------\n") diff --git a/generator/insn_vdvs2vmp2.go b/generator/insn_vdvs2vmp2.go index e32c91b..53fb660 100644 --- a/generator/insn_vdvs2vmp2.go +++ b/generator/insn_vdvs2vmp2.go @@ -22,7 +22,8 @@ func (i *Insn) genCodeVdVs2VmP2(pos int) []string { vs2 := 2 * int(c.LMUL1) builder.WriteString(i.gWriteRandomData(LMUL(1) * 2)) builder.WriteString(i.gLoadDataIntoRegisterGroup(0, c.LMUL1, c.SEW)) - builder.WriteString(fmt.Sprintf("addi a0, a0, %d\n", 1*i.vlenb())) + builder.WriteString(fmt.Sprintf("li t1, %d\n", 1*i.vlenb())) + builder.WriteString(fmt.Sprintf("add a0, a0, t1\n")) builder.WriteString(i.gLoadDataIntoRegisterGroup(vs2, c.LMUL1, c.SEW)) builder.WriteString(i.gWriteRandomData(c.LMUL1))