Commit 4c873683 authored by Matthias Braun's avatar Matthias Braun
Browse files

ia32: fix wrong/missing ls_mode on float nodes

This should fix 175.vpr
parent 5d79ee1d
......@@ -1814,6 +1814,7 @@ fabs => {
reg_req => { in => [ "fp"], out => [ "fp" ] },
ins => [ "value" ],
emit => 'fabs',
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 2,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......@@ -1822,8 +1823,9 @@ fabs => {
fchs => {
irn_flags => [ "rematerializable" ],
reg_req => { in => [ "fp"], out => [ "fp" ] },
emit => 'fchs',
ins => [ "value" ],
emit => 'fchs',
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 2,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......@@ -1900,6 +1902,7 @@ fldz => {
reg_req => { out => [ "fp" ] },
outs => [ "res" ],
emit => 'fldz',
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 4,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......@@ -1910,6 +1913,7 @@ fld1 => {
reg_req => { out => [ "fp" ] },
outs => [ "res" ],
emit => 'fld1',
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 4,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......@@ -1920,6 +1924,7 @@ fldpi => {
reg_req => { out => [ "fp" ] },
outs => [ "res" ],
emit => 'fldpi',
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 4,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......@@ -1930,6 +1935,7 @@ fldln2 => {
reg_req => { out => [ "fp" ] },
outs => [ "res" ],
emit => 'fldln2',
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 4,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......@@ -1940,6 +1946,7 @@ fldlg2 => {
reg_req => { out => [ "fp" ] },
emit => 'fldlg2',
outs => [ "res" ],
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 4,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......@@ -1950,6 +1957,7 @@ fldl2t => {
reg_req => { out => [ "fp" ] },
emit => 'fldll2t',
outs => [ "res" ],
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 4,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......@@ -1960,6 +1968,7 @@ fldl2e => {
reg_req => { out => [ "fp" ] },
emit => 'fldl2e',
outs => [ "res" ],
init_attr => "attr->attr.ls_mode = ia32_mode_E;",
latency => 4,
mode => $mode_fp87,
attr_type => "ia32_x87_attr_t",
......
......@@ -269,11 +269,9 @@ static ir_node *gen_Const(ir_node *node)
if (tarval_is_null(tv)) {
load = new_bd_ia32_fldz(dbgi, block);
res = load;
set_ia32_ls_mode(load, mode);
} else if (tarval_is_one(tv)) {
load = new_bd_ia32_fld1(dbgi, block);
res = load;
set_ia32_ls_mode(load, mode);
} else {
ir_mode *ls_mode;
ir_node *base;
......@@ -1090,6 +1088,8 @@ static ir_node *gen_binop_x87_float(ir_node *node, ir_node *op1, ir_node *op2,
new_block = be_transform_node(block);
new_node = func(dbgi, new_block, addr->base, addr->index, addr->mem,
am.new_op1, am.new_op2, get_fpcw());
if (am.op_type == ia32_Normal)
am.ls_mode = ia32_mode_E;
set_am_attributes(new_node, &am);
attr = get_ia32_x87_attr(new_node);
......
Supports Markdown
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