X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fsparc%2Fsparc_nodes_attr.h;h=d5572e61e39d3cb9161256b66ba188fec277f169;hb=6ccff2965d94c272f71df2a1655336af47bb7753;hp=3f91a96d3a5642dc3f8793ec4a3256647ac349db;hpb=2158510961e84fb11e9195c200335f2314e49055;p=libfirm diff --git a/ir/be/sparc/sparc_nodes_attr.h b/ir/be/sparc/sparc_nodes_attr.h index 3f91a96d3..d5572e61e 100644 --- a/ir/be/sparc/sparc_nodes_attr.h +++ b/ir/be/sparc/sparc_nodes_attr.h @@ -20,12 +20,13 @@ /** * @file * @brief attributes attached to all sparc nodes - * @version $Id$ + * @author Hannes Rapp, Matthias Braun */ #ifndef FIRM_BE_SPARC_SPARC_NODES_ATTR_H #define FIRM_BE_SPARC_SPARC_NODES_ATTR_H -#include "../bearch.h" +#include "bearch.h" +#include typedef struct sparc_attr_t sparc_attr_t; @@ -34,34 +35,45 @@ typedef struct sparc_attr_t sparc_attr_t; */ struct sparc_attr_t { - except_attr exc; /**< the exception attribute. MUST be the first one. */ - const arch_register_req_t **in_req; /**< register requirements for arguments */ - int immediate_value; /* immediate values */ - bool is_load_store; + except_attr exc; /**< the exception attribute. MUST be the first one. */ + int32_t immediate_value; /* immediate values */ + ir_entity *immediate_value_entity; }; +enum sparc_arch_irn_flags_t { + sparc_arch_irn_flag_modifies_flags = arch_irn_flags_backend << 0, + sparc_arch_irn_flag_modifies_fp_flags = arch_irn_flags_backend << 1, + sparc_arch_irn_flag_needs_64bit_spillslot = arch_irn_flags_backend << 2, + sparc_arch_irn_flag_immediate_form = arch_irn_flags_backend << 3, + sparc_arch_irn_flag_aggregate_return = arch_irn_flags_backend << 4, + sparc_arch_irn_flag_has_delay_slot = arch_irn_flags_backend << 5, +}; /** - * attributes for load/store adressing modes + * attribute for FP immediate instruction */ -typedef struct sparc_load_store_attr_t sparc_load_store_attr_t; -struct sparc_load_store_attr_t { - sparc_attr_t base; /**< generic attribute */ - ir_mode *load_store_mode; - ir_entity *entity; - int entity_sign; - long offset; - bool is_frame_entity; +typedef struct sparc_fp_attr_t sparc_fp_attr_t; +struct sparc_fp_attr_t { + sparc_attr_t base; /**< generic attribute */ + ir_mode *fp_mode; +}; + +typedef struct sparc_fp_conv_attr_t sparc_fp_conv_attr_t; +struct sparc_fp_conv_attr_t { + sparc_attr_t base; + ir_mode *src_mode; + ir_mode *dest_mode; }; /** - * attributes for SymConsts + * attributes for load/store addressing modes */ -typedef struct sparc_symconst_attr_t sparc_symconst_attr_t; -struct sparc_symconst_attr_t { - sparc_attr_t base; /**< generic attribute */ - ir_entity *entity; - int fp_offset; +typedef struct sparc_load_store_attr_t sparc_load_store_attr_t; +struct sparc_load_store_attr_t { + sparc_attr_t base; /**< generic attribute */ + ir_mode *load_store_mode; + bool is_frame_entity : 1; + bool is_reg_reg : 1; }; /** @@ -69,28 +81,19 @@ struct sparc_symconst_attr_t { */ typedef struct sparc_jmp_cond_attr_t sparc_jmp_cond_attr_t; struct sparc_jmp_cond_attr_t { - sparc_attr_t base; /**< generic attribute */ - int proj_num; + sparc_attr_t base; /**< generic attribute */ + ir_relation relation; + bool is_unsigned : 1; }; /** * attributes for switch jumps */ -typedef struct sparc_jmp_switch_attr_t sparc_jmp_switch_attr_t; -struct sparc_jmp_switch_attr_t { - sparc_attr_t base; /**< generic attribute */ - int n_projs; - long default_proj_num; -}; - -/** - * attributes for Cmp - */ -typedef struct sparc_cmp_attr_t sparc_cmp_attr_t; -struct sparc_cmp_attr_t { - sparc_attr_t base; /**< generic attribute */ - bool ins_permuted : 1; - bool is_unsigned : 1; +typedef struct sparc_switch_jmp_attr_t sparc_switch_jmp_attr_t; +struct sparc_switch_jmp_attr_t { + sparc_attr_t base; + const ir_switch_table *table; + ir_entity *table_entity; }; #endif