Added support for SymConst(ofs_ent)
[libfirm] / ir / be / ia32 / ia32_new_nodes.c
index d1b4df5..2a986a2 100644 (file)
@@ -544,10 +544,6 @@ char *get_ia32_am_offs(const ir_node *node) {
        ia32_attr_t *attr = get_ia32_attr(node);
        static char res[64];
 
-       if (! attr->am_offs) {
-               return NULL;
-       }
-
        snprintf(res, sizeof(res), "%+ld", attr->am_offs);
 
        return res;
@@ -682,7 +678,7 @@ const char *get_ia32_cnst(const ir_node *node) {
 /**
  * Sets the string representation of the internal const.
  */
-void set_ia32_cnst(ir_node *node, char *cnst) {
+void set_ia32_cnst(ir_node *node, const char *cnst) {
        ia32_attr_t *attr = get_ia32_attr(node);
        attr->cnst        = new_id_from_str(cnst);
 }
@@ -1172,8 +1168,9 @@ void set_ia32_Const_attr(ir_node *ia32_cnst, ir_node *cnst) {
                        attr->cnst_val.tv = get_Const_tarval(cnst);
                        mode = get_tarval_mode(attr->cnst_val.tv);
                        if (mode_is_reference(mode) &&
-                           get_mode_null(mode) == attr->cnst_val.tv)
-                               attr->cnst_val.tv = get_mode_null(mode_Is);
+                           get_mode_null(mode) == attr->cnst_val.tv) {
+                               attr->cnst_val.tv = get_mode_null(mode_Iu);
+                       }
                        attr->cnst        = get_ident_for_tv(attr->cnst_val.tv);
                        break;
                case iro_SymConst: