www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16679] New: prefetch on old pentium d results in an illegal

https://issues.dlang.org/show_bug.cgi?id=16679

          Issue ID: 16679
           Summary: prefetch on old pentium d results in an illegal
                    instruction
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: braddr puremagic.com

change 09e3fdd31d53fcb96a787a6a9de466a7c1f72ac1, pull request 6188

vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      : Intel(R) Pentium(R) D CPU 3.00GHz
stepping        : 4
microcode       : 0x6

Before that commit all tests pass.  With that change, testxmm fails.

 ... runnable/testxmm.d             (-inline -release -g -O -fPIC)
Test failed.  The logged output:
../src/dmd -conf= -m64 -Irunnable   -odgenerated/runnable
-ofgenerated/runnable/testxmm_0 runnable/testxmm.d
runnable/testxmm.d(1328): Deprecation: instead of C-style syntax, use D-style
syntax 'ubyte16[1] table'
generated/runnable/testxmm_0
Illegal instruction (core dumped)

==============================
Test failed: expected rc == 0, exited with rc == 132

(gdb) run
Starting program:
/home/braddr/sandbox/at-client/master-test-Linux_64_64/dmd/test/generate
/runnable/testxmm_0 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[2, 0, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 8, 0, 0, 0]

Program received signal SIGILL, Illegal instruction.
0x000000000041d454 in core.simd.prefetch!(true, 0u).prefetch(const(void)*) ()
(gdb) disass
Dump of assembler code for function
_D4core4simd21__T8prefetchVbi1Vhi0Z8prefetchFNaNbNiNfPxvZv:
   0x000000000041d448 <+0>:     push   %rbp
   0x000000000041d449 <+1>:     mov    %rsp,%rbp
   0x000000000041d44c <+4>:     sub    $0x10,%rsp
   0x000000000041d450 <+8>:     mov    %rdi,-0x8(%rbp)
=> 0x000000000041d454 <+12>:    rex.W prefetchw -0x8(%rbp)
   0x000000000041d459 <+17>:    leaveq 
   0x000000000041d45a <+18>:    retq   
End of assembler dump.

--
Nov 10 2016