+static inline _Bool can_sign_extend(s32 value, u8 order)
+{
+ return ((u32)(value >> (order - 1)) + 1) < 2;
+}
+
+static inline _Bool can_zero_extend(u32 value, u8 order)
+{
+ return (value >> order) == 0;
+}
+
+static inline const struct opcode *
+get_delay_slot(const struct opcode *list, u16 i)
+{
+ return op_flag_no_ds(list[i].flags) ? &list[i - 1] : &list[i + 1];
+}
+
+static inline _Bool lightrec_store_next_pc(void)
+{
+ return NUM_REGS + NUM_TEMPS <= 4;
+}
+