[Issue 11155] New: Wrong SIMD code generated (unaligned movaps)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 1 16:08:04 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11155

           Summary: Wrong SIMD code generated (unaligned movaps)
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: jerro.public at gmail.com


--- Comment #0 from jerro.public at gmail.com 2013-10-01 16:08:03 PDT ---
The following code causes a segfault when compiled with dmd v2.063.2 without
any 
flags:

import core.simd;

void store(float4* p, float4 a) { *p = a; }

void main()
{
    float4 a, b;
    store(&a, b);
}

Disassembly of store():

push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps %xmm0,-0x18(%rbp)
movaps -0x18(%rbp),%xmm1
movaps %xmm1,(%rdi)
leaveq 
retq   

The segfault happens at the first movaps. The value in rbp is aligned to 16
bytes, so rbp - 0x18 is not.

-- 
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