* 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-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.
--- /dev/null
+.text
+dest: nop
+ .space 4092
+
+ calr dest
+ nop
--- /dev/null
+.text
+ calr dest
+ .space 4098
+
+dest: nop
--- /dev/null
+#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
--- /dev/null
+.text
+label1: calr label2
+ calr label3
+ .space 4088
+
+label2: calr label1
+
+ nop
+ nop
+ nop
+
+label3: nop
--- /dev/null
+.text
+.globl label1
+label1: nop
+ .space 252
+
+ dbjnz rl0,label1
+ nop
+
--- /dev/null
+.text
+.globl label1
+label1: nop
+ .space 252
+
+ djnz r0,label1
+ nop
+
--- /dev/null
+#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
--- /dev/null
+.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
--- /dev/null
+#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
.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
.text
.globl start
start: nop
- .space 256
+ .space 254
.globl dest
dest: jr t,start
nop
--- /dev/null
+#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
.text
-start: jr t,dest
- .space 252
+ jr t,dest ! max. displacement
+ jr t,dest
+ jr t,dest
+ .space 250
.globl dest
dest: nop
.text
start: jr t,dest
- .space 254
+ .space 256
.globl dest
dest: nop
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
run_dump_test "inout"
-}
+# pcrel tests
+ run_dump_test "jr-forw"
+ run_dump_test "jr-back"
+ run_dump_test "djnz"
+ run_dump_test "calr"
+}