Commit 10ff083c authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Remove the parameter produces_result from ia32_emit_binop(). It is only used for an assert.

[r15999]
parent 74b59b58
......@@ -384,7 +384,7 @@ void ia32_emit_source_register_or_immediate(const ir_node *node, int pos)
/**
* Emits registers and/or address mode of a binary operation.
*/
void ia32_emit_binop(const ir_node *node, int produces_result) {
void ia32_emit_binop(const ir_node *node) {
const ir_node *right_op = get_irn_n(node, n_ia32_binary_right);
const ir_mode *mode = get_ia32_ls_mode(node);
const arch_register_t *reg_left;
......@@ -407,8 +407,6 @@ void ia32_emit_binop(const ir_node *node, int produces_result) {
break;
case ia32_AddrModeS:
if(is_ia32_Immediate(right_op)) {
assert(!produces_result && "Source AM with Const must not produce result");
emit_ia32_Immediate(right_op);
be_emit_cstring(", ");
ia32_emit_am(node);
......
......@@ -44,7 +44,7 @@ void ia32_emit_xmm_mode_suffix(const ir_node *node);
void ia32_emit_xmm_mode_suffix_s(const ir_node *node);
void ia32_emit_extend_suffix(const ir_mode *mode);
void ia32_emit_cmp_suffix_node(const ir_node *node, int flags_pos);
void ia32_emit_binop(const ir_node *node, int produces_result);
void ia32_emit_binop(const ir_node *node);
void ia32_emit_am_or_dest_register(const ir_node *node, int pos);
void ia32_emit_unop(const ir_node *node, int pos);
void ia32_emit_am(const ir_node *node);
......
......@@ -232,8 +232,7 @@ $arch = "ia32";
unop5 => "${arch}_emit_unop(node, 5);",
DAM0 => "${arch}_emit_am_or_dest_register(node, 0);",
DAM1 => "${arch}_emit_am_or_dest_register(node, 1);",
binop => "${arch}_emit_binop(node, 1);",
binop_nores => "${arch}_emit_binop(node, 0);",
binop => "${arch}_emit_binop(node);",
x87_binop => "${arch}_emit_x87_binop(node);",
CMP0 => "${arch}_emit_cmp_suffix_node(node, 0);",
);
......@@ -936,7 +935,7 @@ Cmp => {
ins => [ "base", "index", "mem", "left", "right" ],
outs => [ "eflags" ],
am => "source,binary",
emit => '. cmp%M %binop_nores',
emit => '. cmp%M %binop',
attr => "int flipped, int cmp_unsigned",
init_attr => "attr->data.cmp_flipped = flipped;\n".
"\tattr->data.cmp_unsigned = cmp_unsigned;\n",
......@@ -952,7 +951,7 @@ Cmp8Bit => {
ins => [ "base", "index", "mem", "left", "right" ],
outs => [ "eflags" ],
am => "source,binary",
emit => '. cmpb %binop_nores',
emit => '. cmpb %binop',
attr => "int flipped, int cmp_unsigned",
init_attr => "attr->data.cmp_flipped = flipped;\n".
"\tattr->data.cmp_unsigned = cmp_unsigned;\n",
......@@ -968,7 +967,7 @@ Test => {
ins => [ "base", "index", "mem", "left", "right" ],
outs => [ "eflags" ],
am => "source,binary",
emit => '. test%M %binop_nores',
emit => '. test%M %binop',
attr => "int flipped, int cmp_unsigned",
init_attr => "attr->data.cmp_flipped = flipped;\n".
"\tattr->data.cmp_unsigned = cmp_unsigned;\n",
......@@ -984,7 +983,7 @@ Test8Bit => {
ins => [ "base", "index", "mem", "left", "right" ],
outs => [ "eflags" ],
am => "source,binary",
emit => '. testb %binop_nores',
emit => '. testb %binop',
attr => "int flipped, int cmp_unsigned",
init_attr => "attr->data.cmp_flipped = flipped;\n".
"\tattr->data.cmp_unsigned = cmp_unsigned;\n",
......@@ -1443,7 +1442,7 @@ Ucomi => {
am => "source,binary",
attr => "int flipped",
init_attr => "attr->data.cmp_flipped = flipped;",
emit => ' .ucomi%XXM %binop_nores',
emit => ' .ucomi%XXM %binop',
latency => 3,
units => [ "SSE" ],
mode => $mode_flags,
......
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