Cherry pick "Speculative fix for AVX2 detection"

In master since 2386:
https://codereview.chromium.org/1104213004

Crashes on non-avx2 processors point to possible misdetection.

Cherry pick https://chromium-review.googlesource.com/267345

x86_simd_caps: check max cpuid before testing AVX2

structured extended feature flags require eax = 7; avoids incorrectly
detecting avx2 on some older processors that support avx.

from [1]:
INPUT EAX = 0: Returns CPUID’s Highest Value for Basic Processor
Information and the Vendor Identification String

[1] http://www.intel.com/content/www/us/en/processors/processor-identification

BUG=480586

Review URL: https://codereview.chromium.org/1131963004
1 file changed