aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/bpf/bpf.exp6
-rw-r--r--gas/testsuite/gas/bpf/jcond-be-pseudoc.d14
-rw-r--r--gas/testsuite/gas/bpf/jcond-be.d14
-rw-r--r--gas/testsuite/gas/bpf/jcond-pseudoc.d14
-rw-r--r--gas/testsuite/gas/bpf/jcond-pseudoc.s8
-rw-r--r--gas/testsuite/gas/bpf/jcond.d14
-rw-r--r--gas/testsuite/gas/bpf/jcond.s8
7 files changed, 78 insertions, 0 deletions
diff --git a/gas/testsuite/gas/bpf/bpf.exp b/gas/testsuite/gas/bpf/bpf.exp
index 89955e1..f193221 100644
--- a/gas/testsuite/gas/bpf/bpf.exp
+++ b/gas/testsuite/gas/bpf/bpf.exp
@@ -47,6 +47,9 @@ if {[istarget bpf*-*-*]} {
run_dump_test jump-relax-ja
run_dump_test jump-relax-jump
+ run_dump_test jcond
+ run_dump_test jcond-pseudoc
+
# Big-endian BPF tests
run_dump_test call-be
run_dump_test exit-be
@@ -70,6 +73,9 @@ if {[istarget bpf*-*-*]} {
run_dump_test jump-relax-ja-be
run_dump_test jump-relax-jump-be
+ run_dump_test jcond-be
+ run_dump_test jcond-be-pseudoc
+
# Overflow tests
run_dump_test offset16-overflow
run_dump_test disp16-overflow
diff --git a/gas/testsuite/gas/bpf/jcond-be-pseudoc.d b/gas/testsuite/gas/bpf/jcond-be-pseudoc.d
new file mode 100644
index 0000000..5bd24e1
--- /dev/null
+++ b/gas/testsuite/gas/bpf/jcond-be-pseudoc.d
@@ -0,0 +1,14 @@
+#as: -EB -mdialect=pseudoc
+#objdump: -dr -M dec,pseudoc
+#source: jcond-pseudoc.s
+#name: BPF conditional pseudo-jump instruction, pseudoc syntax, big-endian
+
+.*: +file format .*bpf.*
+
+Disassembly of section .text:
+
+0+ <.text>:
+ 0: e5 00 00 00 00 00 00 00 may_goto 0
+ 8: e5 00 00 01 00 00 00 00 may_goto 1
+ 10: e5 00 ff fe 00 00 00 00 may_goto -2
+ 18: e5 00 ff fd 00 00 00 00 may_goto -3
diff --git a/gas/testsuite/gas/bpf/jcond-be.d b/gas/testsuite/gas/bpf/jcond-be.d
new file mode 100644
index 0000000..da2cfba
--- /dev/null
+++ b/gas/testsuite/gas/bpf/jcond-be.d
@@ -0,0 +1,14 @@
+#as: -EB -mdialect=normal
+#objdump: -dr -M dec
+#source: jcond.s
+#name: BPF conditional pseudo-jump instruction, normal syntax, big-endian
+
+.*: +file format .*bpf.*
+
+Disassembly of section .text:
+
+0+ <.text>:
+ 0: e5 00 00 00 00 00 00 00 jcond 0
+ 8: e5 00 00 01 00 00 00 00 jcond 1
+ 10: e5 00 ff fe 00 00 00 00 jcond -2
+ 18: e5 00 ff fd 00 00 00 00 jcond -3
diff --git a/gas/testsuite/gas/bpf/jcond-pseudoc.d b/gas/testsuite/gas/bpf/jcond-pseudoc.d
new file mode 100644
index 0000000..34c14c2
--- /dev/null
+++ b/gas/testsuite/gas/bpf/jcond-pseudoc.d
@@ -0,0 +1,14 @@
+#as: -EL -mdialect=pseudoc
+#objdump: -dr -M dec,pseudoc
+#source: jcond-pseudoc.s
+#name: BPF conditional pseudo-jump instruction, pseudoc syntax
+
+.*: +file format .*bpf.*
+
+Disassembly of section .text:
+
+0+ <.text>:
+ 0: e5 00 00 00 00 00 00 00 may_goto 0
+ 8: e5 00 01 00 00 00 00 00 may_goto 1
+ 10: e5 00 fe ff 00 00 00 00 may_goto -2
+ 18: e5 00 fd ff 00 00 00 00 may_goto -3
diff --git a/gas/testsuite/gas/bpf/jcond-pseudoc.s b/gas/testsuite/gas/bpf/jcond-pseudoc.s
new file mode 100644
index 0000000..b48ef38
--- /dev/null
+++ b/gas/testsuite/gas/bpf/jcond-pseudoc.s
@@ -0,0 +1,8 @@
+# Test for conditional pseudo-jump instruction in pseudo-c syntax
+ .text
+ may_goto 1f
+1:
+ may_goto 2f
+ may_goto 1b
+2:
+ may_goto 1b
diff --git a/gas/testsuite/gas/bpf/jcond.d b/gas/testsuite/gas/bpf/jcond.d
new file mode 100644
index 0000000..69570e2
--- /dev/null
+++ b/gas/testsuite/gas/bpf/jcond.d
@@ -0,0 +1,14 @@
+#as: -EL -mdialect=normal
+#objdump: -dr -M dec
+#source: jcond.s
+#name: BPF conditional pseudo-jump instruction, normal syntax, little-endian
+
+.*: +file format .*bpf.*
+
+Disassembly of section .text:
+
+0+ <.text>:
+ 0: e5 00 00 00 00 00 00 00 jcond 0
+ 8: e5 00 01 00 00 00 00 00 jcond 1
+ 10: e5 00 fe ff 00 00 00 00 jcond -2
+ 18: e5 00 fd ff 00 00 00 00 jcond -3
diff --git a/gas/testsuite/gas/bpf/jcond.s b/gas/testsuite/gas/bpf/jcond.s
new file mode 100644
index 0000000..9c61644c
--- /dev/null
+++ b/gas/testsuite/gas/bpf/jcond.s
@@ -0,0 +1,8 @@
+# Test for conditional pseudo-jump instruction
+ .text
+ jcond 1f
+1:
+ jcond 2f
+ jcond 1b
+2:
+ jcond 1b