aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2018-03-14 16:05:44 -0700
committerJim Wilson <jimw@sifive.com>2018-03-14 16:05:44 -0700
commit399912428d50cddbdd2e6e36085a9887f534459f (patch)
tree8b065cb69f7bacefe74a0733124a219804b93ed0
parent0e35537d754f1c687850d1caccb2d78d2e418391 (diff)
downloadgdb-399912428d50cddbdd2e6e36085a9887f534459f.zip
gdb-399912428d50cddbdd2e6e36085a9887f534459f.tar.gz
gdb-399912428d50cddbdd2e6e36085a9887f534459f.tar.bz2
Missing testcase files for last commit.
-rw-r--r--gas/testsuite/gas/riscv/insn.d51
-rw-r--r--gas/testsuite/gas/riscv/insn.s39
2 files changed, 90 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/insn.d b/gas/testsuite/gas/riscv/insn.d
new file mode 100644
index 0000000..3d1049b
--- /dev/null
+++ b/gas/testsuite/gas/riscv/insn.d
@@ -0,0 +1,51 @@
+#as: -march=rv32ic
+#objdump: -dr
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ ]+0:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
+[ ]+4:[ ]+00d58513[ ]+addi[ ]+a0,a1,13
+[ ]+8:[ ]+00a58567[ ]+jalr[ ]+a0,10\(a1\)
+[ ]+c:[ ]+00458503[ ]+lb[ ]+a0,4\(a1\)
+[ ]+10:[ ]+feb508e3[ ]+beq[ ]+a0,a1,0 \<target\>
+[ ]+10: R_RISCV_BRANCH[ ]+target
+[ ]+14:[ ]+00a58223[ ]+sb[ ]+a0,4\(a1\)
+[ ]+18:[ ]+00fff537[ ]+lui[ ]+a0,0xfff
+[ ]+1c:[ ]+fe5ff56f[ ]+jal[ ]+a0,0 \<target\>
+[ ]+1c: R_RISCV_JAL[ ]+target
+[ ]+20:[ ]+0511[ ]+addi[ ]+a0,a0,4
+[ ]+22:[ ]+852e[ ]+mv[ ]+a0,a1
+[ ]+24:[ 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c:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
+[ ]+70:[ ]+00c58533[ ]+add[ ]+a0,a1,a2
diff --git a/gas/testsuite/gas/riscv/insn.s b/gas/testsuite/gas/riscv/insn.s
new file mode 100644
index 0000000..7ad1753
--- /dev/null
+++ b/gas/testsuite/gas/riscv/insn.s
@@ -0,0 +1,39 @@
+target:
+ .insn r 0x33, 0, 0, a0, a1, a2
+ .insn i 0x13, 0, a0, a1, 13
+ .insn i 0x67, 0, a0, 10(a1)
+ .insn s 0x3, 0, a0, 4(a1)
+ .insn sb 0x63, 0, a0, a1, target
+ .insn sb 0x23, 0, a0, 4(a1)
+ .insn u 0x37, a0, 0xfff
+ .insn uj 0x6f, a0, target
+
+ .insn ci 0x1, 0x0, a0, 4
+ .insn cr 0x2, 0x8, a0, a1
+ .insn ciw 0x0, 0x0, a1, 1
+ .insn cb 0x1, 0x6, a1, target
+ .insn cj 0x1, 0x5, target
+
+ .insn r OP, 0, 0, a0, a1, a2
+ .insn i OP_IMM, 0, a0, a1, 13
+ .insn i JALR, 0, a0, 10(a1)
+ .insn s LOAD, 0, a0, 4(a1)
+ .insn sb BRANCH, 0, a0, a1, target
+ .insn sb STORE, 0, a0, 4(a1)
+ .insn u LUI, a0, 0xfff
+ .insn uj JAL, a0, target
+
+ .insn ci C1, 0x0, a0, 4
+ .insn cr C2, 0x8, a0, a1
+ .insn ciw C0, 0x0, a1, 1
+ .insn cb C1, 0x6, a1, target
+ .insn cj C1, 0x5, target
+
+ .insn r MADD, 0, 0, a0, a1, a2, a3
+ .insn r 0x33, 0, 0, fa0, a1, a2
+ .insn r 0x33, 0, 0, a0, fa1, a2
+ .insn r 0x33, 0, 0, fa0, fa1, a2
+ .insn r 0x33, 0, 0, a0, a1, fa2
+ .insn r 0x33, 0, 0, fa0, a1, fa2
+ .insn r 0x33, 0, 0, a0, fa1, fa2
+ .insn r 0x33, 0, 0, fa0, fa1, fa2