This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Updating emitInsCanOnlyWriteSSE2OrAVXReg to cover some of the newer instructions. #19141
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1259,15 +1259,43 @@ bool emitter::emitInsCanOnlyWriteSSE2OrAVXReg(instrDesc* id) | |
| { | ||
| instruction ins = id->idIns(); | ||
|
|
||
| // The following SSE2 instructions write to a general purpose integer register. | ||
| if (!IsSSEOrAVXInstruction(ins) || ins == INS_mov_xmm2i || ins == INS_cvttsd2si || ins == INS_cvttss2si || | ||
| ins == INS_cvtsd2si || ins == INS_cvtss2si || ins == INS_pmovmskb || ins == INS_pextrw || ins == INS_pextrb || | ||
| ins == INS_pextrd || ins == INS_pextrq || ins == INS_extractps) | ||
| if (!IsSSEOrAVXInstruction(ins)) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| return true; | ||
| switch (ins) | ||
| { | ||
| case INS_andn: | ||
| case INS_blsi: | ||
| case INS_blsmsk: | ||
| case INS_blsr: | ||
| case INS_cvttsd2si: | ||
| case INS_cvttss2si: | ||
| case INS_cvtsd2si: | ||
| case INS_cvtss2si: | ||
| case INS_extractps: | ||
| case INS_mov_xmm2i: | ||
| case INS_movmskpd: | ||
| case INS_movmskps: | ||
| case INS_pdep: | ||
| case INS_pext: | ||
| case INS_pmovmskb: | ||
| case INS_pextrb: | ||
| case INS_pextrd: | ||
| case INS_pextrq: | ||
| case INS_pextrw: | ||
| case INS_pextrw_sse41: | ||
| { | ||
| // These SSE instructions write to a general purpose integer register. | ||
| return false; | ||
| } | ||
|
|
||
| default: | ||
| { | ||
| return true; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| /***************************************************************************** | ||
|
|
@@ -10099,6 +10127,8 @@ BYTE* emitter::emitOutputAM(BYTE* dst, instrDesc* id, code_t code, CnsVal* addc) | |
| switch (id->idInsFmt()) | ||
| { | ||
| case IF_RWR_ARD: | ||
| case IF_RRW_ARD: | ||
| case IF_RWR_RRD_ARD: | ||
|
Member
Author
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. I wasn't actually getting GCStress failures for the Anyone know if there is something I'm missing here?
Member
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. You may just be getting (un)lucky, as the written registers won't always contain GC refs. |
||
| emitGCregDeadUpd(id->idReg1(), dst); | ||
| break; | ||
| default: | ||
|
|
@@ -10522,6 +10552,7 @@ BYTE* emitter::emitOutputSV(BYTE* dst, instrDesc* id, code_t code, CnsVal* addc) | |
| { | ||
| case IF_RWR_SRD: // Register Write, Stack Read | ||
| case IF_RRW_SRD: // Register Read/Write, Stack Read | ||
| case IF_RWR_RRD_SRD: | ||
| emitGCregDeadUpd(id->idReg1(), dst); | ||
| break; | ||
| default: | ||
|
|
@@ -10971,6 +11002,8 @@ BYTE* emitter::emitOutputCV(BYTE* dst, instrDesc* id, code_t code, CnsVal* addc) | |
| switch (id->idInsFmt()) | ||
| { | ||
| case IF_RWR_MRD: | ||
| case IF_RRW_MRD: | ||
| case IF_RWR_RRD_MRD: | ||
| emitGCregDeadUpd(id->idReg1(), dst); | ||
| break; | ||
| default: | ||
|
|
@@ -11546,6 +11579,7 @@ BYTE* emitter::emitOutputRR(BYTE* dst, instrDesc* id) | |
|
|
||
| case IF_RWR_RRD: | ||
| case IF_RRW_RRD: | ||
| case IF_RWR_RRD_RRD: | ||
| // INS_movxmm2i writes to reg2. | ||
| if (ins == INS_mov_xmm2i) | ||
| { | ||
|
|
||
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.
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.
New entries are: