aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSong Gao <gaosong@loongson.cn>2023-12-13 16:18:36 +0800
committerPeter Maydell <peter.maydell@linaro.org>2023-12-14 16:02:32 +0000
commit5016edc8ca6b264ca67a7733ad33fae0a1b312b2 (patch)
tree10d1727926429650c4d899f2880fb2bcf17583de
parentfa997ae75254cdb3a43489cfd2badc0c4d666d73 (diff)
loongarch: init LASX registers
Most of LoongArch cpus have LSX and LASX, so we can init LASX registers for risu test. we use $f0-$f31 value to init LASX $vreg0- $vreg31 registers. Signed-off-by: Song Gao <gaosong@loongson.cn> Message-id: 20231213081839.4176614-4-gaosong@loongson.cn Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--risugen_loongarch64.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/risugen_loongarch64.pm b/risugen_loongarch64.pm
index 01df1da..f8b1612 100644
--- a/risugen_loongarch64.pm
+++ b/risugen_loongarch64.pm
@@ -374,6 +374,16 @@ sub write_random_register_data($)
if ($fp_enabled) {
# Load floating point registers
write_random_loongarch64_fpdata();
+
+ # Write random LASX data.
+ for (my $i = 0; $i < 32; $i++) {
+ my $tmp_reg = 6;
+ # $fi is lasx register initial value.
+ # movfr2gr.d r6 fi
+ insn32(0x114b800 | $i << 5 | $tmp_reg);
+ # xvreplgr2vr_d $i r6
+ insn32(0x769f0c00 | 6 << 5 | $i);
+ }
}
write_random_regdata();