Bug 6270 – XMMREGS not preserved on indirect function call
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
FreeBSD
Creation time
2011-07-08T13:56:00Z
Last change time
2011-08-28T08:40:42Z
Keywords
patch, wrong-code
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2011-07-08T13:56:34Z
class XMMPainter
{
float call()
{
return sumFloats(0.0f, 0.0f);
}
static float sumFloats(float a, float b)
{
return a + b;
}
}
void testXMM()
{
auto painter = new XMMPainter;
assert(XMMPainter.sumFloats(20, painter.call()) == 20.0f);
}
---
The expression painter.call() is evaluated after 20 has been loaded into xmm1, but the register is not saved.