This repository was archived by the owner on Jan 23, 2023. It is now read-only.
ARM64: Switch Expansion Using Jump Table#4919
Merged
Merged
Conversation
Author
|
@dotnet-bot test Windows_NT arm64 Checked |
Author
|
Since #4896 is not reviewed yet, I integrate both commits here. Please review the latter part in this PR. |
Author
|
@dotnet-bot test Windows_NT arm64 Release |
| case IF_LARGELDC: | ||
| if (isVectorRegister(idReg1())) | ||
| { | ||
| // adrp + ldr + fmov |
There was a problem hiding this comment.
should this comment read:
// adrp + add + fmov
Author
Author
|
The test failure seems Jenkin's issue since the actual test results are all passed in cloud storage. |
| case INS_strb: | ||
| case INS_strh: | ||
| emitIns_R_R_R_Ext(ins, attr, reg1, reg2, reg3); | ||
| emitIns_R_R_R_Ext(ins, attr, reg1, reg2, reg3, opt); |
|
Looks Good |
Author
|
@dotnet-bot test Windows_NT arm64 Checked |
Fixes #3332 To validate various addressing in dotnet#4896, I just enable this. Previously, we only allow a load operation to JIT data (`ldr` or `IF_LARGELDC`). For switch expansion, jump table is also recorded into JIT data. In this case, we only get the address of jump table head, and load the right entry after computing offset. So, basically `adr` or `IF_LARGEADR` is used to not only load label within code but also refer to the location of JIT data. The typical code sequence for switch expansion is like this: ``` adr x8, [@rwd00] // load address of jump table head ldr w8, [x8, x0, LSL dotnet#2] // load jump entry from table addr + x0 * 4 adr x9, [G_M56320_IG02] // load address of current baisc block add x8, x8, x9 // Add them to compute the final target br x8 // Indirectly jump to the target ```
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
ARM64: Switch Expansion Using Jump Table Commit migrated from dotnet/coreclr@6d550d7
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.
Fixes #3332
To validate various addressing in #4896, I just enable this.
Previously, we only allow a load operation to JIT data (
ldrorIF_LARGELDC).For switch expansion, jump table is also recorded into JIT data.
In this case, we only get the address of jump table head, and
load the right entry after computing offset. So, basically
adrorIF_LARGEADRis used to not only load label within code but also refer tothe location of JIT data.
The typical code sequence for switch expansion is like this: