Closed Bug 977791 Opened 6 years ago Closed 6 years ago

_xgetbv() is supposed to be available in VS2010 SP1 but isn't

Categories

(Core :: WebRTC: Audio/Video, defect)

x86_64
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: jesup, Assigned: jesup)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Two things use _xgetbv() in our code: NSS with hardware AEC support turned on, and libyuv.  The test used for NSS is quite wrong (just checks if we're running on VS), but maybe the test for hardware AEC checks more; the test for libyuv has the same problem LLVM had -- it checks if VS2010 SP1 is installed, but apparently that doesn't guarantee _xgetbv is there.

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130422/172533.html

Currently, we appear to turn on Hardware AES only on Linux x64 and Solaris x64, not windows, so the _xgetbv() isn't getting hit.
Attached patch xgetbv_libyuvSplinter Review
Attachment #8383270 - Flags: review?(mh+mozilla)
Attached patch xgetbv_nss (obsolete) — Splinter Review
Attachment #8383272 - Flags: review?(brian)
Randell, please move the NSS patch to a separate bug in the NSS product, because we need to track it using the NSS release numbering system and for various other reasons. I will review it promptly and check it in for you.
Blocks: 977829
Comment on attachment 8383272 [details] [diff] [review]
xgetbv_nss

Split out a new bug to cover NSS.
Attachment #8383272 - Attachment is obsolete: true
Attachment #8383272 - Flags: review?(brian)
No longer blocks: 977829
Depends on: 977829
Attachment #8383270 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/effdc7a9ca5b

We'll need to upstream this to libyuv
Target Milestone: --- → mozilla30
https://hg.mozilla.org/mozilla-central/rev/effdc7a9ca5b
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Comment on attachment 8383270 [details] [diff] [review]
xgetbv_libyuv

Review of attachment 8383270 [details] [diff] [review]:
-----------------------------------------------------------------

::: media/libyuv/source/cpu_id.cc
@@ +100,4 @@
>  #elif defined(_M_IX86)
>    __asm {
>      xor        ecx, ecx    // xcr 0
>      _asm _emit 0x0f _asm _emit 0x01 _asm _emit 0xd0  // For VS2010 and earlier.

In Visual C++ 2008, I can use "xgetbv" in inline assembly.
It is not necessary to emit the opcode.
No longer blocks: webrtc_upstream_bugs
You need to log in before you can comment on or make changes to this bug.