2003-10-04 Christian Groessler <chris@groessler.org>
authorChristian Groessler <chris@groessler.org>
Sat, 4 Oct 2003 21:11:47 +0000 (21:11 +0000)
committerChristian Groessler <chris@groessler.org>
Sat, 4 Oct 2003 21:11:47 +0000 (21:11 +0000)
* 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.

16 files changed:
gas/testsuite/ChangeLog
gas/testsuite/gas/z8k/calr-backf.s [new file with mode: 0644]
gas/testsuite/gas/z8k/calr-forwf.s [new file with mode: 0644]
gas/testsuite/gas/z8k/calr.d [new file with mode: 0644]
gas/testsuite/gas/z8k/calr.s [new file with mode: 0644]
gas/testsuite/gas/z8k/djnz-backf.s [new file with mode: 0644]
gas/testsuite/gas/z8k/djnz-backf2.s [new file with mode: 0644]
gas/testsuite/gas/z8k/djnz.d [new file with mode: 0644]
gas/testsuite/gas/z8k/djnz.s [new file with mode: 0644]
gas/testsuite/gas/z8k/jr-back.d [new file with mode: 0644]
gas/testsuite/gas/z8k/jr-back.s
gas/testsuite/gas/z8k/jr-backf.s
gas/testsuite/gas/z8k/jr-forw.d [new file with mode: 0644]
gas/testsuite/gas/z8k/jr-forw.s
gas/testsuite/gas/z8k/jr-forwf.s
gas/testsuite/gas/z8k/z8k.exp

index 82caa448c9d1942f3fb2e45def90c5e2ebdb4e75..d3cf9e94b37fffcb141b8f4de90d2390028c1516 100644 (file)
@@ -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 (file)
index 0000000..817134d
--- /dev/null
@@ -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 (file)
index 0000000..9c52754
--- /dev/null
@@ -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 (file)
index 0000000..fd6f7d8
--- /dev/null
@@ -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 (file)
index 0000000..615b226
--- /dev/null
@@ -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 (file)
index 0000000..c04f6f3
--- /dev/null
@@ -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 (file)
index 0000000..90b7fd5
--- /dev/null
@@ -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 (file)
index 0000000..5b6eca7
--- /dev/null
@@ -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 (file)
index 0000000..1119c64
--- /dev/null
@@ -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 (file)
index 0000000..0b80140
--- /dev/null
@@ -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     
index 6cab6c7152a7378c9565b8c034aaac546f97ddc3..631e629add8552b7e931e4bbe7e3fc4c7fce367e 100644 (file)
@@ -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
index 73e20a99be8768c78d039c9485216e56d7f1d5c8..6cab6c7152a7378c9565b8c034aaac546f97ddc3 100644 (file)
@@ -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 (file)
index 0000000..6d2f468
--- /dev/null
@@ -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     
index 50c725702a89681f5cecb53b945a23c709470d92..65f333bf9e0a7d88cd6c175601dd7f002567d0b4 100644 (file)
@@ -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
index d5cbc8775b05d5cfc9c49033287fc77bd5f823b2..1e4bcd46484729e93b38790e98f0289eb5c589b7 100644 (file)
@@ -1,5 +1,5 @@
 .text
 start: jr t,dest
-       .space  254
+       .space  256
 .globl dest
 dest:  nop
index af284b2befed053254f2995437b69b72da26b353..b50f294d9595d4a70091faf273bfc44f4cbc7255 100644 (file)
@@ -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"
+}