Bug 16679 – prefetch on old pentium d results in an illegal instruction

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-11-10T23:15:00Z
Last change time
2017-01-16T23:25:09Z
Keywords
SIMD
Assigned to
bugzilla
Creator
braddr
See also
https://issues.dlang.org/show_bug.cgi?id=16704

Comments

Comment #0 by braddr — 2016-11-10T23:15:58Z
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/generated/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.
Comment #1 by braddr — 2016-11-11T00:45:18Z
The exact commits across the three repositories I've used, the druntime and phobos commits could likely be a range of valid enough points, but these are what I used. dmd passes: 9a935f68feb360f78ef32913053ce05c838fcafe dmd fails: 0fc8be57bb0107a718ac2dabd1b5482c1ebe89ef druntime: 565b5c3163ae93858702daab9bccfcd7a4d3f748 phobos: 30aca423cdd6d7943bb1dde45f526a6078a024ae Chances are that this is largely due to the age of the cpu given that all the other systems running test builds are passing. This machine is old-farm-1, part of the fleet of auto test machines, but I've had it offline for a while for unrelated reasons. Unfortunate timing. I can't add it back with the test failing.
Comment #2 by bugzilla — 2016-11-20T08:02:57Z
Comment #3 by github-bugzilla — 2016-11-20T08:51:20Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a5bffa8b35bb519ca7a5cd41fee86f541a1c2e76 fix Issue 16679 - prefetch on old pentium d results in an illegal instruction https://github.com/dlang/dmd/commit/f5a73f36360fc5b2b2e93f2dd17082c4fed2b0bc Merge pull request #6266 from WalterBright/fix16679 fix Issue 16679 - prefetch on old pentium d results in an illegal ins…
Comment #4 by braddr — 2016-11-20T11:33:37Z
Reopened and lowered to major from regression until the cpuid work is done and the test is re-enabled. I would have suggested waiting for the right fix rather than the quick fix, but in neither case should we loose track of the disabled test.
Comment #5 by bugzilla — 2016-11-21T22:09:08Z
(In reply to Brad Roberts from comment #4) > Reopened and lowered to major from regression until the cpuid work is done > and the test is re-enabled. I would have suggested waiting for the right > fix rather than the quick fix, but in neither case should we loose track of > the disabled test. This is already covered by https://issues.dlang.org/show_bug.cgi?id=16704
Comment #6 by github-bugzilla — 2016-12-27T14:41:14Z
Commits pushed to scope at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a5bffa8b35bb519ca7a5cd41fee86f541a1c2e76 fix Issue 16679 - prefetch on old pentium d results in an illegal instruction https://github.com/dlang/dmd/commit/f5a73f36360fc5b2b2e93f2dd17082c4fed2b0bc Merge pull request #6266 from WalterBright/fix16679
Comment #7 by github-bugzilla — 2017-01-16T23:25:09Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/a5bffa8b35bb519ca7a5cd41fee86f541a1c2e76 fix Issue 16679 - prefetch on old pentium d results in an illegal instruction https://github.com/dlang/dmd/commit/f5a73f36360fc5b2b2e93f2dd17082c4fed2b0bc Merge pull request #6266 from WalterBright/fix16679