Skip to content

Commit dda97e3

Browse files
arichardsonphilmd
authored andcommitted
target/mips: Fix ADD.S FPU instruction
After merging latest QEMU upstream into our CHERI fork, I noticed that some of the FPU tests in our MIPS baremetal testsuite [*] started failing. It turns out commit 1ace099 accidentally changed add.s into a subtract. [*] https://github.com/CTSRD-CHERI/cheritest Fixes: 1ace099 ("target/mips: fpu: Demacro ADD.<D|S|PS>") Signed-off-by: Alex Richardson <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]> Signed-off-by: Aleksandar Markovic <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent 9788e8c commit dda97e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

target/mips/fpu_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ uint32_t helper_float_add_s(CPUMIPSState *env,
12211221
{
12221222
uint32_t wt2;
12231223

1224-
wt2 = float32_sub(fst0, fst1, &env->active_fpu.fp_status);
1224+
wt2 = float32_add(fst0, fst1, &env->active_fpu.fp_status);
12251225
update_fcr31(env, GETPC());
12261226
return wt2;
12271227
}

0 commit comments

Comments
 (0)