AArch64: Missing instructions: asr, csel_xzr_ne, cmp_xzr#444
Open
willieyz wants to merge 3 commits into
Open
Conversation
This commit add the asr (register) and asr (immediate)instruction support the a55, a72 model. According to A64 Base Instruction Descriptions, page C6-1820 and page C6-1822, these two instructions are the aliases of: asr (register) ---> ASRV, asr (immediate) ---> SBFM, - a55 SWOG ASRV(page: 19/48) - latency: 1 - Inverse throughput: 2/1 = 2 - ExecutionUnit: SCALAR (ALU0, ALU1) - a55 SWOG SBFM (page: 21/48) - latency: 2 - Inverse throughput: 2/2 = 1 - ExecutionUnit: SCALAR (ALU0, ALU1) - a72 SWOG ASRV (page: 9/42) - latency: 1 - Inverse throughput: 2/2 = 1 - ExecutionUnit: INT (INT0, INT1) - a72 SWOG SBFM (page: 12/42) - latency: 1 - Inverse throughput: 2/2 = 1 - ExecutionUnit: INT (INT0, INT1) - This commit also refactor the existed asr_wform's latency, it should be 2 instead of 1.(reference from SBFM, since asr (immediate) is alias of SBFM) Signed-off-by: willieyz <willie.zhao@chelpis.com>
This commit adds support for the csel_xzr_ne instruction to the A55, A72 uArch model. This pattern is a variant of csel using the zero register xzr. This commit reuses the existing csel uArch model definition for the uArch model - a55 SWOG CSEL(page: 18/48) - latency: 1 - Inverse throughput: 2/2 = 1 - ExecutionUnit: SCALAR (ALU0, ALU1) - a72 SWOG CSEL(page: 8/42) - latency: 1 - Inverse throughput: 2/2 = 1 - ExecutionUnit: INT (INT0, INT1) Signed-off-by: willieyz <willie.zhao@chelpis.com>
172c4ce to
6a6aac3
Compare
This commit adds support for the `cmp_xzr` instruction to the A55, A72 uArch model. This pattern is a variant of cmp using the zero register xzr. This commit reuses the existing cmp uArch model definition for the uArch model, and cmp (shift register) is alias of SUBS(according to page C6-1953 of Aarch64 Base Instruction Descriptions), so we reference the SUBS to model this instruction. - a55 SWOG SUBS(page: 18/48) - latency: 2 - Inverse throughput: 2/2 = 1 - ExecutionUnit: SCALAR (ALU0, ALU1) - a72 SWOG SUBS(page: 8/48) - latency: 2 - Inverse throughput: 1/1 = 1 - ExecutionUnit: MINT(M) Signed-off-by: willieyz <willie.zhao@chelpis.com>
6a6aac3 to
ee10676
Compare
Collaborator
|
Hi @willieyz, Thanks for the changes! the PR says: I think the former should be correct and is also what the code reflects. Could you, for the sake of consistency, update the description if you agree with me on this one? Amin |
Collaborator
Author
|
Hello @dop-amin, Thank you very much for the review, I really appreciate it. Yes, I totally agree with you. The PR description is inconsistent and should align with the commit message. Willie |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR add following instructions:
to support aarch64, and uArch model a55/a72.
asr(register) and asr(immediate)
According to A64 Base Instruction Descriptions, page C6-1820 and
page C6-1822, these two instructions are the aliases of:
asr (register) ---> ASRV,
asr (immediate) ---> SBFM,
a55 SWOG ASRV(page: 19/48)
a55 SWOG SBFM (page: 21/48)
a72 SWOG ASRV (page: 9/42)
a72 SWOG SBFM (page: 12/42)
csel_xzr_ne
This pattern is a variant of csel using the zero register xzr.
This commit reuses the existing csel uArch model definition for the
uArch model
a55 SWOG CSEL(page: 18/48)
a72 SWOG CSEL(page: 8/42)
cmp_xzr
This pattern is a variant of cmp using the zero register xzr.
This commit reuses the existing cmp uArch model definition for the
uArch model, and cmp is alias of SUBS, so we reference the SUBS to
model this instruction.
a55 SWOG SUBS(page: 18/48)
a72 SWOG SUBS(page: 8/48)