diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-05 06:09:49 -0700 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-05 06:12:02 -0700 |
commit | de501587c2ed91b4bc2a3d5228d59f6544427ab9 (patch) | |
tree | ce5c51c606f5b98a619632c1c9601c8b36aa6e03 /sim/mips | |
parent | 682ff29bfc83f6e90c9e021646f965e325bad301 (diff) | |
download | gdb-de501587c2ed91b4bc2a3d5228d59f6544427ab9.zip gdb-de501587c2ed91b4bc2a3d5228d59f6544427ab9.tar.gz gdb-de501587c2ed91b4bc2a3d5228d59f6544427ab9.tar.bz2 |
sim: mips: fix sim_fpu usage
Fix some of the sim_fpu calls to use the right types. While I'm
not familiar with the MIPS ISA in these cases, these look like
simple oversights due to the name/type mismatches. This at least
fixes compiling with -Wenum-conversion.
Diffstat (limited to 'sim/mips')
-rw-r--r-- | sim/mips/cp1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/mips/cp1.c b/sim/mips/cp1.c index 1af0c7a..aa8b05a 100644 --- a/sim/mips/cp1.c +++ b/sim/mips/cp1.c @@ -1178,7 +1178,7 @@ inner_rsqrt(uint64_t op1, uint32_t res; sim_fpu_32to (&wop1, op1); status |= sim_fpu_sqrt (&ans, &wop1); - status |= sim_fpu_round_32 (&ans, status, round); + status |= sim_fpu_round_32 (&ans, round, denorm); wop1 = ans; op_status = sim_fpu_inv (&ans, &wop1); op_status |= sim_fpu_round_32 (&ans, round, denorm); @@ -1216,7 +1216,7 @@ fp_inv_sqrt(sim_cpu *cpu, FP_formats fmt) { sim_fpu_round round = rounding_mode (GETRM()); - sim_fpu_round denorm = denorm_mode (cpu); + sim_fpu_denorm denorm = denorm_mode (cpu); sim_fpu_status status = 0; uint64_t result = 0; @@ -1903,8 +1903,8 @@ convert_ps (sim_cpu *cpu, result = (((uint64_t)res_u) << 32) | (uint64_t)res_l; break; case fmt_ps: - status_u |= sim_fpu_round_32 (&wop_u, 0, round); - status_l |= sim_fpu_round_32 (&wop_l, 0, round); + status_u |= sim_fpu_round_32 (&wop_u, round, denorm); + status_l |= sim_fpu_round_32 (&wop_l, round, denorm); sim_fpu_to32 (&res_u, &wop_u); sim_fpu_to32 (&res_l, &wop_l); result = FP_PS_cat(res_u, res_l); |