-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify instruction set definition #33730
Changes from 1 commit
6952c06
4f14632
be186f9
26a9810
6a65d97
c799dc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2883,9 +2883,7 @@ private uint getJitFlags(ref CORJIT_FLAGS flags, uint sizeInBytes) | |
else if (targetArchitecture == TargetArchitecture.X64) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could combine the x86 and x64 codepaths and just add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no guarantee that the X86 and X64 variants actually use the same constants. (It so happens they do at the moment, but that is one of the few actually negative consequences of this change, which is that the constants could become out of sync.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is unfortunate, as it means we have a lot of duplicated code between the two of them (and that will likely grow over time). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That does seem unfortunate. Does it really add a lot of complexity to share them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, it would be quite a bit of complexity, as the generator is pretty dumb. Mind you, the followon work is expected to delete this (the only logic which adds this duplication of effort) in favor of some string handling which will make all of this unified again. I hope to put together that PR by end of week, assuming I can get this in tonight or tomorrow morning, so I don't see much value in investing in a bit of code that should only live for about 48-96 hours before beginning active replacement. |
||
{ | ||
flags.Set(InstructionSet.X64_SSE); | ||
flags.Set(InstructionSet.X64_SSE_X64); | ||
flags.Set(InstructionSet.X64_SSE2); | ||
flags.Set(InstructionSet.X64_SSE2_X64); | ||
#if !READYTORUN | ||
// This list needs to match the list of intrinsics we can generate detection code for | ||
// in HardwareIntrinsicHelpers.EmitIsSupportedIL. | ||
|
@@ -2901,14 +2899,10 @@ private uint getJitFlags(ref CORJIT_FLAGS flags, uint sizeInBytes) | |
flags.Set(InstructionSet.X64_SSE3); | ||
flags.Set(InstructionSet.X64_SSSE3); | ||
flags.Set(InstructionSet.X64_LZCNT); | ||
flags.Set(InstructionSet.X64_LZCNT_X64); | ||
#if READYTORUN | ||
flags.Set(InstructionSet.X64_SSE41); | ||
flags.Set(InstructionSet.X64_SSE41_X64); | ||
flags.Set(InstructionSet.X64_SSE42); | ||
flags.Set(InstructionSet.X64_SSE42_X64); | ||
flags.Set(InstructionSet.X64_POPCNT); | ||
flags.Set(InstructionSet.X64_POPCNT_X64); | ||
#endif | ||
} | ||
} | ||
|
@@ -2918,6 +2912,8 @@ private uint getJitFlags(ref CORJIT_FLAGS flags, uint sizeInBytes) | |
flags.Set(InstructionSet.ARM64_AdvSimd); | ||
} | ||
|
||
flags.Set64BitInstructionSetVariants(targetArchitecture); | ||
|
||
if (this.MethodBeingCompiled.IsNativeCallable) | ||
{ | ||
#if READYTORUN | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just confirming, this is meant to be empty and isn't a bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, having the generator skip if empty or leave a comment if empty might be more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.