anna added a comment.

> Can you capture the values of EAX, EBX, ECX, and EDX after the two calls to 
> getX86CpuIDAndInfoEx that have 0x7 as the first argument? Maybe there's a bug 
> in CPUID on Sandy Bridge.

Sure, on the original code before the patch you suggested right?
The two calls are:

   bool HasLeaf7 =
          MaxLevel >= 7 && !getX86CpuIDAndInfoEx(0x7, 0x0, &EAX, &EBX, &ECX, 
&EDX);
  +   llvm::errs() << "Before setting fsgsbase the value for EAX: " << EAX
  +                     << " EBX: " << EBX << " ECX: " << ECX << "  EDX: " << 
EDX
  +                     << "\n";
    
      Features["fsgsbase"]   = HasLeaf7 && ((EBX >>  0) & 1);
  ....
  bool HasLeaf7Subleaf1 =
          MaxLevel >= 7 && !getX86CpuIDAndInfoEx(0x7, 0x1, &EAX, &EBX, &ECX, 
&EDX);
  +   llvm::errs() << "Before setting sha512 the value for EAX: " << EAX
  +                     << " EBX: " << EBX << " ECX: " << ECX << "  EDX: " << 
EDX
  +                     << "\n";
      Features["sha512"]     = HasLeaf7Subleaf1 && ((EAX >> 0) & 1);
  ...
  we set avxvnniint16 after this

Takes a while to get a build on this machine, should have the output soon.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155145/new/

https://reviews.llvm.org/D155145

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to