New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 660673 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Support popcnt in pnacl

Project Member Reported by ilevy@chromium.org, Oct 29 2016

Issue description

I'm working on a pnacl app that uses popcnt (stockfish).

While pnacl-translate can produce code with the popcnt instruction if passed -mattr=+popcnt, I don't see it in the binary generated by chrome. It like popcnt support was never added -- was there a reason or just oversight?


components/nacl/renderer/platform_info.cc
  // On x86, SSE features are ordered: the most recent one implies the
  // others. Care is taken here to only specify the latest SSE version,
  // whereas non-SSE features don't follow this model: POPCNT is
  // effectively always implied by SSE4.2 but has to be specified
  // separately.
  //
  // TODO: AVX2, AVX, SSE 4.2.
  if (cpu.has_sse41()) features.push_back("+sse4.1");
  // TODO: SSE 4A, SSE 4.
  else if (cpu.has_ssse3()) features.push_back("+ssse3");
  // TODO: SSE 3
  else if (cpu.has_sse2()) features.push_back("+sse2");

  // TODO: AES, POPCNT, LZCNT, ...
  return base::JoinString(features, ",");

 

Comment 3 by ilevy@chromium.org, Oct 30 2016

Owner: ilevy@chromium.org
Status: Verified (was: Untriaged)
Verified popcnt instructions are now being produced from ctpop intermediate.

Probably worth tracking other cpu feature flags.

Sign in to add a comment