Add tests for instructions with offsets.
authorArnold Metselaar <arnold.metselaar@planet.nl>
Wed, 18 Jan 2006 14:52:11 +0000 (14:52 +0000)
committerArnold Metselaar <arnold.metselaar@planet.nl>
Wed, 18 Jan 2006 14:52:11 +0000 (14:52 +0000)
gas/testsuite/ChangeLog
gas/testsuite/gas/z80/offset.d [new file with mode: 0644]
gas/testsuite/gas/z80/offset.s [new file with mode: 0644]
gas/testsuite/gas/z80/z80.exp

index ee720a0..6069d12 100644 (file)
@@ -1,3 +1,9 @@
+2006-01-18  Arnold Metselaar  <arnoldm@sourceware.org>
+
+       * gas/z80/z80.exp: Add offset.
+       * gas/z80/ofseet.d: New file.
+       * gas/z80/ofseet.s: New file.
+
 2006-01-16  Paul Brook  <paul@codesourcery.com>
 
        * gas/m68k/all.exp: Add mcf-fpu.
diff --git a/gas/testsuite/gas/z80/offset.d b/gas/testsuite/gas/z80/offset.d
new file mode 100644 (file)
index 0000000..41499b1
--- /dev/null
@@ -0,0 +1,24 @@
+#objdump: -d
+#name: instructions with offsets
+
+.*: .*
+
+Disassembly of section .text:
+
+0+ <.text>:
+
+[      ]+0:[   ]+18 7e[        ]+jr 0x0080
+[      ]+2:[   ]+dd 34 05[     ]+inc \(ix\+5\)
+[      ]+5:[   ]+fd 35 ff[     ]+dec \(iy\+?-1\)
+[      ]+8:[   ]+dd 7e 80[     ]+ld a,\(ix\+?-128\)
+[      ]+b:[   ]+fd 77 7f[     ]+ld \(iy\+127\),a
+[      ]+e:[   ]+10 f0[        ]+djnz 0x0000
+[      ]+10:[  ]+28 02[        ]+jr z,0x0014
+[      ]+12:[  ]+38 04[        ]+jr c,0x0018
+[      ]+14:[  ]+20 02[        ]+jr nz,0x0018
+[      ]+16:[  ]+30 fc[        ]+jr nc,0x0014
+[      ]+18:[  ]+dd 36 22 09[  ]+ld \(ix\+34\),0x09
+[      ]+1c:[  ]+fd 36 de f7[  ]+ld \(iy\+?-34\),0xf7
+[      ]+20:[  ]+dd cb 37 1e[  ]+rr \(ix\+55\)
+[      ]+24:[  ]+fd cb c9 16[  ]+rl \(iy\+?-55\)
+#pass
diff --git a/gas/testsuite/gas/z80/offset.s b/gas/testsuite/gas/z80/offset.s
new file mode 100644 (file)
index 0000000..6e4b33f
--- /dev/null
@@ -0,0 +1,23 @@
+;;;  various instructions involving offsets
+
+       .section .text
+       .org 0
+10:
+       jr 1f
+       inc (ix+5)
+       dec (iy-1)
+       ld a,(ix-128)
+       ld (iy+127),a
+       djnz 10b
+       jr z,2f
+       jr c,3f
+2:
+       jr nz,3f
+       jr nc,2b
+3:
+       ld (ix+34),9
+       ld (iy-34),-9
+       rr (ix+55)
+       rl (iy-55)
+       .balign 0x80
+1:     
index db11bb7..68b4b86 100644 (file)
@@ -7,4 +7,6 @@ if [istarget z80-*-*] then {
     run_dump_test "quotes"
 # test suffixes
     run_dump_test "suffix"
+# test assembling and disassembling insturction involving offsets
+    run_dump_test "offset"
 }