-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[AARCH64] Add assembly/disassmbly for FIRST,LASTP instr. #114049
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 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 2>&1 < %s| FileCheck %s | ||
|
|
||
| // ------------------------------------------------------------------------- // | ||
| // Invalid predicate operand | ||
|
|
||
| firstp x0, p15, p0 | ||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register. | ||
| // CHECK-NEXT: firstp x0, p15, p0 | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
|
||
| firstp x0, p15.b, p0.b | ||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register. | ||
| // CHECK-NEXT: firstp x0, p15.b, p0.b | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
|
||
| firstp x0, p15.q, p0.h | ||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register. | ||
| // CHECK-NEXT: firstp x0, p15.q, p0.h | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
|
||
| // ------------------------------------------------------------------------- // | ||
| // Invalid register types | ||
|
|
||
| firstp sp, p15.q, p0.h | ||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
| // CHECK-NEXT: firstp sp, p15.q, p0.h | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
|
||
| firstp w0, p15.q, p0.h | ||
Lukacma marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
| // CHECK-NEXT: firstp w0, p15.q, p0.h | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
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,87 @@ | ||
| // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 < %s \ | ||
| // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
| // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p2 < %s \ | ||
| // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
| // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=CHECK-ERROR | ||
| // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2p2 < %s \ | ||
| // RUN: | llvm-objdump -d --mattr=+sve2p2 - | FileCheck %s --check-prefix=CHECK-INST | ||
| // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2p2 < %s \ | ||
| // RUN: | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
| // Disassemble encoding and check the re-encoding (-show-encoding) matches. | ||
| // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 < %s \ | ||
| // RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ | ||
| // RUN: | llvm-mc -triple=aarch64 -mattr=+sve2p2 -disassemble -show-encoding \ | ||
| // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
|
|
||
| firstp x0, p0, p0.b // 00100101-00100001-10000000-00000000 | ||
| // CHECK-INST: firstp x0, p0, p0.b | ||
| // CHECK-ENCODING: [0x00,0x80,0x21,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25218000 <unknown> | ||
|
|
||
| firstp x23, p11, p13.b // 00100101-00100001-10101101-10110111 | ||
| // CHECK-INST: firstp x23, p11, p13.b | ||
| // CHECK-ENCODING: [0xb7,0xad,0x21,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 2521adb7 <unknown> | ||
|
|
||
| firstp xzr, p15, p15.b // 00100101-00100001-10111101-11111111 | ||
| // CHECK-INST: firstp xzr, p15, p15.b | ||
| // CHECK-ENCODING: [0xff,0xbd,0x21,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 2521bdff <unknown> | ||
|
|
||
| firstp x0, p0, p0.h // 00100101-01100001-10000000-00000000 | ||
| // CHECK-INST: firstp x0, p0, p0.h | ||
| // CHECK-ENCODING: [0x00,0x80,0x61,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25618000 <unknown> | ||
|
|
||
| firstp x23, p11, p13.h // 00100101-01100001-10101101-10110111 | ||
| // CHECK-INST: firstp x23, p11, p13.h | ||
| // CHECK-ENCODING: [0xb7,0xad,0x61,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 2561adb7 <unknown> | ||
|
|
||
| firstp xzr, p15, p15.h // 00100101-01100001-10111101-11111111 | ||
| // CHECK-INST: firstp xzr, p15, p15.h | ||
| // CHECK-ENCODING: [0xff,0xbd,0x61,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 2561bdff <unknown> | ||
|
|
||
| firstp x0, p0, p0.s // 00100101-10100001-10000000-00000000 | ||
| // CHECK-INST: firstp x0, p0, p0.s | ||
| // CHECK-ENCODING: [0x00,0x80,0xa1,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25a18000 <unknown> | ||
|
|
||
| firstp x23, p11, p13.s // 00100101-10100001-10101101-10110111 | ||
| // CHECK-INST: firstp x23, p11, p13.s | ||
| // CHECK-ENCODING: [0xb7,0xad,0xa1,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25a1adb7 <unknown> | ||
|
|
||
| firstp xzr, p15, p15.s // 00100101-10100001-10111101-11111111 | ||
| // CHECK-INST: firstp xzr, p15, p15.s | ||
| // CHECK-ENCODING: [0xff,0xbd,0xa1,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25a1bdff <unknown> | ||
|
|
||
| firstp x0, p0, p0.d // 00100101-11100001-10000000-00000000 | ||
| // CHECK-INST: firstp x0, p0, p0.d | ||
| // CHECK-ENCODING: [0x00,0x80,0xe1,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25e18000 <unknown> | ||
|
|
||
| firstp x23, p11, p13.d // 00100101-11100001-10101101-10110111 | ||
| // CHECK-INST: firstp x23, p11, p13.d | ||
| // CHECK-ENCODING: [0xb7,0xad,0xe1,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25e1adb7 <unknown> | ||
|
|
||
| firstp xzr, p15, p15.d // 00100101-11100001-10111101-11111111 | ||
| // CHECK-INST: firstp xzr, p15, p15.d | ||
| // CHECK-ENCODING: [0xff,0xbd,0xe1,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25e1bdff <unknown> |
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,32 @@ | ||
| // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 2>&1 < %s| FileCheck %s | ||
|
|
||
| // ------------------------------------------------------------------------- // | ||
| // Invalid predicate operand | ||
|
|
||
| lastp x0, p15, p0 | ||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register. | ||
| // CHECK-NEXT: lastp x0, p15, p0 | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
|
||
| lastp x0, p15.b, p0.b | ||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register. | ||
| // CHECK-NEXT: lastp x0, p15.b, p0.b | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
|
||
| lastp x0, p15.q, p0.h | ||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register. | ||
| // CHECK-NEXT: lastp x0, p15.q, p0.h | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
|
||
| // ------------------------------------------------------------------------- // | ||
| // Invalid register types | ||
|
|
||
| lastp sp, p15.q, p0.h | ||
Lukacma marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
| // CHECK-NEXT: lastp sp, p15.q, p0.h | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
|
|
||
| lastp w0, p15.q, p0.h | ||
Lukacma marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction | ||
| // CHECK-NEXT: lastp w0, p15.q, p0.h | ||
| // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: | ||
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,87 @@ | ||
| // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 < %s \ | ||
| // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
| // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p2 < %s \ | ||
| // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
| // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=CHECK-ERROR | ||
| // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2p2 < %s \ | ||
| // RUN: | llvm-objdump -d --mattr=+sve2p2 - | FileCheck %s --check-prefix=CHECK-INST | ||
| // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2p2 < %s \ | ||
| // RUN: | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN | ||
| // Disassemble encoding and check the re-encoding (-show-encoding) matches. | ||
| // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 < %s \ | ||
| // RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ | ||
| // RUN: | llvm-mc -triple=aarch64 -mattr=+sve2p2 -disassemble -show-encoding \ | ||
| // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST | ||
|
|
||
| lastp x0, p0, p0.b // 00100101-00100010-10000000-00000000 | ||
| // CHECK-INST: lastp x0, p0, p0.b | ||
| // CHECK-ENCODING: [0x00,0x80,0x22,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25228000 <unknown> | ||
|
|
||
| lastp x23, p11, p13.b // 00100101-00100010-10101101-10110111 | ||
| // CHECK-INST: lastp x23, p11, p13.b | ||
| // CHECK-ENCODING: [0xb7,0xad,0x22,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 2522adb7 <unknown> | ||
|
|
||
| lastp xzr, p15, p15.b // 00100101-00100010-10111101-11111111 | ||
| // CHECK-INST: lastp xzr, p15, p15.b | ||
| // CHECK-ENCODING: [0xff,0xbd,0x22,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 2522bdff <unknown> | ||
|
|
||
| lastp x0, p0, p0.h // 00100101-01100010-10000000-00000000 | ||
| // CHECK-INST: lastp x0, p0, p0.h | ||
| // CHECK-ENCODING: [0x00,0x80,0x62,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25628000 <unknown> | ||
|
|
||
| lastp x23, p11, p13.h // 00100101-01100010-10101101-10110111 | ||
| // CHECK-INST: lastp x23, p11, p13.h | ||
| // CHECK-ENCODING: [0xb7,0xad,0x62,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 2562adb7 <unknown> | ||
|
|
||
| lastp xzr, p15, p15.h // 00100101-01100010-10111101-11111111 | ||
| // CHECK-INST: lastp xzr, p15, p15.h | ||
| // CHECK-ENCODING: [0xff,0xbd,0x62,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 2562bdff <unknown> | ||
|
|
||
| lastp x0, p0, p0.s // 00100101-10100010-10000000-00000000 | ||
| // CHECK-INST: lastp x0, p0, p0.s | ||
| // CHECK-ENCODING: [0x00,0x80,0xa2,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25a28000 <unknown> | ||
|
|
||
| lastp x23, p11, p13.s // 00100101-10100010-10101101-10110111 | ||
| // CHECK-INST: lastp x23, p11, p13.s | ||
| // CHECK-ENCODING: [0xb7,0xad,0xa2,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25a2adb7 <unknown> | ||
|
|
||
| lastp xzr, p15, p15.s // 00100101-10100010-10111101-11111111 | ||
| // CHECK-INST: lastp xzr, p15, p15.s | ||
| // CHECK-ENCODING: [0xff,0xbd,0xa2,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25a2bdff <unknown> | ||
|
|
||
| lastp x0, p0, p0.d // 00100101-11100010-10000000-00000000 | ||
| // CHECK-INST: lastp x0, p0, p0.d | ||
| // CHECK-ENCODING: [0x00,0x80,0xe2,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25e28000 <unknown> | ||
|
|
||
| lastp x23, p11, p13.d // 00100101-11100010-10101101-10110111 | ||
| // CHECK-INST: lastp x23, p11, p13.d | ||
| // CHECK-ENCODING: [0xb7,0xad,0xe2,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25e2adb7 <unknown> | ||
|
|
||
| lastp xzr, p15, p15.d // 00100101-11100010-10111101-11111111 | ||
| // CHECK-INST: lastp xzr, p15, p15.d | ||
| // CHECK-ENCODING: [0xff,0xbd,0xe2,0x25] | ||
| // CHECK-ERROR: instruction requires: sme2p2 or sve2p2 | ||
| // CHECK-UNKNOWN: 25e2bdff <unknown> |
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.
Uh oh!
There was an error while loading. Please reload this page.