2012-05-06 Arnold Metselaar <arnold_m@operamail.com>
authorArnold Metselaar <arnold.metselaar@planet.nl>
Sun, 6 May 2012 10:56:25 +0000 (10:56 +0000)
committerArnold Metselaar <arnold.metselaar@planet.nl>
Sun, 6 May 2012 10:56:25 +0000 (10:56 +0000)
* gas/z80/jr-forwf.s: New file, adapted from z8k version.
* gas/z80/jr-backf.s: Likewise.
* gas/z80/djnz-backf.s: Likewise.
* gas/z80/ill_op: New file, with illegal operand.
* gas/z80/z80.exp: Run new tests.

gas/testsuite/ChangeLog
gas/testsuite/gas/z80/djnz-backf.s [new file with mode: 0644]
gas/testsuite/gas/z80/ill_op.s [new file with mode: 0644]
gas/testsuite/gas/z80/jr-backf.s [new file with mode: 0644]
gas/testsuite/gas/z80/jr-forwf.s [new file with mode: 0644]
gas/testsuite/gas/z80/z80.exp

index 9d394a3..0fd88fe 100644 (file)
@@ -1,3 +1,11 @@
+2012-05-06  Arnold Metselaar  <arnold_m@operamail.com>
+
+       * gas/z80/jr-forwf.s: New file, adapted from z8k version.
+       * gas/z80/jr-backf.s: Likewise.
+       * gas/z80/djnz-backf.s: Likewise.
+       * gas/z80/ill_op: New file, with illegal operand.
+       * gas/z80/z80.exp: Run new tests.
+
 2012-05-03  Sean Keys  <skeys@ipdatasys.com>
 
        * gas/all/gas.exp: Added xgate tex entry.
diff --git a/gas/testsuite/gas/z80/djnz-backf.s b/gas/testsuite/gas/z80/djnz-backf.s
new file mode 100644 (file)
index 0000000..5264d78
--- /dev/null
@@ -0,0 +1,8 @@
+.text
+.globl label1
+label1:        nop
+       .space  126
+
+       djnz    label1
+       nop
+
diff --git a/gas/testsuite/gas/z80/ill_op.s b/gas/testsuite/gas/z80/ill_op.s
new file mode 100644 (file)
index 0000000..e4b699d
--- /dev/null
@@ -0,0 +1,2 @@
+.text
+ LD HL,(SP+0)
diff --git a/gas/testsuite/gas/z80/jr-backf.s b/gas/testsuite/gas/z80/jr-backf.s
new file mode 100644 (file)
index 0000000..a2fa65e
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+.globl start
+start: nop
+       .space  126
+.globl dest
+dest:  jr z,start
+       nop
diff --git a/gas/testsuite/gas/z80/jr-forwf.s b/gas/testsuite/gas/z80/jr-forwf.s
new file mode 100644 (file)
index 0000000..009959e
--- /dev/null
@@ -0,0 +1,5 @@
+.text
+start: jr c,dest
+       .space  128
+.globl dest
+dest:  nop
index 43a3360..373b07f 100644 (file)
@@ -11,6 +11,10 @@ if [istarget z80-*-*] then {
     run_dump_test "suffix"
 # test assembling and disassembling instructions involving offsets
     run_dump_test "offset"
+    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)"
 # test assembling instruction with offset that is a label defined later
     run_dump_test "atend"
 # test for data transfer instructions
@@ -29,4 +33,5 @@ if [istarget z80-*-*] then {
     run_dump_test "inout"
 #test for other instructions
     run_dump_test "misc"
+    gas_test_error "ill_op.s" "" "Illegal operand: ld hl,(sp+0)"
 }