aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorArnold Metselaar <arnold.metselaar@planet.nl>2006-01-18 14:52:11 +0000
committerArnold Metselaar <arnold.metselaar@planet.nl>2006-01-18 14:52:11 +0000
commitae33e02d8fb319ff797cb5709471ce6cd15ac3b2 (patch)
tree2157288917dbbe6f41c890445259874e784fe2c5 /gas
parent9e919b5f1dc4218efeff61c948229559882bca11 (diff)
downloadgdb-ae33e02d8fb319ff797cb5709471ce6cd15ac3b2.zip
gdb-ae33e02d8fb319ff797cb5709471ce6cd15ac3b2.tar.gz
gdb-ae33e02d8fb319ff797cb5709471ce6cd15ac3b2.tar.bz2
Add tests for instructions with offsets.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/z80/offset.d24
-rw-r--r--gas/testsuite/gas/z80/offset.s23
-rw-r--r--gas/testsuite/gas/z80/z80.exp2
4 files changed, 55 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index ee720a0..6069d12 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -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
index 0000000..41499b1
--- /dev/null
+++ b/gas/testsuite/gas/z80/offset.d
@@ -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
index 0000000..6e4b33f
--- /dev/null
+++ b/gas/testsuite/gas/z80/offset.s
@@ -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:
diff --git a/gas/testsuite/gas/z80/z80.exp b/gas/testsuite/gas/z80/z80.exp
index db11bb7..68b4b86 100644
--- a/gas/testsuite/gas/z80/z80.exp
+++ b/gas/testsuite/gas/z80/z80.exp
@@ -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"
}