aboutsummaryrefslogtreecommitdiff
path: root/tdump/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tdump/tests')
-rw-r--r--tdump/tests/a.t6
-rw-r--r--tdump/tests/include.t1
-rw-r--r--tdump/tests/labels.t13
3 files changed, 20 insertions, 0 deletions
diff --git a/tdump/tests/a.t b/tdump/tests/a.t
new file mode 100644
index 0000000..f23f9c0
--- /dev/null
+++ b/tdump/tests/a.t
@@ -0,0 +1,6 @@
+start:
+ li x1, 48
+ li x2, 19683
+ st w, x1, 0(x2)
+ li x1, 3
+ csrrw mpower, x0, x1
diff --git a/tdump/tests/include.t b/tdump/tests/include.t
new file mode 100644
index 0000000..50dfe97
--- /dev/null
+++ b/tdump/tests/include.t
@@ -0,0 +1 @@
+.include "a.t"
diff --git a/tdump/tests/labels.t b/tdump/tests/labels.t
new file mode 100644
index 0000000..5ad0d42
--- /dev/null
+++ b/tdump/tests/labels.t
@@ -0,0 +1,13 @@
+start:
+ /* RELOC_LA */
+ la x1, other_func
+ /* RELOC_B */
+ beq x0, x0, other_func
+
+other_func:
+ /* RELOC_J */
+ jal x0, final_func
+ jal x0, start
+
+final_func:
+ nop