[Issue 6042] New: registers not preserved across method call
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 21 05:40:56 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6042
Summary: registers not preserved across method call
Product: D
Version: D2
Platform: x86_64
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: dawg at dawgfoto.de
--- Comment #0 from dawg at dawgfoto.de 2011-05-21 05:36:44 PDT ---
void destroysXMM1(float a, float b) {
}
void assertSame(float a, float b) {
assert(a == b);
}
class Bug {
@property float xval() const {
destroysXMM1(0.0f, 0.0f);
return 2.0f;
}
void show() {
assertSame(xval, xval);
}
}
void main() {
auto bug = new Bug();
bug.show();
}
----
This is the generated code.
mov 0xfffffffffffffff8(%rbp),%rdi
mov (%rdi),%rax
rex64 callq *0x30(%rax)
movsd %xmm0,0xfffffffffffffff0(%rbp)
movsd 0xfffffffffffffff0(%rbp),%xmm1
mov 0xfffffffffffffff8(%rbp),%rdi
mov (%rdi),%rcx
rex64 callq *0x30(%rcx)
callq 40162c <_D3bug10assertSameFffZv>
The return value of the first parameter evaluation is moved to xmm1 before the
other parameter gets evaluated.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list