diff options
Diffstat (limited to 'gdb/arch/arm.h')
-rw-r--r-- | gdb/arch/arm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/arch/arm.h b/gdb/arch/arm.h index 5f7aa85..d9c7503 100644 --- a/gdb/arch/arm.h +++ b/gdb/arch/arm.h @@ -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); |