This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Check if xsave is enabled by OS before calling xgetbv in XmmYmmStateSupport#8939
Merged
Check if xsave is enabled by OS before calling xgetbv in XmmYmmStateSupport#8939
Conversation
janvorli
reviewed
Jan 13, 2017
| : "eax", "edx" /* registers that are clobbered*/ | ||
| __asm(" mov $1, %%eax\n" \ | ||
| " cpuid\n" \ | ||
| " and $0x18000000, %%ecx\n" /* check for xsave feature set and that it is enabled by the OS */ \ |
Member
There was a problem hiding this comment.
A nit - if you do xor %%eax, %%eax right after the cpuid and at line 61 do jne end, you can get rid of the jmp and xor after xgetbv.
…upport. Fix #8903
8e70605 to
0c92960
Compare
Author
|
Updated. |
manofstick
pushed a commit
to manofstick/coreclr
that referenced
this pull request
Jan 16, 2017
…upport (dotnet#8939) * Check if xsave is enabled by OS before calling xgetbv in XmmYmmStateSupport. Fix #8903 * Add ebx to clobbered registers.
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
…upport (dotnet/coreclr#8939) * Check if xsave is enabled by OS before calling xgetbv in XmmYmmStateSupport. Fix dotnet/coreclr#8903 * Add ebx to clobbered registers. Commit migrated from dotnet/coreclr@590ff45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#8903
It appears that OS X does not enable
xsaveon older processors (such as the Core 2 Duo in my late 2010 Macbook Air), leading to the process being killed withSIGILLwhenXmmYmmStateSupportgets called.This is also causing failures on Travis test runs on OS X for Kestrel (e.g. https://travis-ci.org/aspnet/KestrelHttpServer/jobs/191433640#L1195).
@janvorli