aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch/arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/arch/arm.h')
-rw-r--r--gdb/arch/arm.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/gdb/arch/arm.h b/gdb/arch/arm.h
index 7738d9c..d9c7503 100644
--- a/gdb/arch/arm.h
+++ b/gdb/arch/arm.h
@@ -1,5 +1,5 @@
/* Common target dependent code for GDB on ARM systems.
- Copyright (C) 1988-2024 Free Software Foundation, Inc.
+ Copyright (C) 1988-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -194,6 +194,23 @@ struct reg_buffer_common;
first halfword is INST1. */
int thumb_insn_size (unsigned short inst1);
+/* Returns true if COND always evaluates to true. */
+
+static inline bool
+condition_always_true (unsigned long cond)
+{
+ return cond == INST_AL || cond == INST_NV;
+}
+
+/* Returns true if cond of INSN always evaluates to true. */
+
+static inline bool
+insn_condition_always_true (uint32_t insn)
+{
+ unsigned long cond = bits (insn, 28, 31);
+ return condition_always_true (cond);
+}
+
/* Returns true if the condition evaluates to true. */
int condition_true (unsigned long cond, unsigned long status_reg);