Uh oh!
There was an error while loading. Please reload this page.
[RISC-V] Added designated output instruction emitters - #96741
Conversation
This reverts commit c238b82.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| // This assert may be triggered by the untrimmed signed integers. Please refer to the TrimSigned helpers | ||
| assertCodeLength(imm21, 21); |
There was a problem hiding this comment.
Maybe this should call TrimSigned instead? These helpers assert isValidSimm anyway.
There was a problem hiding this comment.
On this stage imm is unsigned since the sign extension has to be removed at this stage (explicitly done via TrimSigned functions or via LowerNBits etc.). This means that I should use isValidUimm or assertCodeLength and I think that the latter one is more versatile.
| static ssize_t LowerNBitsOfWord(ssize_t word) | ||
| { | ||
| BYTE* const dst = *dp; | ||
| BYTE* dstRW = *dp + writeableOffset; | ||
| BYTE* dstRW2 = dstRW + 4; // addr for updating gc info if needed. | ||
| const BYTE* const odstRW = dstRW; | ||
| const BYTE* const odst = *dp; | ||
| code_t code = 0; | ||
| instruction ins; | ||
| size_t sz; // = emitSizeOfInsDsc(id); | ||
| static_assert(MaskSize < 32, "Given mask size is bigger than the word itself"); | ||
| static_assert(MaskSize > 0, "Given mask size cannot be zero"); | ||
| assert(REG_NA == (int)REG_NA); | ||
| static constexpr size_t kMask = NBitMask(MaskSize); | ||
| insOpts insOp = id->idInsOpt(); | ||
| return word & kMask; | ||
| } |
There was a problem hiding this comment.
Isn't it strange that MaskSize can only be up to 32 when the word is a 64 bit value?
…dotnet#96741)"" This reverts commit ecc044d.
* [RISC-V] Fix mistakes in emitter * Revert "[RISC-V] Added designated output instruction emitters (#96741)" This reverts commit 77fd98c. * Revert "Revert "[RISC-V] Added designated output instruction emitters (#96741)"" This reverts commit ecc044d. * [RISC-V] Sync emitOutputIns with the latest ref branch * [RISC-V] Formatted code * [RISC-V] Fixes * [RISC-V] Fixed sign cast in assert code len * [RISC-V] Readed assert * [RISC-V] Fixed fence sanity check and removed fence_i --------- Co-authored-by: Dong-Heon Jung <clamp03@gmail.com>
IMPORTANT: Before this PR could be merge, it requires changes from #96136This PR:
emitOutputInstrfunction in order to use a newly added emittersThis PR is a part of a larger scope of work aiming to move all output instruction emission to the
emitOutputInstrfrom theemitIns_*functionsPart of #84834
cc @wscho77@HJLeee@clamp03@JongHeonChoi@t-mustafin@gbalykov@viewizard@ashaurtaev@brucehoult@sirntar@yurai007@tomeksowi