X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Farm%2Farm_nodes_attr.h;h=75159cdb83aadc622e8fcdb83b7c81b51e55a296;hb=3c3425a50a1d721b74a015c6812257e32feeac85;hp=df4d421454346b111b7c155cc5702d4774a69916;hpb=24fedddc648276a205f780ff7f1ad5a3e76c88b4;p=libfirm diff --git a/ir/be/arm/arm_nodes_attr.h b/ir/be/arm/arm_nodes_attr.h index df4d42145..75159cdb8 100644 --- a/ir/be/arm/arm_nodes_attr.h +++ b/ir/be/arm/arm_nodes_attr.h @@ -21,19 +21,18 @@ * @file * @brief declarations for ARM node attributes * @author Oliver Richter, Tobias Gneist, Michael Beck - * @version $Id$ */ #ifndef FIRM_BE_ARM_ARM_NODES_ATTR_H #define FIRM_BE_ARM_ARM_NODES_ATTR_H #include "firm_types.h" #include "irnode_t.h" -#include "../bearch.h" +#include "bearch.h" /** * Possible ARM "shifter operand" addressing mode types. */ -typedef enum _arm_shift_modifier { +typedef enum arm_shift_modifier_t { ARM_SHF_INVALID, /**< invalid shift */ ARM_SHF_REG, /**< simple register operand */ ARM_SHF_IMM, /**< immediate operand with implicit ROR */ @@ -46,14 +45,7 @@ typedef enum _arm_shift_modifier { ARM_SHF_ROR_IMM, /**< rotate right */ ARM_SHF_ROR_REG, /**< rotate right */ ARM_SHF_RRX, /**< rotate right through carry bits */ -} arm_shift_modifier; - -/** fpa immediate bit */ -#define ARM_FPA_IMM (1 << 3) /**< fpa floating point immediate */ - -#define ARM_GET_FPA_IMM(attr) ((attr)->instr_fl & ARM_FPA_IMM) -#define ARM_SET_FPA_IMM(attr) ((attr)->instr_fl |= ARM_FPA_IMM) -#define ARM_CLR_FPA_IMM(attr) ((attr)->instr_fl &= ~ARM_FPA_IMM) +} arm_shift_modifier_t; /** Encoding for fpa immediates */ enum fpa_immediates { @@ -69,14 +61,9 @@ enum fpa_immediates { }; /** Generic ARM node attributes. */ -typedef struct _arm_attr_t { - except_attr exc; /**< the exception attribute. MUST be the first one. */ - - const arch_register_req_t **in_req; /**< register requirements for arguments */ - - ir_mode *op_mode; /**< operation mode if different from node's mode (used for fpa nodes) */ - unsigned instr_fl; /**< deprecated (was sometimes used for shift modifiers) */ - bool is_load_store : 1; +typedef struct arm_attr_t { + except_attr exc; /**< the exception attribute. MUST be the first one. */ + bool is_load_store : 1; /**< if set, this is a load or store instruction */ } arm_attr_t; /** @@ -84,10 +71,10 @@ typedef struct _arm_attr_t { * "data processing operands" also called "shifter operand" addressing modes */ typedef struct arm_shifter_operand_t { - arm_attr_t base; - arm_shift_modifier shift_modifier; - unsigned char immediate_value; - unsigned char shift_immediate; + arm_attr_t base; + arm_shift_modifier_t shift_modifier; + unsigned char immediate_value; + unsigned char shift_immediate; } arm_shifter_operand_t; typedef struct arm_cmp_attr_t { @@ -110,41 +97,41 @@ typedef struct arm_load_store_attr_t { } arm_load_store_attr_t; /** Attributes for a SymConst */ -typedef struct _arm_SymConst_attr_t { +typedef struct arm_SymConst_attr_t { arm_attr_t base; ir_entity *entity; int fp_offset; } arm_SymConst_attr_t; /** Attributes for a CondJmp */ -typedef struct _arm_CondJmp_attr_t { +typedef struct arm_CondJmp_attr_t { arm_attr_t base; - int proj_num; + ir_relation relation; } arm_CondJmp_attr_t; /** Attributes for a SwitchJmp */ -typedef struct _arm_SwitchJmp_attr_t { - arm_attr_t base; - int n_projs; - long default_proj_num; +typedef struct arm_SwitchJmp_attr_t { + arm_attr_t base; + const ir_switch_table *table; } arm_SwitchJmp_attr_t; /** CopyB attributes */ -typedef struct { +typedef struct arm_CopyB_attr_t { arm_attr_t base; unsigned size; } arm_CopyB_attr_t; -/** Attributes for a fpaConst */ -typedef struct _arm_fpaConst_attr_t { +/** Attributes for a fConst */ +typedef struct arm_fConst_attr_t { arm_attr_t base; - tarval *tv; /**< the tarval representing the FP const */ -} arm_fpaConst_attr_t; + ir_tarval *tv; /**< the tarval representing the FP const */ +} arm_fConst_attr_t; -/** - * Return the fpa immediate from the encoding. - */ -const char *arm_get_fpa_imm_name(long imm_value); +/** attributes for floatingpoint arithmetic operations */ +typedef struct arm_farith_attr_t { + arm_attr_t base; + ir_mode *mode; /* operation mode */ +} arm_farith_attr_t; #define CAST_ARM_ATTR(type,ptr) ((type *)(ptr)) #define CONST_CAST_ARM_ATTR(type,ptr) ((const type *)(ptr))