fix more cparser warnings, cleanup some libcore code
[libfirm] / ir / be / sparc / bearch_sparc_t.h
index b69f5c5..6e69d80 100644 (file)
@@ -20,6 +20,7 @@
 /**
  * @file
  * @brief   declarations for SPARC backend -- private header
+ * @author  Hannes Rapp, Matthias Braun
  * @version $Id$
  */
 #ifndef FIRM_BE_SPARC_BEARCH_SPARC_T_H
@@ -49,19 +50,34 @@ struct sparc_transform_env_t {
        ir_mode  *mode;     /**< The mode of the irn */
 };
 
+extern const arch_irn_ops_t sparc_irn_ops;
+
 /**
- * Sparc ABI requires some space which is always available at the top of
+ * SPARC ABI requires some space which is always available at the top of
  * the stack. It contains:
  * 16*4 bytes space for spilling the register window
- * 1*4 byte   holding a pointer to space for agregate returns (the space is
- *            always reserved, regardless wether we have an agregate return
+ * 1*4 byte   holding a pointer to space for aggregate returns (the space is
+ *            always reserved, regardless whether we have an aggregate return
  *            or not)
  * 6*4 bytes  Space for spilling parameters 0-5. For the cases when someone
- *            takes the adress of a parameter. I guess this is also there so
+ *            takes the address of a parameter. I guess this is also there so
  *            the implementation of va_args gets easier -> We can simply store
  *            param 0-5 in this spaces and then handle va_next by simply
  *            incrementing the stack pointer
  */
 #define SPARC_MIN_STACKSIZE 92
+#define SPARC_IMMEDIATE_MIN -4096
+#define SPARC_IMMEDIATE_MAX  4095
+
+static inline bool sparc_is_value_imm_encodeable(int32_t value)
+{
+       return SPARC_IMMEDIATE_MIN <= value && value <= SPARC_IMMEDIATE_MAX;
+}
+
+void sparc_finish(ir_graph *irg);
+
+void sparc_introduce_prolog_epilog(ir_graph *irg);
+
+void sparc_lower_64bit(void);
 
 #endif