[Issue 6166] New: Named return value optimization not dealt with in inline assembler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 16 14:28:41 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6166
Summary: Named return value optimization not dealt with in
inline assembler
Product: D
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bugzilla at digitalmars.com
--- Comment #0 from Walter Bright <bugzilla at digitalmars.com> 2011-06-16 14:24:00 PDT ---
Byron writes:
I reduced the complexity of the problem, seems to be SSE and returning local
copies.
$ dmd -run db.d
v: [1, 2, 3, 4]
test1 r: [nan, nan, nan, nan]
test1: [nan, nan, nan, nan]
test2 r: [1, 2, 3, 4]
test2: [1, 2, 3, 4]
halle109-251:asm byro
//db.d
import std.stdio;
alias float[4] vector;
const(vector) test1( ref const(vector) v )
{
vector r;
asm
{
mov EAX, v;
movups XMM0, [EAX];
movups r, XMM0;
}
writeln( "test1 r: ", r );
return r;
}
const(vector) test2( ref const(vector) v )
{
vector r, s;
asm
{
mov EAX, v;
movups XMM0, [EAX];
movups r, XMM0;
}
writeln( "test2 r: ", r );
s = r;
return s;
}
void main()
{
vector v = [1,2,3,4];
writeln( "v: ", v );
writeln( "test1: ", test1(v));
writeln( "test2: ", test2(v));
}
--
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