-/**
- * Return the tarval of an immediate operation or NULL in case of SymConst
- */
-tarval *get_ia32_Immop_tarval(const ir_node *node) {
- ia32_attr_t *attr = get_ia32_attr(node);
- return attr->cnst_val.tv;
-}
-
-/**
- * Sets the attributes of an immediate operation to the specified tarval
- */
-void set_ia32_Immop_tarval(ir_node *node, tarval *tv) {
- ia32_attr_t *attr = get_ia32_attr(node);
- attr->cnst_val.tv = tv;
- attr->cnst = get_ident_for_tv(tv);
-}
-
-/**
- * Return the sc attribute.
- */
-ident *get_ia32_sc(const ir_node *node) {
- ia32_attr_t *attr = get_ia32_attr(node);
- return attr->cnst_val.sc;
-}
-
-/**
- * Sets the sc attribute.
- */
-void set_ia32_sc(ir_node *node, ident *sc) {
- ia32_attr_t *attr = get_ia32_attr(node);
- attr->cnst_val.sc = sc;
- attr->cnst = attr->cnst_val.sc;
-}
-
-/**
- * Gets the string representation of the internal const (tv or symconst)
- */
-const char *get_ia32_cnst(const ir_node *node) {
- ia32_attr_t *attr = get_ia32_attr(node);
- return get_id_str(attr->cnst);
-}
-
-/**
- * Sets the string representation of the internal const.
- */
-void set_ia32_cnst(ir_node *node, char *cnst) {
- ia32_attr_t *attr = get_ia32_attr(node);
- attr->cnst = new_id_from_str(cnst);
-}
-
-/**
- * Gets the ident representation of the internal const (tv or symconst)
- */
-ident *get_ia32_id_cnst(const ir_node *node) {
- ia32_attr_t *attr = get_ia32_attr(node);
- return attr->cnst;
-}
-
-/**
- * Sets the ident representation of the internal const.
- */
-void set_ia32_id_cnst(ir_node *node, ident *cnst) {
- ia32_attr_t *attr = get_ia32_attr(node);
- attr->cnst = cnst;
+void ia32_copy_am_attrs(ir_node *to, const ir_node *from)
+{
+ set_ia32_ls_mode(to, get_ia32_ls_mode(from));
+ set_ia32_am_scale(to, get_ia32_am_scale(from));
+ set_ia32_am_sc(to, get_ia32_am_sc(from));
+ if(is_ia32_am_sc_sign(from))
+ set_ia32_am_sc_sign(to);
+ add_ia32_am_offs_int(to, get_ia32_am_offs_int(from));
+ set_ia32_frame_ent(to, get_ia32_frame_ent(from));
+ if (is_ia32_use_frame(from))
+ set_ia32_use_frame(to);