-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[RISCV] Add Qualcomm uC Xqcia (Arithmetic) extension #118113
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
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
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
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
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
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
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
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
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
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
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
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 |
|---|---|---|
| @@ -0,0 +1,201 @@ | ||
| # Xqcia - Qualcomm uC Arithmetic Extension | ||
| # RUN: not llvm-mc -triple riscv32 -mattr=+experimental-xqcia < %s 2>&1 \ | ||
| # RUN: | FileCheck -check-prefixes=CHECK,CHECK-PLUS %s | ||
| # RUN: not llvm-mc -triple riscv32 -mattr=-experimental-xqcia < %s 2>&1 \ | ||
| # RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS %s | ||
|
|
||
| # CHECK: :[[@LINE+1]]:20: error: invalid operand for instruction | ||
| qc.slasat x10, x3, 17 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.slasat x10, x3 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction | ||
| qc.slasat x0, x3, x17 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction | ||
| qc.slasat x10, x0, x17 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:20: error: invalid operand for instruction | ||
| qc.slasat x10, x3, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.slasat x10, x3, x17 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction | ||
| qc.sllsat x23, x25, 27 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.sllsat x23, x25 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction | ||
| qc.sllsat x0, x25, x27 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction | ||
| qc.sllsat x23, x0, x27 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction | ||
| qc.sllsat x23, x25, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.sllsat x23, x25, x27 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction | ||
| qc.addsat x17, x14, 7 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.addsat x17, x14 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction | ||
| qc.addsat x0, x14, x7 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction | ||
| qc.addsat x17, x0, x7 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction | ||
| qc.addsat x17, x14, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.addsat x17, x14, x7 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction | ||
| qc.addusat x8, x18, 28 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.addusat x8, x18 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:12: error: invalid operand for instruction | ||
| qc.addusat x0, x18, x28 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction | ||
| qc.addusat x8, x0, x28 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction | ||
| qc.addusat x8, x18, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.addusat x8, x18, x28 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:20: error: invalid operand for instruction | ||
| qc.subsat x22, x2, 12 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.subsat x22, x2 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction | ||
| qc.subsat x0, x2, x12 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction | ||
| qc.subsat x22, x0, x12 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:20: error: invalid operand for instruction | ||
| qc.subsat x22, x2, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.subsat x22, x2, x12 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction | ||
| qc.subusat x9, x14, 17 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.subusat x9, x14 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:12: error: invalid operand for instruction | ||
| qc.subusat x0, x14, x17 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction | ||
| qc.subusat x9, x0, x17 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:21: error: invalid operand for instruction | ||
| qc.subusat x9, x14, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.subusat x9, x14, x17 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:18: error: invalid operand for instruction | ||
| qc.wrap x3, x30, 23 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.wrap x3, x30 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction | ||
| qc.wrap x0, x30, x23 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:18: error: invalid operand for instruction | ||
| qc.wrap x3, x30, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.wrap x3, x30, x23 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction | ||
| qc.wrapi x0, 12, 2047 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction | ||
| qc.wrapi x0, x12, 2047 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:14: error: invalid operand for instruction | ||
| qc.wrapi x6, x0, 2047 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.wrapi x6, x12 | ||
|
|
||
| # CHECK-PLUS: :[[@LINE+1]]:19: error: immediate must be an integer in the range [0, 2047] | ||
| qc.wrapi x6, x12, 2048 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.wrapi x6, x12, 2047 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction | ||
| qc.norm x3, 7 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.norm x3 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:9: error: invalid operand for instruction | ||
| qc.norm x0, x7 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:13: error: invalid operand for instruction | ||
| qc.norm x3, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.norm x3, x7 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:15: error: invalid operand for instruction | ||
| qc.normu x11, 17 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.normu x11 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:10: error: invalid operand for instruction | ||
| qc.normu x0, x17 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:15: error: invalid operand for instruction | ||
| qc.normu x11, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.normu x11, x17 | ||
|
|
||
|
|
||
| # CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction | ||
| qc.normeu x26, 31 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:1: error: too few operands for instruction | ||
| qc.normeu x26 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:11: error: invalid operand for instruction | ||
| qc.normeu x0, x31 | ||
|
|
||
| # CHECK: :[[@LINE+1]]:16: error: invalid operand for instruction | ||
| qc.normeu x26, x0 | ||
|
|
||
| # CHECK-MINUS: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcia' (Qualcomm uC Arithmetic Extension) | ||
| qc.normeu x26, x31 |
Oops, something went wrong.
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.
I have a question about the semantics of qc.normu in the spec
Are the assignments of
mntandexpswapped? Unless I'm misunderstanding, I would expectexpto be based only onclzandmntto be baed on(X[rs1] << clz).Also the assignment of
X[rd] = {mnt[23:0], exp[7:0]};seems like it should be taking the upper 24 bits ofmntnot the lower 24 bits? But maybe I've misunderstood?