aboutsummaryrefslogtreecommitdiff
path: root/sim/frv/traps.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-05-29 12:20:20 -0400
committerMike Frysinger <vapier@gentoo.org>2021-05-29 13:07:34 -0400
commitfc12ae421543c019c3afd27ef095f828fd3b0e3b (patch)
treeafd84659c25c95f0d64d4a51c34ac305bbb331eb /sim/frv/traps.c
parentcd7caae65175a8ea1149cae7dcf11948f4933d1b (diff)
downloadgdb-fc12ae421543c019c3afd27ef095f828fd3b0e3b.zip
gdb-fc12ae421543c019c3afd27ef095f828fd3b0e3b.tar.gz
gdb-fc12ae421543c019c3afd27ef095f828fd3b0e3b.tar.bz2
sim: frv: fix compiler parentheses suggestions warnings
Newer gcc warns when writing statements like (a && b || c && d), so add more parentheses to make it (and the reader) happy.
Diffstat (limited to 'sim/frv/traps.c')
-rw-r--r--sim/frv/traps.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sim/frv/traps.c b/sim/frv/traps.c
index 25b4e3e..d5cab24 100644
--- a/sim/frv/traps.c
+++ b/sim/frv/traps.c
@@ -275,7 +275,8 @@ frv_mtrap (SIM_CPU *current_cpu)
/* Check the status of media exceptions in MSR0. */
SI msr = GET_MSR (0);
- if (GET_MSR_AOVF (msr) || GET_MSR_MTT (msr) && STATE_ARCHITECTURE (sd)->mach != bfd_mach_fr550)
+ if (GET_MSR_AOVF (msr)
+ || (GET_MSR_MTT (msr) && STATE_ARCHITECTURE (sd)->mach != bfd_mach_fr550))
frv_queue_program_interrupt (current_cpu, FRV_MP_EXCEPTION);
}
@@ -922,8 +923,8 @@ frvbf_commit (SIM_CPU *current_cpu, SI target_index, BI is_float)
NE_flag = GET_NE_FLAG (NE_flags, target_index);
else
{
- NE_flag =
- hi_available && NE_flags[0] != 0 || lo_available && NE_flags[1] != 0;
+ NE_flag = (hi_available && NE_flags[0] != 0)
+ || (lo_available && NE_flags[1] != 0);
}
/* Always clear the appropriate NE flags. */