Commit 731e9399 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ia32: Do not ignore the floating point control word anymore and make it callee-save.

This corrects handling in bestate (non-ignore).
beabi attaches the fpcw to Start/Return due to being callee-save.
This was accidently done before due to being ignored.
parent 6f965967
......@@ -1942,6 +1942,7 @@ static int ia32_register_saved_by(const arch_register_t *reg, int callee)
case REG_EBP:
case REG_ESI:
case REG_EDI:
case REG_FPCW:
return callee;
case REG_EAX:
......
......@@ -58,7 +58,7 @@ $mode_fpcw = "ia32_mode_fpcw";
{ mode => $mode_fp87 }
],
fp_cw => [ # the floating point control word
{ name => "fpcw", dwarf => 37, type => "ignore | state" },
{ name => "fpcw", dwarf => 37, type => "state" },
{ mode => $mode_fpcw, flags => "manual_ra | state" }
],
flags => [
......@@ -1083,7 +1083,7 @@ ChangeCW => {
state => "pinned",
op_flags => [ "constlike" ],
irn_flags => [ "not_scheduled" ],
reg_req => { out => [ "fpcw:I" ] },
reg_req => { out => [ "fpcw" ] },
mode => $mode_fpcw,
latency => 3,
units => [ "GP" ],
......@@ -1093,7 +1093,7 @@ ChangeCW => {
FldCW => {
op_flags => [ "uses_memory" ],
state => "pinned",
reg_req => { in => [ "gp", "gp", "none" ], out => [ "fpcw:I" ] },
reg_req => { in => [ "gp", "gp", "none" ], out => [ "fpcw" ] },
ins => [ "base", "index", "mem" ],
latency => 5,
emit => "fldcw %AM",
......@@ -1377,7 +1377,7 @@ Call => {
state => "exc_pinned",
reg_req => {
in => [ "gp", "gp", "none", "gp", "esp", "fpcw", "eax", "ecx", "edx" ],
out => [ "esp:I|S", "fpcw:I", "none", "eax", "ecx", "edx", "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "none", "none" ]
out => [ "esp:I|S", "fpcw", "none", "eax", "ecx", "edx", "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "none", "none" ]
},
ins => [ "base", "index", "mem", "addr", "stack", "fpcw", "eax", "ecx", "edx" ],
outs => [ "stack", "fpcw", "M", "eax", "ecx", "edx", "st0", "st1", "st2", "st3", "st4", "st5", "st6", "st7", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "X_regular", "X_except" ],
......
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