Skip to contentSkip to conversation

whpx: fix FP register loop

PATCH Applied Osama Abdelkader 4 participants 4 messages Feb 17 – Feb 18

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 whpx: fix FP register loop

In whpx_get_registers and whpx_set_registers the loops over FP registers were using whpx_reg_match[i].reg instead of whpx_fpreg_match[i].reg

---
 target/arm/whpx/whpx-all.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
target/arm/whpx/whpx-all.c +2 -2
index b0602266af..40ada2d5b6 100644
@@ -554,7 +554,7 @@ void whpx_get_registers(CPUState *cpu)
     }
 
     for (i = 0; i < ARRAY_SIZE(whpx_fpreg_match); i++) {
-        whpx_get_reg(cpu, whpx_reg_match[i].reg, &val);
+        whpx_get_reg(cpu, whpx_fpreg_match[i].reg, &val);
         memcpy((char *)env + whpx_fpreg_match[i].offset, &val, sizeof(val.Reg128));
     }
 
@@ -605,7 +605,7 @@ void whpx_set_registers(CPUState *cpu, int level)
 
     for (i = 0; i < ARRAY_SIZE(whpx_fpreg_match); i++) {
         memcpy(&val.Reg128, (char *)env + whpx_fpreg_match[i].offset, sizeof(val.Reg128));
-        whpx_set_reg(cpu, whpx_reg_match[i].reg, val);
+        whpx_set_reg(cpu, whpx_fpreg_match[i].reg, val);
     }
 
     clean_whv_register_value(&val);
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#2 lore raw
In reply to Osama Abdelkader
Quoted 9 lines · Osama Abdelkader

In whpx_get_registers and whpx_set_registers the loops over FP registers were using whpx_reg_match[i].reg instead of whpx_fpreg_match[i].reg

---

Reviewed-by Mohamed Mediouni <[email protected] <mailto:[email protected]>>

Thank you,

Quoted 28 lines

target/arm/whpx/whpx-all.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
target/arm/whpx/whpx-all.c +2 -2
index b0602266af..40ada2d5b6 100644
@@ -554,7 +554,7 @@ void whpx_get_registers(CPUState *cpu)
    }
 
    for (i = 0; i < ARRAY_SIZE(whpx_fpreg_match); i++) {
-        whpx_get_reg(cpu, whpx_reg_match[i].reg, &val);
+        whpx_get_reg(cpu, whpx_fpreg_match[i].reg, &val);
        memcpy((char *)env + whpx_fpreg_match[i].offset, &val, sizeof(val.Reg128));
    }
 
@@ -605,7 +605,7 @@ void whpx_set_registers(CPUState *cpu, int level)
 
    for (i = 0; i < ARRAY_SIZE(whpx_fpreg_match); i++) {
        memcpy(&val.Reg128, (char *)env + whpx_fpreg_match[i].offset, sizeof(val.Reg128));
-        whpx_set_reg(cpu, whpx_reg_match[i].reg, val);
+        whpx_set_reg(cpu, whpx_fpreg_match[i].reg, val);
    }
 
    clean_whv_register_value(&val);
Signature · 1 line
2.43.0