target/loongarch: Fix vldi inst
authorGuo Hongyu <guohongyu24@mails.ucas.ac.cn>
Thu, 19 Dec 2024 12:23:11 +0000 (20:23 +0800)
committerBibo Mao <maobibo@loongson.cn>
Fri, 27 Dec 2024 03:29:43 +0000 (11:29 +0800)
Refer to the link below for a description of the vldi instructions:
https://jia.je/unofficial-loongarch-intrinsics-guide/lsx/misc/#synopsis_88
Fixed errors in vldi instruction implementation.

Signed-off-by: Guo Hongyu <guohongyu24@mails.ucas.ac.cn>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
target/loongarch/tcg/insn_trans/trans_vec.c.inc

index 92b1d22e28934b524a1f6ae6cb2bcbb189de27e3..d317dfcc1c517536673caab75efb14b6c8a4f16a 100644 (file)
@@ -3480,7 +3480,7 @@ static uint64_t vldi_get_value(DisasContext *ctx, uint32_t imm)
         break;
     case 1:
         /* data: {2{16'0, imm[7:0], 8'0}} */
-        data = (t << 24) | (t << 8);
+        data = (t << 40) | (t << 8);
         break;
     case 2:
         /* data: {2{8'0, imm[7:0], 16'0}} */