1 Star 0 Fork 121

侯景博/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
target-loongarch-kvm-fpu-save-the-vreg-registers-hig.patch 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
gaosong 提交于 2024-05-20 17:35 . QEMU update to version 8.2.0-13
From 7a3573ce009afa271168829da86e2c70c63fa58a Mon Sep 17 00:00:00 2001
From: Song Gao <[email protected]>
Date: Tue, 14 May 2024 19:07:52 +0800
Subject: [PATCH] target/loongarch/kvm: fpu save the vreg registers high
192bit
On kvm side, get_fpu/set_fpu save the vreg registers high 192bits,
but QEMU missing.
Signed-off-by: Song Gao <[email protected]>
Reviewed-by: Bibo Mao <[email protected]>
Message-Id: <[email protected]>
---
target/loongarch/kvm/kvm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c
index e1d521a1de..5c88270132 100644
--- a/target/loongarch/kvm/kvm.c
+++ b/target/loongarch/kvm/kvm.c
@@ -444,6 +444,9 @@ static int kvm_loongarch_get_regs_fp(CPUState *cs)
env->fcsr0 = fpu.fcsr;
for (i = 0; i < 32; i++) {
env->fpr[i].vreg.UD[0] = fpu.fpr[i].val64[0];
+ env->fpr[i].vreg.UD[1] = fpu.fpr[i].val64[1];
+ env->fpr[i].vreg.UD[2] = fpu.fpr[i].val64[2];
+ env->fpr[i].vreg.UD[3] = fpu.fpr[i].val64[3];
}
for (i = 0; i < 8; i++) {
env->cf[i] = fpu.fcc & 0xFF;
@@ -465,6 +468,9 @@ static int kvm_loongarch_put_regs_fp(CPUState *cs)
fpu.fcc = 0;
for (i = 0; i < 32; i++) {
fpu.fpr[i].val64[0] = env->fpr[i].vreg.UD[0];
+ fpu.fpr[i].val64[1] = env->fpr[i].vreg.UD[1];
+ fpu.fpr[i].val64[2] = env->fpr[i].vreg.UD[2];
+ fpu.fpr[i].val64[3] = env->fpr[i].vreg.UD[3];
}
for (i = 0; i < 8; i++) {
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Destiny_zhuohua/qemu.git
[email protected]:Destiny_zhuohua/qemu.git
Destiny_zhuohua
qemu
qemu
master

搜索帮助