Commit 5d8892b2 authored by Matthias Braun's avatar Matthias Braun
Browse files

remove Carry+Borrow node

parent f0c1a882
...@@ -182,48 +182,6 @@ static ir_tarval *computed_value_Sub(const ir_node *n) ...@@ -182,48 +182,6 @@ static ir_tarval *computed_value_Sub(const ir_node *n)
return tarval_bad; return tarval_bad;
} }
/**
* Return the value of a Carry.
* Special : a op 0, 0 op b
*/
static ir_tarval *computed_value_Carry(const ir_node *n)
{
ir_node *a = get_binop_left(n);
ir_node *b = get_binop_right(n);
ir_mode *m = get_irn_mode(n);
ir_tarval *ta = value_of(a);
ir_tarval *tb = value_of(b);
if ((ta != tarval_bad) && (tb != tarval_bad)) {
tarval_add(ta, tb);
return tarval_carry() ? get_mode_one(m) : get_mode_null(m);
} else {
if (tarval_is_null(ta) || tarval_is_null(tb))
return get_mode_null(m);
}
return tarval_bad;
}
/**
* Return the value of a Borrow.
* Special : a op 0
*/
static ir_tarval *computed_value_Borrow(const ir_node *n)
{
ir_node *a = get_binop_left(n);
ir_node *b = get_binop_right(n);
ir_mode *m = get_irn_mode(n);
ir_tarval *ta = value_of(a);
ir_tarval *tb = value_of(b);
if ((ta != tarval_bad) && (tb != tarval_bad)) {
return tarval_cmp(ta, tb) == ir_relation_less ? get_mode_one(m) : get_mode_null(m);
} else if (tarval_is_null(ta)) {
return get_mode_null(m);
}
return tarval_bad;
}
/** /**
* Return the value of an unary Minus. * Return the value of an unary Minus.
*/ */
...@@ -6289,8 +6247,6 @@ void ir_register_opt_node_ops(void) ...@@ -6289,8 +6247,6 @@ void ir_register_opt_node_ops(void)
{ {
register_computed_value_func(op_Add, computed_value_Add); register_computed_value_func(op_Add, computed_value_Add);
register_computed_value_func(op_And, computed_value_And); register_computed_value_func(op_And, computed_value_And);
register_computed_value_func(op_Borrow, computed_value_Borrow);
register_computed_value_func(op_Carry, computed_value_Carry);
register_computed_value_func(op_Cmp, computed_value_Cmp); register_computed_value_func(op_Cmp, computed_value_Cmp);
register_computed_value_func(op_Confirm, computed_value_Confirm); register_computed_value_func(op_Confirm, computed_value_Confirm);
register_computed_value_func(op_Const, computed_value_Const); register_computed_value_func(op_Const, computed_value_Const);
......
...@@ -240,11 +240,6 @@ class Block: ...@@ -240,11 +240,6 @@ class Block:
} }
''' '''
@op
class Borrow(Binop):
"""Returns the borrow bit from and implied subtractions of its 2 operands"""
flags = []
@op @op
class Bound: class Bound:
"""Performs a bounds-check: if lower <= index < upper then return index, """Performs a bounds-check: if lower <= index < upper then return index,
...@@ -333,12 +328,6 @@ class Call: ...@@ -333,12 +328,6 @@ class Call:
assert((get_unknown_type() == type) || is_Method_type(type)); assert((get_unknown_type() == type) || is_Method_type(type));
''' '''
@op
class Carry(Binop):
"""Computes the value of the carry-bit that would result when adding the 2
operands"""
flags = [ "commutative" ]
@op @op
class Cast(Unop): class Cast(Unop):
"""perform a high-level type cast""" """perform a high-level type cast"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment