Skip to content

Commit

Permalink
Merge pull request #6266 from WalterBright/fix16679
Browse files Browse the repository at this point in the history
fix Issue 16679 - prefetch on old pentium d results in an illegal ins…
  • Loading branch information
yebblies authored Nov 20, 2016
2 parents ca488df + a5bffa8 commit f5a73f3
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions test/runnable/testxmm.d
Original file line number Diff line number Diff line change
Expand Up @@ -1460,14 +1460,22 @@ ubyte16 test11585(ubyte16* d)

int fooprefetch(byte a)
{
prefetch!(false, 0)(&a);
prefetch!(false, 1)(&a);
prefetch!(false, 2)(&a);
prefetch!(false, 3)(&a);
prefetch!(true, 0)(&a);
prefetch!(true, 1)(&a);
prefetch!(true, 2)(&a);
prefetch!(true, 3)(&a);
/* These should be run only if the CPUID PRFCHW
* bit 0 of cpuid.{EAX = 7, ECX = 0}.ECX
* Unfortunately, that bit isn't yet set by core.cpuid
* so disable for the moment.
*/
version (none)
{
prefetch!(false, 0)(&a);
prefetch!(false, 1)(&a);
prefetch!(false, 2)(&a);
prefetch!(false, 3)(&a);
prefetch!(true, 0)(&a);
prefetch!(true, 1)(&a);
prefetch!(true, 2)(&a);
prefetch!(true, 3)(&a);
}
return 3;
}

Expand Down

0 comments on commit f5a73f3

Please sign in to comment.