forked from openhwgroup/corev-llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COREV] Define ALU instructions (openhwgroup#10)
Signed-off-by: Serkan Muhcu <serkan.muhcu@student.uni-tuebingen.de>
- Loading branch information
Showing
71 changed files
with
1,275 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,14 @@ | ||
# RUN: not llvm-mc -triple=riscv32 --mattr=+xcorevalu %s 2>&1 \ | ||
# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR | ||
|
||
cv.abs t0, 0 | ||
# CHECK-ERROR: invalid operand for instruction | ||
|
||
cv.abs 0, t1 | ||
# CHECK-ERROR: invalid operand for instruction | ||
|
||
cv.abs t0 | ||
# CHECK-ERROR: too few operands for instruction | ||
|
||
cv.abs t0, t1, t2 | ||
# CHECK-ERROR: invalid operand for instruction |
This file contains 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,10 @@ | ||
# RUN: llvm-mc -triple=riscv32 --mattr=+xcorevalu -show-encoding %s \ | ||
# RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INSTR | ||
|
||
cv.abs t0, t1 | ||
# CHECK-INSTR: cv.abs t0, t1 | ||
# CHECK-ENCODING: [0xb3,0x02,0x03,0x04] | ||
|
||
cv.abs a0, a1 | ||
# CHECK-INSTR: cv.abs a0, a1 | ||
# CHECK-ENCODING: [0x33,0x85,0x05,0x04] |
This file contains 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,26 @@ | ||
# RUN: not llvm-mc -triple=riscv32 --mattr=+xcorevalu %s 2>&1 \ | ||
# RUN: | FileCheck %s --check-prefixes=CHECK-ERROR | ||
|
||
cv.addn t0, t1, t2, -1 | ||
# CHECK-ERROR: immediate must be an integer in the range [0, 31] | ||
|
||
cv.addn t0, t1, t2, 32 | ||
# CHECK-ERROR: immediate must be an integer in the range [0, 31] | ||
|
||
cv.addn t0, t1, t2, a0 | ||
# CHECK-ERROR: immediate must be an integer in the range [0, 31] | ||
|
||
cv.addn t0, t1, 0, 0 | ||
# CHECK-ERROR: invalid operand for instruction | ||
|
||
cv.addn t0, 0, t2, 0 | ||
# CHECK-ERROR: invalid operand for instruction | ||
|
||
cv.addn 0, t1, t2, 0 | ||
# CHECK-ERROR: invalid operand for instruction | ||
|
||
cv.addn t0, t1, t2 | ||
# CHECK-ERROR: too few operands for instruction | ||
|
||
cv.addn t0, t1, t2, 0, a0 | ||
# CHECK-ERROR: invalid operand for instruction |
Oops, something went wrong.