+
+/* Returns true if a simple return insn can be used. */
+
+bool
+rx_can_use_simple_return (void)
+{
+ unsigned int low;
+ unsigned int high;
+ unsigned int frame_size;
+ unsigned int stack_size;
+ unsigned int register_mask;
+
+ if (is_naked_func (NULL_TREE)
+ || is_fast_interrupt_func (NULL_TREE)
+ || is_interrupt_func (NULL_TREE))
+ return false;
+
+ rx_get_stack_layout (& low, & high, & register_mask,
+ & frame_size, & stack_size);
+
+ return (register_mask == 0
+ && (frame_size + stack_size) == 0
+ && low == 0);
+}
+