-
-/**
- * Sets the AddrMode(S|D) attribute
- */
-void set_ia32_AddrMode(ir_node *node, char direction) {
- ia32_attr_t *attr = get_ia32_attr(node);
-
- switch (direction) {
- case 'D':
- attr->data.tp = ia32_AddrModeD;
- break;
- case 'S':
- attr->data.tp = ia32_AddrModeS;
- break;
- default:
- assert(0 && "wrong AM type");
- }
-}
-
-/**
- * Returns whether or not the node is an immediate operation with Const.
- */
-int is_ia32_ImmConst(const ir_node *node) {
- const ia32_attr_t *attr = get_ia32_attr_const(node);
- return (attr->data.imm_tp == ia32_ImmConst);
-}
-
-/**
- * Returns whether or not the node is an immediate operation with SymConst.
- */
-int is_ia32_ImmSymConst(const ir_node *node) {
- const ia32_attr_t *attr = get_ia32_attr_const(node);
- return (attr->data.imm_tp == ia32_ImmSymConst);
-}
-
-/**
- * Returns whether or not the node is an AddrModeS node.
- */
-int is_ia32_AddrModeS(const ir_node *node) {
- const ia32_attr_t *attr = get_ia32_attr_const(node);
- return (attr->data.tp == ia32_AddrModeS);
-}
-
-/**
- * Returns whether or not the node is an AddrModeD node.
- */
-int is_ia32_AddrModeD(const ir_node *node) {
- const ia32_attr_t *attr = get_ia32_attr_const(node);
- return (attr->data.tp == ia32_AddrModeD);
-}
-
-/**
- * Checks if node is a Load or xLoad/vfLoad.
- */
-int is_ia32_Ld(const ir_node *node) {
- int op = get_ia32_irn_opcode(node);
- return op == iro_ia32_Load ||
- op == iro_ia32_xLoad ||
- op == iro_ia32_vfld ||
- op == iro_ia32_fld;
-}
-
-/**
- * Checks if node is a Store or xStore/vfStore.
- */
-int is_ia32_St(const ir_node *node) {
- int op = get_ia32_irn_opcode(node);
- return op == iro_ia32_Store ||
- op == iro_ia32_Store8Bit ||
- op == iro_ia32_xStore ||
- op == iro_ia32_vfst ||
- op == iro_ia32_fst ||
- op == iro_ia32_fstp;
-}
-
-/**
- * Checks if node is a Const or xConst/vfConst.
- */
-int is_ia32_Cnst(const ir_node *node) {
- int op = get_ia32_irn_opcode(node);
- return op == iro_ia32_Const || op == iro_ia32_xConst || op == iro_ia32_vfConst;
+static void init_ia32_x87_attributes(ir_node *res)
+{
+ ir_graph *irg = get_irn_irg(res);
+ ia32_irg_data_t *irg_data = ia32_get_irg_data(irg);
+#ifndef NDEBUG
+ ia32_attr_t *attr = get_ia32_attr(res);
+ attr->attr_type |= IA32_ATTR_ia32_x87_attr_t;
+#else
+ (void) res;
+#endif
+ irg_data->do_x87_sim = 1;