aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Groessler <chris@groessler.org>2003-10-04 21:11:47 +0000
committerChristian Groessler <chris@groessler.org>2003-10-04 21:11:47 +0000
commit249ad7a71ffadce13e4377ee6c912e28fa8ad759 (patch)
tree2fb483ea7d410d8091acb99066d2bcb04c60c9a3
parenta72d6b4e2a3250dc8f9bf3f452d5caf2d63fd7a3 (diff)
downloadgdb-249ad7a71ffadce13e4377ee6c912e28fa8ad759.zip
gdb-249ad7a71ffadce13e4377ee6c912e28fa8ad759.tar.gz
gdb-249ad7a71ffadce13e4377ee6c912e28fa8ad759.tar.bz2
2003-10-04 Christian Groessler <chris@groessler.org>
* gas/z8k/calr-backf.s: New file. * gas/z8k/calr-forwf.s: New file. * gas/z8k/calr.d: New file. * gas/z8k/calr.s: New file. * gas/z8k/djnz-backf.s: New file. * gas/z8k/djnz-backf2.s: New file. * gas/z8k/djnz.d: New file. * gas/z8k/djnz.s: New file. * gas/z8k/jr-back.d: New file. * gas/z8k/jr-forw.d: New file. * gas/z8k/jr-back.s: Fix displacement length. Add some more jumps for jr-back.d. * gas/z8k/jr-backf.s: Fix displacement length. * gas/z8k/jr-forw.s: Fix displacement length. Add some more jumps for jr-forw.d. * gas/z8k/jr-forwf.s: Fix displacement length. * gas/z8k/z8k.exp: Run new tests.
-rw-r--r--gas/testsuite/ChangeLog20
-rw-r--r--gas/testsuite/gas/z8k/calr-backf.s6
-rw-r--r--gas/testsuite/gas/z8k/calr-forwf.s5
-rw-r--r--gas/testsuite/gas/z8k/calr.d21
-rw-r--r--gas/testsuite/gas/z8k/calr.s12
-rw-r--r--gas/testsuite/gas/z8k/djnz-backf.s8
-rw-r--r--gas/testsuite/gas/z8k/djnz-backf2.s8
-rw-r--r--gas/testsuite/gas/z8k/djnz.d21
-rw-r--r--gas/testsuite/gas/z8k/djnz.s15
-rw-r--r--gas/testsuite/gas/z8k/jr-back.d15
-rw-r--r--gas/testsuite/gas/z8k/jr-back.s8
-rw-r--r--gas/testsuite/gas/z8k/jr-backf.s2
-rw-r--r--gas/testsuite/gas/z8k/jr-forw.d16
-rw-r--r--gas/testsuite/gas/z8k/jr-forw.s6
-rw-r--r--gas/testsuite/gas/z8k/jr-forwf.s2
-rw-r--r--gas/testsuite/gas/z8k/z8k.exp19
16 files changed, 171 insertions, 13 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 82caa44..d3cf9e9 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,23 @@
+2003-10-04 Christian Groessler <chris@groessler.org>
+
+ * gas/z8k/calr-backf.s: New file.
+ * gas/z8k/calr-forwf.s: New file.
+ * gas/z8k/calr.d: New file.
+ * gas/z8k/calr.s: New file.
+ * gas/z8k/djnz-backf.s: New file.
+ * gas/z8k/djnz-backf2.s: New file.
+ * gas/z8k/djnz.d: New file.
+ * gas/z8k/djnz.s: New file.
+ * gas/z8k/jr-back.d: New file.
+ * gas/z8k/jr-forw.d: New file.
+ * gas/z8k/jr-back.s: Fix displacement length. Add some more jumps
+ for jr-back.d.
+ * gas/z8k/jr-backf.s: Fix displacement length.
+ * gas/z8k/jr-forw.s: Fix displacement length. Add some more jumps
+ for jr-forw.d.
+ * gas/z8k/jr-forwf.s: Fix displacement length.
+ * gas/z8k/z8k.exp: Run new tests.
+
2003-10-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* gas/mips/ldstla-32-shared.d: New file.
diff --git a/gas/testsuite/gas/z8k/calr-backf.s b/gas/testsuite/gas/z8k/calr-backf.s
new file mode 100644
index 0000000..817134d
--- /dev/null
+++ b/gas/testsuite/gas/z8k/calr-backf.s
@@ -0,0 +1,6 @@
+.text
+dest: nop
+ .space 4092
+
+ calr dest
+ nop
diff --git a/gas/testsuite/gas/z8k/calr-forwf.s b/gas/testsuite/gas/z8k/calr-forwf.s
new file mode 100644
index 0000000..9c52754
--- /dev/null
+++ b/gas/testsuite/gas/z8k/calr-forwf.s
@@ -0,0 +1,5 @@
+.text
+ calr dest
+ .space 4098
+
+dest: nop
diff --git a/gas/testsuite/gas/z8k/calr.d b/gas/testsuite/gas/z8k/calr.d
new file mode 100644
index 0000000..fd6f7d8
--- /dev/null
+++ b/gas/testsuite/gas/z8k/calr.d
@@ -0,0 +1,21 @@
+#as:
+#objdump: -dr
+#name: calr
+
+.*: +file format coff-z8k
+
+Disassembly of section \.text:
+
+00000000 <label1>:
+ 0: d803 calr 0xffc
+ 2: d800 calr 0x1004
+ \.\.\.
+
+00000ffc <label2>:
+ ffc: d7ff calr 0x0
+ ffe: 8d07 nop
+ 1000: 8d07 nop
+ 1002: 8d07 nop
+
+00001004 <label3>:
+ 1004: 8d07 nop
diff --git a/gas/testsuite/gas/z8k/calr.s b/gas/testsuite/gas/z8k/calr.s
new file mode 100644
index 0000000..615b226
--- /dev/null
+++ b/gas/testsuite/gas/z8k/calr.s
@@ -0,0 +1,12 @@
+.text
+label1: calr label2
+ calr label3
+ .space 4088
+
+label2: calr label1
+
+ nop
+ nop
+ nop
+
+label3: nop
diff --git a/gas/testsuite/gas/z8k/djnz-backf.s b/gas/testsuite/gas/z8k/djnz-backf.s
new file mode 100644
index 0000000..c04f6f3
--- /dev/null
+++ b/gas/testsuite/gas/z8k/djnz-backf.s
@@ -0,0 +1,8 @@
+.text
+.globl label1
+label1: nop
+ .space 252
+
+ dbjnz rl0,label1
+ nop
+
diff --git a/gas/testsuite/gas/z8k/djnz-backf2.s b/gas/testsuite/gas/z8k/djnz-backf2.s
new file mode 100644
index 0000000..90b7fd5
--- /dev/null
+++ b/gas/testsuite/gas/z8k/djnz-backf2.s
@@ -0,0 +1,8 @@
+.text
+.globl label1
+label1: nop
+ .space 252
+
+ djnz r0,label1
+ nop
+
diff --git a/gas/testsuite/gas/z8k/djnz.d b/gas/testsuite/gas/z8k/djnz.d
new file mode 100644
index 0000000..5b6eca7
--- /dev/null
+++ b/gas/testsuite/gas/z8k/djnz.d
@@ -0,0 +1,21 @@
+#as:
+#objdump: -dr
+#name: djnz/dbjnz
+
+.*: +file format coff-z8k
+
+Disassembly of section \.text:
+
+00000000 <label1>:
+ 0: 8d07 nop
+ \.\.\.
+ fa: f0fe djnz r0,0x0
+ fc: f87f dbjnz rl0,0x0
+ fe: 8d07 nop
+
+00000100 <label2>:
+ 100: 8d07 nop
+ \.\.\.
+ 1fa: f87e dbjnz rl0,0x100
+ 1fc: f0ff djnz r0,0x100
+ 1fe: 8d07 nop
diff --git a/gas/testsuite/gas/z8k/djnz.s b/gas/testsuite/gas/z8k/djnz.s
new file mode 100644
index 0000000..1119c64
--- /dev/null
+++ b/gas/testsuite/gas/z8k/djnz.s
@@ -0,0 +1,15 @@
+.text
+.globl label1
+label1: nop
+ .space 248
+
+ djnz r0,label1
+ dbjnz rl0,label1
+ nop
+
+label2: nop
+ .space 248
+
+ dbjnz rl0,label2
+ djnz r0,label2
+ nop
diff --git a/gas/testsuite/gas/z8k/jr-back.d b/gas/testsuite/gas/z8k/jr-back.d
new file mode 100644
index 0000000..0b80140
--- /dev/null
+++ b/gas/testsuite/gas/z8k/jr-back.d
@@ -0,0 +1,15 @@
+#as:
+#objdump: -dr
+#name: jr backward
+
+.*: +file format coff-z8k
+
+Disassembly of section \.text:
+
+00000000 <start>:
+ 0: 8d07 nop
+ \.\.\.
+ fa: e882 jr t,0x0
+ fc: e881 jr t,0x0
+ fe: e880 jr t,0x0
+ 100: 8d07 nop
diff --git a/gas/testsuite/gas/z8k/jr-back.s b/gas/testsuite/gas/z8k/jr-back.s
index 6cab6c7..631e629 100644
--- a/gas/testsuite/gas/z8k/jr-back.s
+++ b/gas/testsuite/gas/z8k/jr-back.s
@@ -1,7 +1,9 @@
.text
.globl start
start: nop
- .space 254
-.globl dest
-dest: jr t,start
+ .space 248
+
+ jr t,start
+ jr t,start
+ jr t,start
nop
diff --git a/gas/testsuite/gas/z8k/jr-backf.s b/gas/testsuite/gas/z8k/jr-backf.s
index 73e20a9..6cab6c7 100644
--- a/gas/testsuite/gas/z8k/jr-backf.s
+++ b/gas/testsuite/gas/z8k/jr-backf.s
@@ -1,7 +1,7 @@
.text
.globl start
start: nop
- .space 256
+ .space 254
.globl dest
dest: jr t,start
nop
diff --git a/gas/testsuite/gas/z8k/jr-forw.d b/gas/testsuite/gas/z8k/jr-forw.d
new file mode 100644
index 0000000..6d2f468
--- /dev/null
+++ b/gas/testsuite/gas/z8k/jr-forw.d
@@ -0,0 +1,16 @@
+#as:
+#objdump: -dr
+#name: jr forward
+
+.*: +file format coff-z8k
+
+Disassembly of section \.text:
+
+00000000 <.text>:
+ 0: e87f jr t,0x100
+ 2: e87e jr t,0x100
+ 4: e87d jr t,0x100
+ \.\.\.
+
+00000100 <dest>:
+ 100: 8d07 nop
diff --git a/gas/testsuite/gas/z8k/jr-forw.s b/gas/testsuite/gas/z8k/jr-forw.s
index 50c7257..65f333b 100644
--- a/gas/testsuite/gas/z8k/jr-forw.s
+++ b/gas/testsuite/gas/z8k/jr-forw.s
@@ -1,5 +1,7 @@
.text
-start: jr t,dest
- .space 252
+ jr t,dest ! max. displacement
+ jr t,dest
+ jr t,dest
+ .space 250
.globl dest
dest: nop
diff --git a/gas/testsuite/gas/z8k/jr-forwf.s b/gas/testsuite/gas/z8k/jr-forwf.s
index d5cbc87..1e4bcd4 100644
--- a/gas/testsuite/gas/z8k/jr-forwf.s
+++ b/gas/testsuite/gas/z8k/jr-forwf.s
@@ -1,5 +1,5 @@
.text
start: jr t,dest
- .space 254
+ .space 256
.globl dest
dest: nop
diff --git a/gas/testsuite/gas/z8k/z8k.exp b/gas/testsuite/gas/z8k/z8k.exp
index af284b2..b50f294 100644
--- a/gas/testsuite/gas/z8k/z8k.exp
+++ b/gas/testsuite/gas/z8k/z8k.exp
@@ -6,12 +6,14 @@ if [istarget z8k-*-*] then {
gas_test "eidi.s" "" "" "EI/DI operands"
gas_test_error "eidif.s" "" "EI/DI operands"
-# JR range test
+# pcrel range test
- gas_test_error "jr-forwf.s" "" "relative jump out of range"
- gas_test_error "jr-backf.s" "" "relative jump out of range"
- gas_test "jr-forw.s" "" "" "relative jump in range"
- gas_test "jr-back.s" "" "" "relative jump in range"
+ gas_test_error "jr-forwf.s" "" "relative jump out of range (jr)"
+ gas_test_error "jr-backf.s" "" "relative jump out of range (jr)"
+ gas_test_error "djnz-backf.s" "" "relative jump out of range (djnz)"
+ gas_test_error "djnz-backf2.s" "" "relative jump out of range (djnz)"
+ gas_test_error "calr-forwf.s" "" "relative jump out of range (calr)"
+ gas_test_error "calr-backf.s" "" "relative jump out of range (calr)"
# 4 bit argument tests
@@ -28,5 +30,10 @@ if [istarget z8k-*-*] then {
run_dump_test "inout"
-}
+# pcrel tests
+ run_dump_test "jr-forw"
+ run_dump_test "jr-back"
+ run_dump_test "djnz"
+ run_dump_test "calr"
+}